From: Mark Cave-Ayland Date: Wed, 3 Dec 2008 17:12:54 +0000 (+0000) Subject: Fix GBT#79: shp2pgsql does not honor -s (also known as Mark accidentally missed the... X-Git-Tag: 1.4.0b1~458 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47029e9ebcb60c628c6ae452a267e5a7f4c5c6c8;p=postgis Fix GBT#79: shp2pgsql does not honor -s (also known as Mark accidentally missed the sr_id from the geometry constructors) git-svn-id: http://svn.osgeo.org/postgis/trunk@3359 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/shp2pgsql.c b/loader/shp2pgsql.c index 189d3f575..5f3c7ef7c 100644 --- a/loader/shp2pgsql.c +++ b/loader/shp2pgsql.c @@ -866,13 +866,13 @@ InsertLineString() } /* Generate the LWLINE */ - lwmultilinestrings[u] = lwline_as_lwgeom(lwline_construct(-1, &bbox, dpas[u]->pa)); + lwmultilinestrings[u] = lwline_as_lwgeom(lwline_construct(sr_id, &bbox, dpas[u]->pa)); } /* If using MULTILINESTRINGs then generate the serialized collection, otherwise just a single LINESTRING */ if (simple_geometries == 0) { - lwcollection = lwcollection_construct(MULTILINETYPE, -1, &bbox, obj->nParts, lwmultilinestrings); + lwcollection = lwcollection_construct(MULTILINETYPE, sr_id, &bbox, obj->nParts, lwmultilinestrings); serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); } else @@ -1156,14 +1156,14 @@ InsertPolygon(void) } /* Generate the LWGEOM */ - lwpoly = lwpoly_construct(-1, &bbox, ring_total, pas[pi]); + lwpoly = lwpoly_construct(sr_id, &bbox, ring_total, pas[pi]); lwpolygons[pi] = lwpoly_as_lwgeom(lwpoly); } /* If using MULTIPOLYGONS then generate the serialized collection, otherwise just a single POLYGON */ if (simple_geometries == 0) { - lwcollection = lwcollection_construct(MULTIPOLYGONTYPE, -1, &bbox, polygon_total, lwpolygons); + lwcollection = lwcollection_construct(MULTIPOLYGONTYPE, sr_id, &bbox, polygon_total, lwpolygons); serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); } else @@ -1247,14 +1247,14 @@ InsertPoint(void) dynptarray_addPoint4d(dpas[u], &point4d, 0); /* Generate the LWPOINT */ - lwmultipoints[u] = lwpoint_as_lwgeom(lwpoint_construct(-1, NULL, dpas[u]->pa)); + lwmultipoints[u] = lwpoint_as_lwgeom(lwpoint_construct(sr_id, NULL, dpas[u]->pa)); } /* If we have more than 1 vertex then we are working on a MULTIPOINT and so generate a MULTIPOINT rather than a POINT */ if (obj->nVertices > 1) { - lwcollection = lwcollection_construct(MULTIPOINTTYPE, -1, &bbox, obj->nVertices, lwmultipoints); + lwcollection = lwcollection_construct(MULTIPOINTTYPE, sr_id, &bbox, obj->nVertices, lwmultipoints); serialized_lwgeom = lwgeom_serialize(lwcollection_as_lwgeom(lwcollection)); } else