IMPORT_OSM_TILE
The IMPORT_OSM_TILE command imports a tiled online layer using the OSM, TMS, Google Maps, or Bing Maps tile schema. The following parameters are supported by the command:
- NOTE: All style parameters that are supported by the IMPORT command are also supported by this command.
- OSM_BASE_URL - URL to base of tile source. Can include custom URL variables like %z, %x, %y, or %quad (for Bing-style naming) for defining exactly how the request URL should look. See the add online source dialog for more information and a sample of a custom URL.
- OSM_DESC - description to use for the source
- OSM_FILE_EXT - file extension for tiles, like PNG, JPG, or GMG (for terrain).
- OSM_NUM_ZOOM_LEVELS - specifies the number of the maximum zoom level for the source. Note if this is a built-in source you don't need to provide this, just leave it off and the default will be used.
- TILE_SIZE - specifies the size in pixels of each tile. For example if the source uses 512x512 tiles, add TILE_SIZE=512. The default is 256.
- DETAIL_MULT - specifies the detail scale to use when deciding while zoom level to get for the source. The calculated draw/export resolution is divided by this value to get the resolution to access the data at. For example, a value of DETAIL_MULT=0.5 means the source will be displayed from twice the detail it normally would, while DETAIL_MULT=2 would pull at half the resolution (i.e. much faster access).
- LEVEL0_TILECOLS - Number of tile columns across the lowest zoom level. By default this is 1 for a single tile covering the entire world.
- LEVEL0_TILEROWS - Number of tile rows at the lowest zoom level. By default this is 1 for a single tile covering the entire world.
- SAMPLE_TYPE - Specifies the format of samples in BIL files for a terrain-based layer. Typical values will be F32 for 32-bit floats, S32 for 32-bit signed integer, or S16 for 16-bit signed integer.
Specify Tiling Type
By default the OSM tile naming schema is assumed, but you can use the parameters below to specify Google Maps or TMS tiling. If you specify a full custom URL in OSM_BASE_URL then the tiling schema doesn't matter as much since the URL defines the naming.
- SOURCE_TYPE - specifies the tile schema for the online source. This is supported in v16.2.4 and later and takes precedence over the deprecated OSM_IS_GOOGLE_MAPS and OSM_IS_TMS parameters. The acceptable values are:
- GMAP - Google Maps tiles
- OSM - OSM tiles
- TMS - TMS tiles
- VWORLD_DEM - VWorld DEM terrain in BIL tiles, tiles increase from bottom up
- OSM_IS_GOOGLE_MAPS - add OSM_IS_GOOGLE_MAPS=YES to indicate the source uses the Google Maps tiling scheme
- OSM_IS_TMS - add OSM_IS_TMS=YES to indicate the source uses the TMS tiling scheme
Specify Bounds for Layer
Use the parameters below to define the bounding box to import from the source:
- ADDRESS - address to download data near. Use along with RADIUS to specify the bounds with an address and radius rather than a specific bounding box.
- RADIUS - radius in kilometers around ADDRESS to search.
- LAT_LON_BOUNDS - specifies the bounds to import in latitude/longitude degrees relative to the WGS84 datum. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of westmost longitude, southernmost latitude, easternmost longitude, northernmost latitude.
- LAYER_BOUNDS - specifies that the import should use the bounds of the loaded layer(s) with the given filename. For example, to import to the bounds of the file "c:\test.tif", you would use LAYER_BOUNDS="c:\test.tif". Keep in mind that the file must be currently loaded.
- LAYER_BOUNDS_EXPAND - specifies that the operation should expand the used LAYER_BOUNDS bounding box by some amount. The amount to expand the bounding rectangle by should be specified in the current global projection. For example, if you have a UTM/meters projection active and want to expand the bounds retrieved from the LAYER_BOUNDS parameter by 100 meters on the left and right, and 50 meters on the top and bottom, you could use LAYER_BOUNDS_EXPAND="100.0,50.0". You can also specify a single value to apply to all 4 sides, or supply 4 separate values in the order left,top,right,bottom.
SAMPLE
Here is an example of an IMPORT_OSM_TILE command that pulls in MapQuest OpenStreetMap data within 5 km of Blue Marble's headquarters:
IMPORT_OSM_TILE OSM_BASE_URL="http://otile1.mqcdn.com/tiles/1.0.0/osm/" OSM_DESC="MapQuest OpenStreetMap Worldwide Street Maps" \ \ OSM_FILE_EXT="png" OSM_NUM_ZOOM_LEVELS="19" ADDRESS="77 Water St, HALLOWELL, ME" RADIUS="5" \ CENTER_LABEL="Blue Marble Geographics" CENTER_LABEL_POS="-69.7908786,44.2859022"