Opened 13 years ago

Closed 13 years ago

#4218 closed defect (worksforme)

ogr2ogr -select case sensitive

Reported by: gfleming Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: unspecified
Severity: normal Keywords:
Cc:

Description

I've been using the same ogr2ogr command for a year to write shapefiles to PostGIS using lowercase select

-select "id,region,country,parts"

Recently some shapefiles have been converting with null values and I discovered that using an uppercase select fixes the problem.

export PGCLIENTENCODING=latin1; ogr2ogr -skipfailures -update -overwrite -select "ID,REGION,COUNTRY,PARTS" -f "PostgreSQL" PG:"host=localhost user=*** dbname=test password=***" -nln ogr_regions -nlt 'MULTIPOLYGON' -a_srs "EPSG:4326" -lco GEOMETRY_NAME=the_geom "gn_a_regions.shp"

I can't tell what the difference is between shapefiles that work with lowercase and those that don't but surely ogr2ogr -select should not be case sensitive?

an offending shapefile is attached.

GDAL 1.8.0 on Ubuntu 11.04 amd64.

Attachments (1)

gn_a_regions.zip (562.3 KB ) - added by gfleming 13 years ago.

Download all attachments as: .zip

Change History (2)

by gfleming, 13 years ago

Attachment: gn_a_regions.zip added

comment:1 by Even Rouault, 13 years ago

Resolution: worksforme
Status: newclosed

I've just tested with your dataset and command : this works perfectly for me with GDAL 1.8.0. ogr2ogr -select is not case sensitive, so I guess you must hit another unrelated issue. Closing. If you can characterize better, please reopen.

Note: See TracTickets for help on using tickets.