I'd need to navigate through and mark non-geographical maps.

I used Leaflet.js example to do that (http://leafletjs.com/examples/crs-simple/crs-simple.html), and it's working, but my images would be very large and then have to be served as tiles.

So I installed a local OpenStreetMap server with Mapnik and OpenGIS etc, but I can't seem to find a way to create a .pbf file from my image, hence I can't create nor import the "map" using osm2pgsql...

Is there any way to achieve that ?

  • 1
    What do you mean non-geographical? Is it that the rasters aren't geolocated/georeferenced? – Michael Stimson Jun 20 '17 at 4:58
  • Yep, I need to navigate through a huge image with high zoom level (medical image) and be able to mark spots. Leaflet allows that, but I can't serve my image as tiles, so it's reaaaaally slow :'( – Sylzys Jun 20 '17 at 6:31
  • 1
    You can't convert a raster image to a vector map (PBF). – scai Jun 20 '17 at 6:33
  • If you are trying to create tiles from a big image (jpg, tiff, ...) have a look at this post or gdal2tiles respectively gdal2tilesp – bennos Jun 21 '17 at 9:05

Have a look at this plugin to GDAL, which makes it easy to create tiles from a non-geographical image and display it afterwards with leaflet: https://github.com/commenthol/gdal2tiles-leaflet

  • This plugin works great with small images, but a 150Mo image needs more than 30 min to be tiled, and tiles are mixed when you convert 2 images. Any other tool to help me tile large images ? – Sylzys Jun 27 '17 at 19:13
  • Tiling the image takes a while, that is right. Did you also try the multiprocess version of the script, depending on your computer this should speed it up quite a bit. However I don't understand the part with the mixed images. You can tile every image separately and include it also separate from each other to your leaflet map. – tallistroan Jun 27 '17 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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