2014-02-09 106 views

回答

3

PostGIS的git鏡像是https://github.com/postgis/postgis。主要來源是svn。如果你已經完成Google搜索「postgis源代碼」並找到the relevant page on the postgis site,那麼你會了解到這一點。

ST_Overlapsdeclared in SQL as

CREATE OR REPLACE FUNCTION ST_Overlaps(geom1 geometry, geom2 geometry) 
    RETURNS boolean 
    AS 'SELECT $1 && $2 AND _ST_Overlaps($1,$2)' 

這又是指:

CREATE OR REPLACE FUNCTION _ST_Overlaps(geom1 geometry, geom2 geometry) 
     RETURNS boolean 
     AS 'MODULE_PATHNAME','overlaps' 
     LANGUAGE 'c' IMMUTABLE STRICT 
     COST 100; 

所以C的實現是一個名爲overlaps功能,這是defined in postgis/lwgeom_geos.c(與ctags -R發現建立一個源索引,然後vim -t overlaps,但是你可以使用你喜歡的任何C搜索工具,或者只是使用grep)。

相關問題