[gdal-dev] MapInfo TAB append issue
simon.okeefe at groundtruth.com.au
Tue Apr 20 19:09:08 EDT 2010
Thanks for your responses, Ross and Daniel.
Looks like appending TABs is out of the question.
I did some further testing but I can't recreate the exact issue I
described that would generate a new SHP file (I swear it did it when I
first wrote about it). It now just says "FAILURE: Unable to open
existing output datasource...", whether I specify a folder or file
name as the datasource.
Anyway, the issue still exists that if you attempt to append to a SHP
file to a TAB file that's in the same folder, the SHP file will append
itself to itself.
ogr2ogr -f "MapInfo file" C:\Temp C:\Temp\states.shp
ogr2ogr -f "MapInfo file" C:\Temp C:\Temp\states.shp -append
(If you instead specify the full ouput TAB path as the output
datasource, it will just result in the 'FAILURE' message above, and
the source SHP file remains safe.)
It could be a trap for some unsuspecting poor soul.
On 20 April 2010 08:55, King, Ross <rsking at geomatic.com.au> wrote:
> I'd say that's because OGR will use the drivers in order to 'guess'
> which driver to use to open the directory. I thought that the MapInfo
> driver was only read/write (ie no incremental update), so maybe it's
> dismissing the "MapInfo File" declaration as it's not able to append?
> You could try explicitly specifying the MapInfo file
> 'C:\Output\states.tab', rather than just using the directory.
> -----Original Message-----
> From: gdal-dev-bounces at lists.osgeo.org
> [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Simon O'Keefe
> Sent: Monday, 19 April 2010 11:22 PM
> To: gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] MapInfo TAB append issue
> I'd like to report some unexpected behaviour from ogr2ogr
> (FWTools2.4.7 in Windows 7) when attempting to append to a MapInfo TAB
> To recreate this issue, I first run the following to create a new
> MapInfo table from a SHP file:
> ogr2ogr -f "MapInfo file" C:\Output C:\Input\states.shp
> This successfully generates a MapInfo table at C:\Output\states.tab.
> Now, I attempt to append the source data to the new table (not a
> realistic example, I know):
> ogr2ogr -f "MapInfo file" C:\Output C:\Input\states.shp -append
> What happens here is that, instead of appending to the MapInfo table,
> it generates a new SHP file: C:\Output\states.shp.
> I experience this behaviour whether the source is SHP or TAB. The
> slightly dangerous element to this issue is that if the input and
> output folders are the same, the source file (if it's SHP) gets
> appended to itself.
> Has anyone experienced this issue?
> Simon O'Keefe
> Geospatial Systems Developer
> Groundtruth Mapping Systems
> Level 2, 140 Queen Street
> Melbourne VIC 3000 Australia
> phone: +61 409 413 890
> email: simon.okeefe at groundtruth.com.au
> web: http://www.groundtruth.com.au
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev