[postgis-devel] [PostGIS] #549: ST_isCollection

PostGIS trac at osgeo.org
Thu Jul 1 02:49:27 PDT 2010


#549: ST_isCollection
-------------------------+--------------------------------------------------
 Reporter:  strk         |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by yabo):

 I don't know all the internals so this might be wrong but here's a first
 try :

 {{{
 $ svn diff
 Index: postgis/lwgeom_functions_basic.c
 ===================================================================
 --- postgis/lwgeom_functions_basic.c    (revision 5717)
 +++ postgis/lwgeom_functions_basic.c    (working copy)
 @@ -2977,6 +2977,15 @@
         PG_RETURN_POINTER(result);
  }

 +PG_FUNCTION_INFO_V1(LWGEOM_st_IsCollection)
 +int ST_IsCollection(PG_FUNCTION_ARGS)
 +{
 +  PG_LWGEOM* geom;
 +  geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
 +
 +  return lwgeom_is_collection(geom->type);
 +}
 +
  PG_FUNCTION_INFO_V1(LWGEOM_makepoint);
  Datum LWGEOM_makepoint(PG_FUNCTION_ARGS)
  {
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/549#comment:1>
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