[postgis-users] gpc lost database connection - how to debug?
Robert W. Burgholzer
rburghol at vt.edu
Thu May 23 04:29:28 PDT 2002
Nicolas,
No problem, you already did a lot of work on this, and it gave me a chance to
deepen my understanding. Thanks for the heads up on that bug.
I will look into the openGIS specification to get the details on multipolygons,
are they simply more than one non-contiguous polygon in the same data entry? I
will see if i can be of assistance in the code development.
As for "multipolygons" imported by shp2pgsql, in my case, and I would guess
many cases using geographic data, the polygons only have 1 ring, unless some
sort of error occured in digitization. If this is the case, a simple test for
number of rings (call to nrings) and if nrings = 1, do a translation to
polygon, no? It seemed as if nothing changed but the geometry type when I used
the "set the_geom = geometryn(the_geom,0)" on my columns, which had nrings = 1,
thus perhaps no translation would be needed for this case. All points seemed
identical afterwards.
I will look into that,, thanks again,
Rob
Nicolas Ribot wrote:
> Hello Robert,
>
> Glad to see you succeeded in using this code.
> As soon as I have some time, I will try to complete it by dealing with
> Multipolygons containing only one geometry (to be able to use polygon tables
> created by shp2pgsql).
>
> Be careful of an existing "bug" (well, a known bug I mean :-) ): If a
> polygon has one of its interior rings touching the polygon's boundary at one
> point, the result of the intersection between this polygon and another one
> can be wrong, as GPC interiors cannot touch exterior polygons.
>
> I was inaccurate in my description of the makefile I modified to compile
> this code: the gpc C code must be compiled too. Sorry for that.
>
> Nicolas.
>
> "Robert W. Burgholzer" wrote:
>
> > Many thanks to Paul and Nicolas, postgis with the gpc geoprocessing
> > routines piggybacked onto it is now running.
> > My problem stemmed from the fact that the Makefile for postgis needed to
> > have a reference for "gpc.o" in it, in order for it to be declared in
> > libpostgis.so.0.7. Running postmaster from the command line, not
> > backgrounded, yielded the appropriate error message which allowed me to
> > figure this out. I am fairly un-familiar with Makefile's etc., so this
> > was a mistake I made.
> > In my breif testing thus far, I have performed an intersection with 2
> > shapes, one containing 4 points, the other with over 80, and the
> > resultant was in the 80 point range.
> >
> > I don;t know if anyone else will find this useful, but it was compiled
> > on a redhat 7.0 box, postgis 0.7, and postgres 7.2, 233 Mhz machine with
> > 64 Megs of ram. The aforementioned intersection completed in the order
> > of magnitude of 10ths of a second.
> >
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list