** Translation functions */
| 69 | ** Translation functions |
| 70 | */ |
| 71 | static 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 | |
| 90 | static GEOSGeom msGEOSShape2Geometry_multipoint(lineObj *multipoint) |
| 91 | { |
no outgoing calls
no test coverage detected