Projection Specification Values

The projection may be specified in the PROJ parameter in the following ways:

  • PRJ Filename - the value is the full path to a PRJ file that specifies the projection to use.
  • Defined Projection Name - the value is the name assigned to a projection previously defined with the DEFINE_PROJ command.
  • EPSG Code - the value is an EPSG code, either just the raw code, or a code with EPSG: in front of it, like 'EPSG:4326'.
  • WKT PRJ String - the value is a WKT projection string.
  • Zoned Projection Name - the value is the name of a zoned projection system or of a predefined grid system with no parameters (i.e. British Grid, Swiss Grid, etc.). For zoned projections, the zone to use will be automatically selected for the center location of the loaded data. The datum of the current projection will be used as will the units of the current projection (or meters if the current projection uses degrees). For example, PROJ="UTM" will select a UTM projection with the appropriate zone for the center lat/lon of the loaded data. Here are some recognized zoned projection names (or just use the name from the projection dialog):
    • UTM - Universal Transverse Mercator (6-degree zones)
    • GK3 - Gauss Krueger 3-degree zones
    • GK6 - Gauss Krueger 6-degree zones
    • MTM_CANADA - MTM Eastern Canada
    • AMG - Australian Map Grid
    • MGA - Map Grid Australia
    • 3TM - 3TM Alberta
    • 10TM - 10TM Alberta
  • Layer Filename/Description - If the value matches the filename or description of a loaded layer, the native projection of that layer will be used. The special value of "SELECTED LAYERS" can be used to specify any layers currently selected in the Control Center.
  • Projection at Script Start - If the value is START_PROJ (PROJ=START_PROJ), then the projection will match against the display projection that was in effect when the script started running. If no projection was in effect when the script started, there will be an error.
  • Native Projection of Last Layer Loaded by Script - If the value is LAST_LAYER_PROJ (PROJ=LAST_LAYER_PROJ), then the projection will be the native projection of the last layer loaded by the script. If no layer has been loaded by the script, there will be an error.

SAMPLES

PRJ Filename
IMPORT FILENAME="countries.geojson" TYPE="GEOJSON" \
PROJ="TM.prj"
LOAD_PROJECTION PROJ="TM.prj"
Defined projection name
DEFINE_PROJ PROJ_NAME="TM_NAD83"
Projection TRANSVERSE
Datum NAD83 Zunits NO Units INTERNATIONAL FEET Xshift 0.000000 Yshift 0.000000 Parameters 1.000000000 /* scale factor at central meridian -105 30 0.00000 /* central meridian 37 49 59.99999 /* latitude of the origin 914401.8290 /* false easting (meters) 304800.6100 /* false northing (meters) 0 0 0.00000 /* xy_plane_rotation END_DEFINE_PROJ IMPORT FILENAME="\countries.geojson" TYPE="GEOJSON" \ PROJ="TM_WGS84" LOAD_PROJECTION PROJ="TM_WGS84"
EPSG Code
IMPORT FILENAME="countries.shp" LOAD_FLAGS="0"
LOAD_PROJECTION PROJ="EPSG:3857"
WKT PRJ String
IMPORT FILENAME="countries.shp" LOAD_FLAGS="0"
LOAD_PROJECTION PROJ="PROJCS[NAD_1983_UTM_Zone_19N,GEOGCS[GCS_North_American_1983,DATUM[D_NORTH_AMERICAN_1983,SPHEROID[GRS_1980,6378137,298.257222101]],PRIMEM[Greenwich,0],UNIT[Degree,0.017453292519943295]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,-69],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,500000],PARAMETER[false_northing,0],UNIT[Meter,1]]"
Zoned Projection name - this will select the appropriate UTM zone for the data.
IMPORT FILENAME="states.shp" LOAD_FLAGS="0"
LOAD_PROJECTION PROJ="IMPORT FILENAME="states.shp" LOAD_FLAGS="0" LOAD_PROJECTION PROJ="UTM"