[postgis-users] strange beahviuors by GEOS

strk strk at keybit.net
Wed Mar 10 10:32:47 PST 2004


On Tue, Feb 24, 2004 at 09:42:24AM -0000, Darren Houston wrote:
> 
> Hello James,
> 
> Well, I loaded and dumped your data. This is what I got.
> 
> The loader works fine (PostGIS CVS from February 22, 2004).
> The dumper does not work, gives the mangled polygons just like nuts2 (PostGIS
> CVS from February 22, 2004).
> The dumper from PostGIS 0.7.5 works fine, gives a polygon like nuts2_scotland.
> 
> Therefore, I would say there is a bug in the current PostGIS dumper. You can
> download an earlier version of pgsql2shp, or download PgArc which allows you to

I've found that making pgsql2shp work with WKT instead of WKB
solves the problem. You have to undef USE_WKB in pgsql2shp.c
and recompile it.

Still, I didn't find the bug yet.

--strk;

> connect to and dump shapes from PostgreSQL into ArcView 8.X. See
> http://sourceforge.net/projects/pgarc/
> 
> Hope this helps,
> 
> James S reid <james.reid at ed.ac.uk> said:
> 
> >
> > ------=_NextPart_001_0DE5_01C3FAB5.4DE25910
> > Content-Type: text/plain;
> > 	charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > hi again - thanks for replying - I had a thought overnight and decided =
> > to check the input data by dumping the loaded shapefiles and its heer =
> > the problem lies - the correct number of recorsd are reported in teh =
> > tables and by the loade/dumper but taking the orignal shapefile, loading =
> > it then dumping it to a new shapefile reveals that the .shp itself is =
> > funny and causes the generic 'segmentation violation' in av3.1 and has =
> > lots of offshoots and strange polys in AV8. ive attached a zipfielof teh =
> > original shapefile and the dumped one (nuts2.shp).
> >
> > I guess its to do with being a multipolygon with holes and islands but =
> > Im not sure how to proceed to get the data loaded properly ???
> >
> > cheers
> >
> > james
> >   ----- Original Message -----=20
> >   From: Tyler Mitchell=20
> >   To: PostGIS Users Discussion=20
> >   Sent: Monday, February 23, 2004 6:27 PM
> >   Subject: Re: [postgis-users] strange beahviuors by GEOS
> >
> >
> >
> >   > hi - Im testing a polygon in polygon selection using the within() =
> > operator
> >   > on two tables and have come across some odd return sets. =
> > essentially, I can
> >   > confirm the 'proper' results in arcview (booh hiss) but postgis =
> > (using geos)
> >   > returns 1 less poly for no reason that i can see!
> >
> >   Hi James,=20
> >   Could you show us the SQL you are using?  Ideally a small screenshot =
> > showing the map data would be nice too.
> >
> >
> > -------------------------------------------------------------------------=
> > -----
> >
> >
> >   _______________________________________________
> >   postgis-users mailing list
> >   postgis-users at postgis.refractions.net
> >   http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > ------=_NextPart_001_0DE5_01C3FAB5.4DE25910
> > Content-Type: text/html;
> > 	charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD>
> > <META http-equiv=3DContent-Type content=3D"text/html; =
> > charset=3Diso-8859-1">
> > <META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
> > <STYLE></STYLE>
> > </HEAD>
> > <BODY bgColor=3D#ffffff>
> > <DIV><FONT face=3DArial size=3D2>hi again - thanks for replying - I had =
> > a thought=20
> > overnight and decided to check the input data by dumping the loaded =
> > shapefiles=20
> > and its heer the problem lies - the correct number of recorsd are =
> > reported in=20
> > teh tables and by the loade/dumper but taking the orignal shapefile, =
> > loading it=20
> > then dumping it to a new shapefile reveals that the .shp itself is funny =
> > and=20
> > causes the generic 'segmentation violation' in av3.1 and has lots of =
> > offshoots=20
> > and strange polys in AV8. ive attached a zipfielof teh original =
> > shapefile and=20
> > the dumped one (nuts2.shp).</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> > <DIV><FONT face=3DArial size=3D2>I guess its to do with being a =
> > multipolygon with=20
> > holes and islands but Im not sure how to proceed to get the data loaded =
> > properly=20
> > ???</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> > <DIV><FONT face=3DArial size=3D2>cheers</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> > <DIV><FONT face=3DArial size=3D2>james</FONT></DIV>
> > <BLOCKQUOTE=20
> > style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
> > BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
> >   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
> >   <DIV=20
> >   style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
> > black"><B>From:</B>=20
> >   <A title=3DTMitchell at lignum.com =
> > href=3D"mailto:TMitchell at lignum.com">Tyler=20
> >   Mitchell</A> </DIV>
> >   <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
> >   title=3Dpostgis-users at postgis.refractions.net=20
> >   href=3D"mailto:postgis-users at postgis.refractions.net">PostGIS Users=20
> >   Discussion</A> </DIV>
> >   <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, February 23, 2004 =
> > 6:27=20
> >   PM</DIV>
> >   <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [postgis-users] =
> > strange=20
> >   beahviuors by GEOS</DIV>
> >   <DIV><BR></DIV><BR><FONT size=3D2><TT>> hi - Im testing a polygon =
> > in polygon=20
> >   selection using the within() operator<BR>> on two tables and have =
> > come=20
> >   across some odd return sets. essentially, I can<BR>> confirm the =
> > 'proper'=20
> >   results in arcview (booh hiss) but postgis (using geos)<BR>> =
> > returns 1 less=20
> >   poly for no reason that i can see!<BR></TT></FONT><BR><FONT =
> > size=3D2><TT>Hi=20
> >   James,</TT></FONT> <BR><FONT size=3D2><TT>Could you show us the SQL =
> > you are=20
> >   using?  Ideally a small screenshot showing the map data would be =
> > nice=20
> >   too.</TT></FONT>
> >   <P>
> >   <HR>
> >
> >   =
> > <P></P>_______________________________________________<BR>postgis-users=20
> >   mailing=20
> >   =
> > list<BR>postgis-users at postgis.refractions.net<BR>http://postgis.refractio=
> > ns.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE></BODY></HTML>
> >
> > ------=_NextPart_001_0DE5_01C3FAB5.4DE25910--
> >
> 
> 
> 
> 
> --
> Darren Houston
> 
> _______________________________________________
> 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