[gdal-dev] ogr2ogr can work purely with java bindings

Even Rouault even.rouault at spatialys.com
Thu Dec 12 04:17:21 PST 2019


On jeudi 12 décembre 2019 16:58:54 CET Wuyyuru Ravi Teja Krishna wrote:
> Hello,
> Iam using ogr2ogr with java bindings for file conversion. The conversion
> process is successful in the installed system but upon using the generated
> jars and library files in another system for conversion (same os
> configuration) it was not able to succeed since it needs proj installation.
> I would like to request you to suggest about any way so that i can generate
> in a single system and use those files for conversion on any no of systems
> with zero installation? the errors have occured in CentOs,Mac and
> linux.(CentOs is my top priority)
> 
> 
> 
> (If it is possible to use the files generated everywhere i mean like iam
> using gdal.jar and libgdalalljni.26.so, libgdal.26.so (in centos). If any
> more files are needed so that i can conversion doesnt cause any issues even
> on doing in a new system with just java installed)

See
https://proj.org/resource_files.html#where-are-proj-resource-files-looked-for
and
https://github.com/OSGeo/gdal/blob/master/gdal/swig/include/osr.i#L1412

Likely something like that in Java:
org.osgeo.gdal.osr.SetPROJSearchPath("path_to_directory_where_proj_db_is")


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list