IMPORT_REST_FEATURES

The IMPORT_REST_FEATURES command is used to import vector features from a REST data source. Since it is an import command, it uses the common labeling and style parameters. The following required parameters are specific to the IMPORT_REST_FEATURES command:

  • SOURCE_DESC - text description of source. Should match name from the online source dialog. Used to match to a source in the source list if no match based on URL could be found.
  • SOURCE_TYPE - indicates the type of data being downloaded. This parameters must be SOURCE_TYPE="REST_Features"
  • BASE_URL - the URL for the REST data source. This is the same URL that would be used to create a new online data source in the Connect to Online Sources dialog.
  • NAME - the layer description of the layer for the downloaded features.
  • 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. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of west-most longitude, southern-most latitude, eastern-most longitude, northern-most 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.
  • CLAMP_TO_BOUNDS - indicates that we will download only the data within the bounds, and not allow further downloads as the user zooms out. Default is FALSE.
  • NOTE: All style parameters that are supported by the IMPORT command are also supported by this command.

SAMPLE

Here is an example of an IMPORT_REST_FEATURES command that pulls in TIGERLine spatial census data:

IMPORT_REST_FEATURES CLAMP_TO_BOUNDS="YES" LAT_LON_BOUNDS="-70.055,43.872,-69.850,44.019" \
SOURCE_TYPE="REST_Features" BASE_URL="https://tigerweb.geo.census.gov/arcgis/rest/services/Basemaps/CommunityTIGER/MapServer/24" \
NAME="Counties