| 109 | } |
| 110 | |
| 111 | static GEOSGeom msGEOSShape2Geometry_line(lineObj *line) |
| 112 | { |
| 113 | int i; |
| 114 | GEOSGeom g; |
| 115 | GEOSCoordSeq coords; |
| 116 | |
| 117 | if(!line) return NULL; |
| 118 | |
| 119 | coords = GEOSCoordSeq_create(line->numpoints, 2); /* todo handle z's */ |
| 120 | if(!coords) return NULL; |
| 121 | |
| 122 | for(i=0; i<line->numpoints; i++) { |
| 123 | GEOSCoordSeq_setX(coords, i, line->point[i].x); |
| 124 | GEOSCoordSeq_setY(coords, i, line->point[i].y); |
| 125 | /* GEOSCoordSeq_setZ(coords, i, line->point[i].z); */ |
| 126 | } |
| 127 | |
| 128 | g = GEOSGeom_createLineString(coords); /* g owns the coordinates in coords */ |
| 129 | |
| 130 | return g; |
| 131 | } |
| 132 | |
| 133 | static GEOSGeom msGEOSShape2Geometry_multiline(shapeObj *multiline) |
| 134 | { |
no outgoing calls
no test coverage detected