[gdal-dev] Issues when exporting from PostGIS to shape

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Wed Mar 10 06:35:05 EST 2010


Dear GDAL devs

Since I'm new to OGR, the following issues may be caused by my complete 
ignorance. Anyway, the story goes like this:


I have a PostGIS tabel, like this:
CREATE TABLE impexp_shp.points (
id serial,
name varchar(80),
CONSTRAINT points_pkey PRIMARY KEY (id)
);

which contains the following:

INSERT INTO impexp_shp.points (name, the_geom)
VALUES
('così è, Straße, öäü ÖÄÜ è é ò ó ù ú ì í €', ST_GeomFromText('POINT(1 
1)',-1));

I try to export this as a shape file:

ogr2ogr -f 'ESRI Shapefile' '/tmp/ut_table_with_geom/points' 
PG:'host=postgis user=unittest dbname=unittest password=unittestx' 
'impexpshp.points'

And get the attached shape file.

I have the following issues with the result:

i) The .dbf in this shape file does not contain the column "id".

ii) the resulting shape file has a language identifier set to 57 (ANSI), 
but it really is UTF-8 [1][2].

GDAL is version 1.6.3. PostGIS is version 1.4.1. platform is CentOS 5, 
64 bit.

Regards,

Peter

[1] 
http://support.esri.com/index.cfm?fa=knowledgebase.techArticles.articleShow&d=21106
[2] http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm

-- 
 
Dott. Peter Hopfgartner
 
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgartner at r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

XING : http://www.xing.com/go/invita/8917535 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: points.zip
Type: application/zip
Size: 859 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100310/1d6ba147/points.zip


More information about the gdal-dev mailing list