MCPcopy Create free account
hub / github.com/MapServer/MapServer / msGEOSShape2Geometry_point

Function msGEOSShape2Geometry_point

mapgeos.c:71–88  ·  view source on GitHub ↗

** Translation functions */

Source from the content-addressed store, hash-verified

69** Translation functions
70*/
71static GEOSGeom msGEOSShape2Geometry_point(pointObj *point)
72{
73 GEOSCoordSeq coords;
74 GEOSGeom g;
75
76 if(!point) return NULL;
77
78 coords = GEOSCoordSeq_create(1, 2); /* todo handle z's */
79 if(!coords) return NULL;
80
81 GEOSCoordSeq_setX(coords, 0, point->x);
82 GEOSCoordSeq_setY(coords, 0, point->y);
83 /* GEOSCoordSeq_setY(coords, 0, point->z); */
84
85 g = GEOSGeom_createPoint(coords); /* g owns the coordinate in coords */
86
87 return g;
88}
89
90static GEOSGeom msGEOSShape2Geometry_multipoint(lineObj *multipoint)
91{

Callers 2

msGEOSShape2GeometryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected