GDAL is the way to go. There is no official Android build that I know of, but some people have been successful in launching it on Android. For example, Nutiteq has an assembly in the libs folder of its AdvancedMap3D sample project. Put the contents of both armeabi folders in the lib project folder and you can access the GDAL packages.
Then check out GDAL in Java . Check out the gdalinfo.java sample to understand how to download and learn parts of the GDAL dataset. To repurpose your data set, you will do something according to:
SpatialReference sr = new SpatialReference(); sr.ImportFromProj4("+proj=merc +datum=WGS84"); String result[] = new String[1]; sr.ExportToPrettyWkt(result, 1); String oldProjection = mDataset.getProjection(); String newProjection = result[0]; Dataset newDataset = gdal.AutoCreateWarpedVRT(mDataset, oldProjection, newProjection, gdalconst.GRA_NearestNeighbour, 0.0); Dataset savedDataset = mDriver.CreateCopy(outpath, newDataset, 0, new String[] { "COMPRESS=LZW", "PREDICTOR=2" }, null, null); newDataset.delete(); savedDataset.delete();
You may need to make a few adjustments, but this should make you most of the way.
source share