]> granicus.if.org Git - postgis/commitdiff
Fix GBT#79: shp2pgsql does not honor -s (also known as Mark accidentally missed the...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Wed, 3 Dec 2008 17:12:54 +0000 (17:12 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Wed, 3 Dec 2008 17:12:54 +0000 (17:12 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3359 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql.c

index 189d3f5755aaeda420f91d4e1d783135cc30c902..5f3c7ef7cb64ce11710939377052594e1212e7fa 100644 (file)
@@ -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