Projecting File Coordinates

Discussion of File Coordinate Projection

Each file contains horizontal and vertical coordinates, which can be projected from one coordinate system to another given that the user knows which coordinates systems to project from and to. This is accomplished by adding the REPROJECT tag to the file. This tag is used in place of the coordinate unit definition and causes the file reader to look at the end of the file for a block of text describing the projection definitions. The definitions are a series of flags that listed below. NOTE: GMF files do not need the REPROJECT tag, the projection definitions can occur in a continuous block anywhere in the file.

 

NOTE: When projecting from Geographic to Projected coordinates, please note that Latitude corresponds to Y and Longitude corresponds to X. Since we expect X coordinates before Y coordinates we expect Longitude (then) Latitude (Lon-Lat). If the order in your data file is Lat-Lon you must use the "SWAP_XY" tag at the bottom of the file.

 

Format (for REPROJECT flag):

APDV and AIDV files:

Line 2:Elevation/Depth Specifier:This line must contain the wordElevationorDepth(case insensitive)to denote whether sample elevations are true elevation or depth below ground surface. This should be followed by the ASCII string REPROJECT.

AN EXAMPLEFOLLOWS:

# This is a comment line....not the header line - the next line is

X Y Z@@TOTHC Bore Top

Elevation 6.0 REPROJECT

 

PGF files:

The first two lines of a PGF EXAMPLEFOLLOWS:

Pregeology file

Elevation 1|Silt 2|Fill 3|Clay 4|Sand 5|Gravel REPROJECT

 

GEO files:

Line 2: Elevation/Depth Specifier:

 

AN EXAMPLE FOLLOWS:

X Y TOP BOT_1 BOT_2 BOT_3 BOT_4 BOT_5 BOT_6 BOT_7 Boring

-1 Top Fill SiltySand Clay Sand Silt Sand GravelREPROJECT

 

GMF files:

GMF files can have the projection block placed anywhere in the file.

 

Projection Block Flags:

**NOTE: Most flags defined below include arguments denoted by the '[' and ']' characters. These characters should not be included in the file. (Example: IN_XY meters)

 

PROJECTIONIndicates the start of the coordinate projection block

 

SWAP_XY:This will swap all coordinates in the x and y columns

 

UNITS[string]This defines what your final coordinates for x, y, and z,will be.These units will be checked for in the file \data\special\unit_conversions.txt. If they are not found there they will be treated asequivalent tometers.

 

UNIT_SCALE[double]: The UNIT_SCALE flag sets the conversion factor between the final coordinates and meters. This is only necessary if you are defining units with the UNITS flagthat are not listed in the \data\special\unit_conversions.txt file.

 

IN_Z[string]: This flag sets what units your z or depth coordinates are. These units if different than the defined UNITS will be converted to the UNIT type. If UNITS arenot set then this will generate an error.

 

IN_X[string]: This flag sets whatunits your x coordinates are. These units if different than the defined UNITS will be converted to the UNIT type. If UNITS arenot set then this will generate an error.

 

IN_Y[string]: This flag sets whatunits your y coordinates are. These units if different than the defined UNITS will be converted to the UNIT type. If UNITS arenot set then this will generate an error.

 

IN_XY[string]: This flag sets what units your x and y coordinates are. These units if different than the defined UNITS will be converted to the UNIT type. If UNITS arenot set then this will generate an error.

 

PROJECT_FROM_ID[int]: This flag sets the EPSG ID value you wish to project from, you can look up what ID is appropriate for your location using the project_fieldmodule. To use this flag you must set the PROJECT_TO_ID or PROJECT_TO flag as well.

 

PROJECT_TO_ID[int]: This flag sets the EPSG ID value you wish to project to, you can look up what ID is appropriate for your location using theproject_field module. To use this flag you must set the PROJECT_FROM_ID or PROJECT_FROM flag as well.

 

PROJECT_FROM[string]: This flag sets the NAME of the location you wish to project from, you can look up what NAME is appropriate for your location using theproject_field module. To use this flag you must set the PROJECT_TO_ID or PROJECT_TO flag as well.IMPORTANT: The full name should be enclosed in quotation marks so that the full name will be read.

 

PROJECT_TO[string]: This flag sets the NAME of the location you wish to project to, you can look up what NAME is appropriate for your location using theproject_field module. To use thisflag you must set the PROJECT_FROM_ID or PROJECT_FROM flag as well.IMPORTANT: The full name should be enclosed in quotation marks so that the full name will be read.

 

TRANSLATE[doubledoubledouble]: This flag will translate each coordinate in the file by these values. It will translate x by the first value, y by the second, and all z values by the third.

 

END_PROJECTION: Denotes the end of the projection block and is required.

 

Example 1:

 

PROJECTION

PROJECT_FROM_ID 4267

PROJECT_TO "NAD83 / UTM zone 10N"

UNITS "meters"

SWAP_XY

END_PROJECTION

 

Example 2:

PROJECTION

UNITS "meters"

IN_XY "km"

IN_Z "ft"

END_PROJECTION