0

I have searched for this question over one year but it seems its an mysterious question!! I need to generate an offline TMS and corresponding XML file in WGS84 projection to be connected and shown in OpenSceneGraph 3D engine. The elevation file format should be GeoTiff and extracted from the SRTM database.

Note that global mapper has this option (export -> web format -> TMS), but the output is in Mercator projection. On the other hand, activating WGS84 option in global mapper export page would leads to error. I also tried to export in Mercator and reprojecting the tiles' files but the XML file remained in mercator :((

Best,

1 Answer 1

1

The question is a bit unspecific and it would help answering after we see some code (in your question) and test data (place in Dropbox or similar sites and provide the link here). But understandably you are new to this site (we all are at some point in time). Maybe refine your question. Also, re-projecting the tiles is a bad idea (too many of them) but feel free to re-project your input file as needed.

Alternatively, if you use Python, try gdal2tiles for TMS in geodetic projection, as follows. You will need GDAL to be preinstalled for your OS as it runs against Python GDAL binding (gdal2tiles).

import gdal2tiles as gt
options = {'zoom': (0, 4), 'resume': True, 'profile': 'geodetic', 'tile_size': 512, 'tmscompatible': True, 'kml': False, 'nb_processes': 1, 'srcnodata': 0, 'resampling': 'near'} # change to your desired options
gt.generate_tiles(inFile, outDir, **options) # specify your input file 

gdal2tiles supports mercator and geodetic with profile option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.