Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4268 closed defect (fixed)

Shapefile export inconsistency

Reported by: peifer Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: Utilities Version: svn-trunk
Severity: normal Keywords: FileGDB
Cc:

Description

I am not sure if this is a bug, a feature or rather nothing -- in any case, I noted the following small inconsistency. When exporting from FileGDB to shapefile via -where: a shapefile is created in the current directory as expected, but when using -sql "...": a directory is created and I do not seem to have control over the actual shapefile name. See below.

$ ogr2ogr out1.shp clc06_rel15_v10.gdb cha00 -where "area_ha < 1"
$
$ ogr2ogr out2.shp clc06_rel15_v10.gdb -sql "select * from cha00 where area_ha < 1"
$
$ ls -l out*
-rw-r--r-- 1 peifer rmt 77188 Sep 29 12:52 out1.dbf
-rw-r--r-- 1 peifer rmt   365 Sep 29 12:52 out1.prj
-rw-r--r-- 1 peifer rmt 29196 Sep 29 12:52 out1.shp
-rw-r--r-- 1 peifer rmt  1212 Sep 29 12:52 out1.shx

out2.shp:
total 120
-rw-r--r-- 1 peifer rmt 77188 Sep 29 12:53 cha00.dbf
-rw-r--r-- 1 peifer rmt   365 Sep 29 12:53 cha00.prj
-rw-r--r-- 1 peifer rmt 29196 Sep 29 12:53 cha00.shp
-rw-r--r-- 1 peifer rmt  1212 Sep 29 12:53 cha00.shx
$

Change History (2)

comment:1 by Even Rouault, 13 years ago

Component: defaultUtilities
Milestone: 1.9.0
Resolution: fixed
Status: newclosed

r23131 : ogr2ogr: avoid 'ogr2ogr out.shp multilayerindataset -sql "select * from alayer"' to create a directory (trunk only fix, limit the scope of r21766) (#4268)

comment:2 by Even Rouault, 13 years ago

r23138 /trunk/ (4 files in 4 dirs): Resync ogr2ogr.py and ogr2ogr.java; Add test for fix of #4268

Note: See TracTickets for help on using tickets.