I'm currently using MapTiler Pro console version, called from C# code as process with the following parameters:

-geodetic -nodata 0 0 0 -f png32 -o result/ -tms -resampling bilinear -srs "+proj=longlat +datum=WGS84 +no_defs" -zoom 8 12 source.tif

Is there any alternatives to MapTiler for using from code? I tried vips's dzsave, but output differs from needed and it lacks some functions, like tiling exact levels.

I also use gdal's c# bindings, but it lacks gdal2tiles methods, which, from what I've found, is the only alternative.

  • Gdal2tiles is Python script. Perhaps you can call it from C# stackoverflow.com/questions/11779143/….
    – user30184
    Nov 6, 2018 at 20:25
  • Using python scripts means installing python on target PC, which is not an option in my case. I'm looking for portable solution if possible.
    – Gigas002
    Nov 6, 2018 at 21:16
  • If you can spend some time you may be able to rewrite gdal2tiles.py with C#.
    – user30184
    Nov 6, 2018 at 21:31
  • Or freeze it into an executable using e.g. pyinstaller
    – mikewatt
    Nov 7, 2018 at 0:43
  • @gberard thanks, that's a good idea, I'm gonna give it a try.
    – Gigas002
    Nov 8, 2018 at 21:35

1 Answer 1


So I ended up rewriting gdal2tiles.py. Freezing it into executable wasn't very successful, it somehow lacks multithreading bindings. Here's my repository of Gdal2Tiles on C#, feel free to use it, but be aware, that in current state it's working only like gdal2tiles.py with the following command line args:

input.tif outputDirectory -s EPSG:4326 -p geodetic -r cubicspline --tmscompatible -z 10-14

I plan on developing it further later, so stay tuned!


Your Answer

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

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