[gdal-dev] ogr2ogr.java s57 conversion
Robert Naugle
bobbynaugs at gmail.com
Mon Jun 20 16:34:00 EDT 2011
If I use the GDAL 1.7.3 version of ogr2ogr from the command line, like:
* ogr2ogr -skipfailures /path/to/dest /path/to/source*
it works great. I get a directory 'dest' full of shapefiles, one for each
layer in the source S-57 chart file. (in my case, 21 different layers)
I am trying to use ogr2ogr.java to do the same thing, like:
* String[] args = new String[3];*
* args[0] = "-skipfailures";*
* args[2] = "/path/to/dest";*
* args[3] = "/path/to/source";*
* ogr2ogr.main(args);*
but I only get three shapefiles in my destination directory, Area, Point,
and Line. Adding a printout to the ogr2ogr.java code reveals that
<datasource>.GetLayerCount() returns 5.
Furthermore, if I try to convert only one layer of the chart on the command
line, as in:
*ogr2ogr -skipfailures /path/to/dest /path/to/source DEPCNT*
it results in one shapefile in the destination directory. The java version
complains:
*String[] args = new String[4];*
* args[0] = "-skipfailures";*
* args[2] = "/path/to/dest";*
* args[3] = "/path/to/source";*
* args[4] = "DEPCNT";*
* ogr2ogr.main(args);*
* ...*
* FAILURE: Couldn't fetch advertised layer DEPCNT!*
*
*
Can anyone shed some light on this behavior? Is my ogr2ogr.java, which was
compiled using GDAL 1.8.0, somehow different? Is this expected behavior?
Should I change my configuration options before building?
Thanks for any and all information...
~Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110620/557cca57/attachment.html
More information about the gdal-dev
mailing list