[postgis-devel] [PostGIS] #1050: Add GEOS spatial operations to liblwgeom

PostGIS trac at osgeo.org
Wed Jun 22 10:08:46 PDT 2011


#1050: Add GEOS spatial operations to liblwgeom
-------------------------+--------------------------------------------------
 Reporter:  bnordgren    |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  1.5.X        
 Keywords:               |  
-------------------------+--------------------------------------------------
 Enable "spatial" things with an LWGEOM object from C. Attached patch adds
 some functions like:


 {{{
 LWGEOM *lwgeom_intersection(LWGEOM *geom1, LWGEOM *geom2) ;
 LWGEOM *lwgeom_difference(LWGEOM *geom1, LWGEOM *geom2) ;
 LWGEOM *lwgeom_symdifference(LWGEOM* geom1, LWGEOM* geom2) ;
 LWGEOM* lwgeom_union(LWGEOM *geom1, LWGEOM *geom2) ;
 }}}

 This is more or less a copy/paste from the intersection/difference/etc.
 functions which operate on PG_FUNCTION_ARGS. However, I had to move some
 things from  ./postgis to ./liblwgeom :

 * GEOS2LWGEOM
 * LWGEOM2GEOS
 * ptarray_from_GEOSCoordSeq
 * ptarray_to_GEOSCoordSeq
 * lwgeom_geos_error
 * lwgeom_geos_errmsg
 * profile.h (copied, not moved, so it's in two places now)

 I very unimaginatively stuck with the name "lwgeom_geos.c" for the file,
 so there's two of this file: one in postgis and one in liblwgeom.

 Did basic cleanup on the functions copied, such that it now compiles
 without warnings (vars set but not used; converting elog(ERROR, ...) to
 lwerror() )...

 This is NOT TESTED. I'm putting this here early to get feedback before
 going nuts.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1050>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list