case GEOS_POINT:
POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a Point");
cs = GEOSGeom_getCoordSeq(geom);
-/* FIXME: dunno how to represent an empty point */
-if ( GEOSisEmpty(geom) )
- return (LWGEOM*)lwcollection_construct_empty(COLLECTIONTYPE, SRID, want3d, 0);
+ if ( GEOSisEmpty(geom) )
+ return (LWGEOM*)lwpoint_construct_empty(SRID, want3d, 0);
pa = ptarray_from_GEOSCoordSeq(cs, want3d);
return (LWGEOM *)lwpoint_construct(SRID, NULL, pa);
case GEOS_LINESTRING:
case GEOS_LINEARRING:
POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a LineString or LinearRing");
-/* FIXME: dunno how to represent an empty linestring */
-if ( GEOSisEmpty(geom) )
- return (LWGEOM*)lwcollection_construct_empty(COLLECTIONTYPE, SRID, want3d, 0);
+ if ( GEOSisEmpty(geom) )
+ return (LWGEOM*)lwline_construct_empty(SRID, want3d, 0);
cs = GEOSGeom_getCoordSeq(geom);
pa = ptarray_from_GEOSCoordSeq(cs, want3d);
case GEOS_POLYGON:
POSTGIS_DEBUG(4, "lwgeom_from_geometry: it's a Polygon");
-
-/* FIXME: dunno how to represent an empty polygon */
-if ( GEOSisEmpty(geom) )
- return (LWGEOM*)lwcollection_construct_empty(COLLECTIONTYPE, SRID, want3d, 0);
+ if ( GEOSisEmpty(geom) )
+ return (LWGEOM*)lwpoly_construct_empty(SRID, want3d, 0);
ngeoms = GEOSGetNumInteriorRings(geom);
ppaa = lwalloc(sizeof(POINTARRAY *)*(ngeoms+1));
g = GEOSGetExteriorRing(geom);
#124a|COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,30 5),CIRCULARSTRING(30 5,34 56,67 89))
ERROR: incontinuous compound curve
HINT: "...0 6),CIRCULARSTRING(30 5,34 56,67 89)" <-- parse error at position 85 within geometry
-#145a|0107000020E610000000000000
+#145a|0103000020E610000000000000
#145b|0
#146|0|t|GEOMETRYCOLLECTION(LINESTRING(0 0,-1 -1),MULTIPOINT(1 2,2 3))
ERROR: Invalid hex string, length (267) has to be a multiple of two!