[FWTools] spurious coordinates being written from PostGIS query
Frank Warmerdam
warmerdam at pobox.com
Fri Feb 17 21:39:11 EST 2006
Brian Timoney wrote:
>
> All:
>
> Here's a head scratcher--we're testing a Python CGI script that queries a
> PostGIS database and takes the results of the query (standard lat/long
> coordinates) and creates a shapefile using the OGR libraries. No coordinate
> transformations are being perfomed.
>
> We've verified that the query produces intended results from the database
>
> With an identical datasource and identical script, his resulting output
> shapefile contains accurate coordinate information. My output shapefile
> contains whacked out spurious coordinates with numbers that end in "E+154" and
> "E-314".
>
> I replicated similar results by issuing a PostgreSQL-->ESRI Shapefile request
> using ogr2ogr from the command line.
>
> I'm hoping someone a lot smarter than I can shed some light on possible causes.
...
> p.s. For those who would suggest I use my buddy's laptop instead of my own for
> client demos, thanks, but I already thought of that workaround.
Brian,
Nothing immediately leaps to mind to explain this. You might want to compare
the version of stuff between your system and your buddies system. Possibly
there is an issue in how multipolygon geometries are produced from some
version of postgis. You might want to check the geometries in your script
to get an idea if they are coming out of the OGR postgis driver corrupt or
if they are getting messed up in the shapefile driver.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the FWTools
mailing list