49 const GEOSCoordSequence* seq_in;
56 switch ( GEOSGeomTypeId(g_in) )
59 case GEOS_MULTILINESTRING:
60 case GEOS_MULTIPOLYGON:
61 case GEOS_GEOMETRYCOLLECTION:
63 for (gn=0; gn<GEOSGetNumGeometries(g_in); ++gn)
65 const GEOSGeometry* g = GEOSGetGeometryN(g_in, gn);
67 if ( ret )
return ret;
75 if ( ret )
return ret;
76 for (gn=0; gn<GEOSGetNumInteriorRings(g_in); ++gn)
78 const GEOSGeometry* g = GEOSGetInteriorRingN(g_in, gn);
80 if ( ret )
return ret;
92 seq_in = GEOSGeom_getCoordSeq(g_in);
93 if ( ! seq_in )
return NULL;
94 if ( ! GEOSCoordSeq_getSize(seq_in, &sz) )
return NULL;
95 if ( ! sz )
return NULL;
97 if ( ! GEOSCoordSeq_getDimensions(seq_in, &dims) )
return NULL;
99 seq_out = GEOSCoordSeq_create(1, dims);
100 if ( ! seq_out )
return NULL;
102 if ( ! GEOSCoordSeq_getX(seq_in, n, &val) )
return NULL;
103 if ( ! GEOSCoordSeq_setX(seq_out, n, val) )
return NULL;
104 if ( ! GEOSCoordSeq_getY(seq_in, n, &val) )
return NULL;
105 if ( ! GEOSCoordSeq_setY(seq_out, n, val) )
return NULL;
108 if ( ! GEOSCoordSeq_getZ(seq_in, n, &val) )
return NULL;
109 if ( ! GEOSCoordSeq_setZ(seq_out, n, val) )
return NULL;
112 return GEOSGeom_createPoint(seq_out);
GEOSGeometry * LWGEOM_GEOS_getPointN(const GEOSGeometry *, uint32_t)