#1465 closed defect (fixed)
Better error report when src and dst datasets are the same
Reported by: | Mateusz Łoskot | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Utilities | Version: | 1.4.0 |
Severity: | minor | Keywords: | ogr2ogr |
Cc: | warmerdam, Even Rouault |
Description (last modified by )
Here is example of ogr2ogr use case in which a user specifies the same data set for both: source and destination:
ogr2ogr -s_srs EPSG:2180 -t_srs EPSG:2173 D:\OCK_region.shp D:\OCK_region.shp ERROR 1: D:\OCK_region.shp is not a directory. ESRI Shapefile driver failed to create D:\OCK_region.shp
The error message is unclear and user may be confused because it's hard to find out what is the actual reason of the problem.
Enhancement proposal is to make this error message more meaningful.
Change History (11)
comment:2 by , 17 years ago
Component: | default → OGR_SF |
---|---|
Description: | modified (diff) |
Milestone: | → 1.5.0 |
Priority: | highest → normal |
Version: | unspecified → 1.4.0 |
comment:3 by , 17 years ago
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:4 by , 17 years ago
Keywords: | Shapefile added |
---|
comment:5 by , 17 years ago
Milestone: | 1.5.0 → 1.6.0 |
---|
comment:6 by , 17 years ago
Component: | OGR_SF → Utilities |
---|---|
Keywords: | ogr2ogr added; Shapefile removed |
Resolution: | → fixed |
Status: | assigned → closed |
comment:7 by , 17 years ago
Cc: | added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Type: | enhancement → defect |
Even,
I don't think the change applied is appropriate. It is perfectly reasonable, for instance, to do an ogr2ogr command from and to the same postgres database instance. I think the change needs to be backed out and some additional consideration given to cases where these is appropriate and not appropriate.
For one thing, the source and destination should only be allowed to be the same when we are operating in -update mode (updating an existing datasource instead of opening a new one).
I'm tempted to suggest that if the source and destination are the same we ought to only open one datasource for both roles, but in fact some datasources may not operate well in that situation (reading from one layer at the same time we are writing to another layer) so I hesitate to push that idea.
comment:8 by , 17 years ago
Hum, I didn't think that it could be that complex. Change reverted in r13606.
comment:9 by , 15 years ago
Milestone: | 1.6.4 |
---|---|
Owner: | changed from | to
Status: | reopened → new |
I'll take this back to account for it being effectively unassigned. I don't think the issue is pressing, so no milestone.
Fix commited in trunk in r13605