Skip to main content

Hi,

I am trying to use a static map fetcher for OSM. There are a number of these on Github but they all focus on using a center point and zoom level where the output is always provided as an unreferenced PNG. I'm basically looking for a bounding box OSM StaticMapFetcher rather than a center point one. This is proving tricky based on angle and scaling issues.

Because I know the center point coordinates and OSM provides the scaling values with the angle offset, it should be relatively straightforward to create the top left coordinate pair and then use the RasterGeoreferencer from there. However I am have trouble with the scaling and there's also some angle warping on the raster which makes the labels illegible.

Is there a model that can be used within FME to fix scaling issues like these for OSM? I am guessing this is something to do with distance from the equator as Ireland is ~52degs where this sample is based and this would differ with examples closer to the equator, and so on.

Ideally there would be a StaticMapFetcher for OSM as well as the Google Maps version and the georeferencing would be maintained through the output. I wish my raster skills were up to that!

Hi @b5

The scale factor for the zoom levels is only valid for the Web Mercator (EPSG:3857) projection, which is fairly inaccurate for distance measurement at the higher latitudes.

Please change the Coordinate system in your Reprojector and CoordinateSystemSetter to EPSG:3857 to get the tile to align correctly. You can reproject after aligning if you want the data output in another coordinate system.


Reply