[gdal-dev] ogr2ogr.java s57 conversion
Oliver Wesp
oliver.wesp at gmail.com
Tue Jun 21 13:08:11 EDT 2011
Hello Robert,
Try setting the GDAL_DATA and OGR_S57_OPTIONS environment variables
within your java environment.
http://www.gdal.org/ogr/drv_s57.html
Best regards,
Oliver
2011/6/20 Robert Naugle <bobbynaugs at gmail.com>:
> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list