]> granicus.if.org Git - postgis/commitdiff
Fixes to single-point-line problem.
authorDavid Blasby <dblasby@gmail.com>
Sat, 21 Jul 2001 00:16:38 +0000 (00:16 +0000)
committerDavid Blasby <dblasby@gmail.com>
Sat, 21 Jul 2001 00:16:38 +0000 (00:16 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@30 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql.c

index d1682faff6b9640e137198e0e5c40b12e2ca6e4d..ef429ae4c9a18bb6bbcd790956c66b9b21104a93 100644 (file)
@@ -647,6 +647,10 @@ main (int ARGC, char **ARGV)
                        }
                        trans++;
                        //end of transaction stuff
+if (j == 5136)
+{
+       j=5136;
+}
 
                        if (dump_format)
                        {
@@ -668,7 +672,14 @@ main (int ARGC, char **ARGV)
                                
                                //check if the next vertice is the start of a new line
                //              printf("\n\nu+1 = %d, next_ring = %d  index = %d\n",u+1,next_ring,obj->panPartStart[next_ring]);
-                               if(((next_ring != -99) && (u+1 == obj->panPartStart[next_ring] )) || u==(obj->nVertices-1) ){
+
+                               if(next_ring==-99 && obj->nVertices ==1){       
+                                       printf("(%.15g %.15g )",obj->padfX[u],obj->padfY[u]);
+                               }else if((next_ring != -99)&& (begin==1) && (u+1 == obj->panPartStart[next_ring]) ){
+                                       printf("(%.15g %.15g )",obj->padfX[u],obj->padfY[u]);
+                                       next_ring++;
+                                       begin=1;
+                               }else if(((next_ring != -99) && (u+1 == obj->panPartStart[next_ring] )) || u==(obj->nVertices-1) ){
                                        printf(",%.15g %.15g ",obj->padfX[u],obj->padfY[u]);
                                        printf(")");