Skip to main content
Question

How to get Bing tiles into MapnikRasterizer?

  • March 24, 2025
  • 1 reply
  • 41 views

tb09114
Supporter
Forum|alt.badge.img+22

I need to get data from my Bing subscription into the MapnikRasterizer. At least that how I think it should be done.

It works of course in the preview because I made the Bing maps available through the options. But as I see it for the MapnikRasterizer I will have to provide the background as an image and I am struggeling to get the Bing data into my workflow.
 

background settings in MapnikRasterizer

How can I get the Bing data into the MapnikRasterizer?

1 reply

tb09114
Supporter
Forum|alt.badge.img+22
  • Author
  • Supporter
  • March 27, 2025

I managed to get the Bing tiles into MapnikRasterizer using a PythonCaller.

Some advice along the way when doing it this way.

  • Bing data use EPSG:4326 not EPSG:3857!
  • you need to generate a 'quadkey’ for each tile within a bounding box and  to do so you have to provide the zoom level you are aiming at.
  • you can calculate the zoom level based on your bounding box and the desired pixel resolution of your output
  • if you have multiple tiles that you need to mosaic to the final picture, you want to use the tile coordinates (you can extract them from the quadkey if needed).
  • using the coordinates and the tile (response of your request to Bing) you should store those in a list.
    I stored them in a list of tuples. You will need to sort the list to get the correct order of the tiles for mosaicking.
  • Before you can do the mosaicking you need:
    • max- and min height of the individual tile
    • max- and min width of the individual tile
    • numbers of tile in each dimension
  • and then you arrange the tile in their order, pasting them into the blank image large enough to contain all tiles.

The resulting image has no coordinate system at this time.

I am thinking about creating a transformer for the Hub for this...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings