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:
-
Line 2: Line 2 contains the declaration of Elevation or Depth, the definitions of Lithology IDs and Names, and coordinate units.
-
-
Elevation/Depth Specifier: This line must contain the word Elevation or Depth (case insensitive) to specify whether well screen top and bottom elevations are true elevation or depth below ground surface.
-
-
Depth forces the otherwise optional ground surface elevation column to be required. Depths given in column 3 are distances below the ground surface elevation in the last column (column 6). If the top surface is omitted, a value of 0.0 will be assumed and a warning message will be printed to the EVS Information Window.
-
-
IDs and Names: Line 2 should contain Lithology IDs and corresponding names for each material. Each Name is explicitly associated with its corresponding Lithology ID and the pairs are delimited by a pipe symbol "|".
-
-
Though it is generally advisable, IDs need not be sequential and may be any integer values. This allow for a unified set of Lithology IDs and Names to be applied to a large site where models create for sub-sites may not have all materials.
-
The number of (material) IDs and Names MUST be equal to the number of Lithology IDs specified in the data section. Each material ID present in the data section must have corresponding Lithology IDs and Names. If there are four materials represented in your .pgf file, there should be at least four IDs and Names on line two.
-
The order of Lithology IDs and Names will determine the order that they appear in legends. The IDs do not need to be sequential.
-
You can specify additional IDs and Names, which are not in the data and those will appear on legends.
-
-
Coordinate Units: You should include the units of your coordinates (e.g. feet or meters). If this is included it must follow the names associated with each Lithology ID.
-
The Btagmust follow the IDs & names forthematerials.
-
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:
- The only REQUIRED item on this line in the Elevation or Depth Specifier.
-
- This line should contain the word Elevation or Depth (case insensitive) to denote whether sample elevations are true elevation or depth below ground surface.
- If set to Depth all surface descriptions for layer bottoms are entered as depths relative to the top surface. This is a common means of collecting sample coordinates for borings.
- Note that the flags such as pinch or short are not modified.
- Line 2 SHOULD contain names for each geologic surface (and therefore the layers created by them).
-
- There are some rules that must be observed.
- The number of surface (layer) names MUST be equal to the number of surfaces. Therefore, if naming layers, the first name should correspond to the top surface and each subsequent name will refer to the surface that defines the bottom of that layer.
- A name containing a space MUST be enclosed in quotation marks example ("Silty Sand"). Names should be limited to upper and lower case letters, numerals, hyphen "-" and underscore "_". The names defined on line two will appear as the cell set name in the explode_and_scale or select cell sets modules. Names should be separated with spaces, commas or tabs.
- The REPROJECT tag must follow the names for the material numbers. It replaces the COORDINATE UNITS
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)
PROJECTION: Indicates 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