The IMPORT_SPATIAL_DB command allows the user to import spatial data from a spatial database. The database can be either a file-based spatial database or a connection-based spatial database.:

  • TYPE - File-Based Spatial Databases (Using these TYPE values requires that the SDB_CONNECTION_FILE parameter also be specified to identify the spatial database to be used.)
    • SPATIALITE - Spatialite/SQLite
    • FILE_GDB - Esri File Geodatabase
    • ESRI_PGEO - Esri Personal Geodatabase
  • TYPE - Connection-Based Spatial Databases (Using these type values requires that the SDB_CONNECTION_NAME parameter also be specified to identify the connection to be used.)
    • ESRI_ARCSDE - Esri ArcSDE Geodatabase
    • ESRI_XML_WORKSPACE - Esri XML Workspace
    • MSSQLSERVER - Micorsoft SQL Server Spatial
    • MYSQL - MySQL Spatial
    • ORACLE - Oracle Spatial Database
    • POSTGIS - PostGIS/PostgreSQL
  • SDB_CONNECTION_FILE - When importing from a file-based spatial database, use this parameter to specify the full path to the database file. If importing from an Esri File Geodatabase, this parameter must contain the directory containing the geodatabase (typically ends in ".gdb" even though it is a directory).
  • SDB_CONNECTION_NAME - The name of the connection to be used to access a connection-based spatial database. Connections can be defined in the script using a DEFINE_SDB_CONNECTION command, or by using the Connection Manager in the Global Manager user interface. All of the connections defined in the Connection Manager are available for use in a script.
  • SDB_TABLE_NAME - Each IMPORT_SPATIAL_DB command will import a single database table. Use this parameter to specify the name of the database table to be imported.
  • SDB_IMPORT_BOUNDS - specifies the bounds to be used when importing data from a spatial database. The parameter value is a bounding rectangle in the same projection as the import database, in the form: "<minX>,<minY>,<maxX>,<maxY>".
  • 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.


 SDB_TABLE_NAME="public.canada" SDB_IMPORT_BOUNDS="-126.821609,26.773888,-106.597575,50.302504"
IMPORT_SPATIAL_DB SDB_CONNECTION_FILE="V:\GeoDatabase\10.0\PortlandParcels.gdb\gdb" TYPE="FILE_GDB" \