On mardi 3 janvier 2017 20:45:58 CET Vladimir Sandoval wrote: > Greetings: > Referencing this blog > post http://erouault.blogspot.com/2015/10/gdal-and-ogr-utilities-as-library > .html I need to use the "new" Translate method in the GDAL Java API. > However, the Translate method is not even in GDAL2.1.0 available at Maven > (TranslateOptions is in there, but not Translate). The Windoze versions of > GDAL available at GISInternals also do not seem to have the Translate > method, although I did find one version that has it, I've added it to an > IntelliJ project as a library. > Question1: Is it "supposed" to be available at this time?
To be honest, I didn't try but it looks like the method is available : http://gdal.org/java/org/gdal/gdal/gdal.html#Translate(java.lang.String,%20org.gdal.gdal.Dataset,%20org.gdal.gdal.TranslateOptions) and I can see it in the generated .java files from swig files. > > There is little/no documentation on how to use the Translate method. (Contributions in 2017 are as welcome as in previous years ! Hint: the file to edit is swig/java/javadoc.java and the the doc is built with swig/java/make_doc.sh) The general principles are exposed here https://trac.osgeo.org/gdal/wiki/rfc59.1_utilities_as_a_library and should be transposable to other languages. > I'm > guessing here, but the way I'm trying to use it is: > Vector<String> optionsVector = new Vector<>(); > optionsVector.add("of PNG"); > optionsVector.add("outsize 128 128"); try optionsVector.add("-of"); optionsVector.add("PNG"); optionsVector.add("-outsize"); optionsVector.add("128"); optionsVector.add("128"); Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
