StaticMapOverlayer
From Fmepedia
The Google Static Maps API (http://code.google.com/apis/maps/documentation/staticmaps/) is a web service that serves Google Map tiles for arbitrary locations. Users calling the service provide a location in the form of a lat/lon coordinate, and the service responds with a map tile centered on the provided location. There are options to change the size of the tile, the zoom level, and even a rudimentary ability to place simple markers. Note: Google does not provide the bounding box for the tile, but it is possible to infer the bounding box from the centerpoint and zoom level.
The StaticMapOverlayer transformer overlays a set of features with vector geometry on a static map base layer. Depending on the selected zoom level chosen multiple static map tiles may be retrieved and mosaiked together.
Note: This transformer requires Python to be installed.
| Table of contents |
Input
One or more features with vector geometry. All features will be rasterized and overlaid as a group. Each feature should have a valid fme_colour value in order to facilitate proper rasterization.
Parameters
- Zoom Level: An integer in the range of 0-19, where 0 is the entire world, and 19 is the closest to the earth. Note: Higher zoom levels will result in exponentially larger number of tiles being fetched. The web service may restrict access to users retrieving multiple tiles in a short period of time from the same IP address. Use of the throttle parameters is recommended.
- Throttle Threshold: The number of tiles that will be downloaded without throttling applied. Subsequent tiles will be subject to a delay between tile fetches.
- Throttle Delay: The number of seconds to delay between tile fetches, if the throttle threshold has been reached.
- Google API Key: Required for access to the service. Access keys are freely available; sign up (http://code.google.com/apis/maps/signup.html) at Google's site if you do not already have a key.
Output
- RASTER: A feature with raster geometry corresponding to rasterized vector features overlaid on the static map.
- TITLES: The tiles downloaded from the map service.
The CRS of all the features is SPHERICAL_MERCATOR.
Example
This example demonstrates a set of features with polygon geometry being rasterized and overlaid on a static map tile base map. The resulting overlaid raster and the downloaded tiles are output to Google Earth.
The resulting raster image.
And, the KML displayed in Google Earth
Notice
Use of the Google Static Maps service is subject to the Google Maps Terms of Service. Safe Software provides this transformer solely as a technology demonstration, and makes no representation or warrantee regarding its usage. End users are individually obligated to ensure that their use of this transformer complies with the aforementioned Terms of Service.
Related
See also the StaticMapFetcher transformer retrieves individual static map tiles corresponding to specified locations.
