[Xastir] PostGIS shapefile dumps

Erik G. Burrows eburrows at erikburrows.com
Tue Feb 3 20:42:07 EST 2004


I'm poking around with PostGIS as a way to make a shapefile map of some
of my GPS waypoints and tracks. Using GPSman and a Perl script, I have
my waypoints in a PostGIS table.

With PostGIS's pgsql2shp utility or OGL's ogr2ogr utility, I can
generate a shapefile from my PostgreSQL 'waypoints' table, but xastir
will not load the map.

Using either utility to generate the shapefile, xastir complains about
'extent incorrect'. With pgsql2shp it says both the 'top' and 'bottom'
extents are incorrect, and with ogr2ogr, it's just the 'bottom' extent.

The commands I'm using to create the shapefiles are:
ogr2ogr waypoints.shp "PG:dbname=eburrows user=eburrows password=xxxxxx"
waypoints

and

pgsql2shp -f waypoints.shp -u eburrows -P xxxx eburrows waypoints

Both utilities create the .shp, .shx and .dbf files. I've manually
confirmed that at least the pgsql2shp utility is working by feeding the
shapefile output into shp2pgsql and verifying the output.

An example of the error from the pgsql2shp shapefile is:
index_restore_from_file: bottom extent incorrect 74678400 in map name:
Waypoints/waypoints.shp
 
index_restore_from_file: top extent incorrect 74678400 in map name:
Waypoints/waypoints.shp

I put the shapefiles up on the web, in case it helps:
http://www.erikburrows.com/files/ogr2ogr
http://www.erikburrows.com/files/pgsql2shp


Thanks for any insight!



More information about the Xastir mailing list