[FWTools] ESRI shapefile
Frances Collier
fcollier at preparedresponse.com
Tue Sep 27 18:56:06 EDT 2005
Is there a known bug when translating data from postgreSQL to an ESRI
shapefile?
I am trying to do it using a sql statement as follows:
>ogr2ogr -f "ESRI Shapefile" skamaniacounty.shp "PG:dbname=dcmms
host=localhost user=postgres password=password" -sql "select * from
wacounties a, wacounties b where b.county_nm='Skamania' and a.wkb_geometry
&& b.wkb_geometry and distance(a.wkb_geometry, b.wkb_geometry) = 0;"
After a few moments I get a Microsoft Windows error report popup stating
that ogr2ogr.exe has encountered a problem and needs to close. However if I
execute the exact same line replacing "*" with "a.county_nm" it works. It's
not the "*" because I also tried spelling out all of the field names. Here
is a list of the fields in the wacounties: ogc_fid :: int, wkb_geometry ::
geometry, area :: float, perimeter :: float, wacounties :: int, wacounti_1
:: int, county_cod :: int, county_fip :: varchar, county_nm :: varchar,
ecy_region :: varchar, air_region :: varchar, shape_leng :: float,
shape_area :: float. I am assuming it is because of either the ogc_fid field
or the wkb_geometry field but I have no idea why. Any ideas would be great.
Thank you,
Frances Collier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20050927/3d689927/attachment.html
More information about the FWTools
mailing list