Knowledge Base - Technical Articles


Technical Article   HowTo:  Create projection metadata (.prj) files for shapefiles

Article ID: 14056
Software:  ArcPad 5.0.1, 6.0, 6.0.1, 6.0.2, 6.0.3
Platforms: N/A

 

Summary

In ArcPad, the GPS tools, or buttons, are only enabled when a layer with an
associated projection, or .prj file, is added.

Procedure

You can create .prj files in one of the following ways:

• The Projection Utility method:

The Projection Utility is a stand-alone tool that is installed with ArcView GIS 3.2. This wizard-based tool allows you to project one or more shapefiles into a coordinate system. To use this tool:

1. Click Start > Programs > Esri > ArcView GIS 3.2 > Projection Utility.
2. Click Browse and select one or more shapefiles.
3. Click Next.
4. Select creation of .prj files.

For more detailed information on the Projection Utility, see the ArcView 3.2 online help. Type in 'prj files' in the Index tab and select 'Frequently Asked Questions.'

• The manual method:

If you don't have access to the Projection Utility, you can create a .prj file manually using a text editor such as Notepad.

A coordinate system is either geographic (longitude, latitude) or projected (X, Y). The coordinate system is composed of several objects. Each object has a keyword in uppercase (for example, DATUM or UNIT), followed by the defining, comma-delimited parameters of the object in brackets. Some objects can be composed of other objects.

The ESRI Projection Engine stores the metadata for a coordinate system in a string, or in a .prj file. The string, also known as a PE string, must be continuous. A PE string is somewhat complex because many of its pieces are explicitly defined. You can define your own units, datums, and spheroids.

If you are creating a PE string from scratch, make sure the 'Word Wrap' option is not selected in Notepad. The PE string examples here are formatted for readability.

The Extended Backus Naur Form (EBNF) definition for the string representation of a coordinate system is:

  =   |   

=
PROJCS[" ", , ,
{,}* ]
= PROJECTION[" "]
= PARAMETER[" ", ]
=
= UNIT[" ", ]
where is

= GEOGCS[" ", , ,
]
= DATUM[" ", ]
= SPHEROID[" ", ,
]
=
=


 Semi-major axis is measured in meters and must be greater than zero.



= PRIMEM[" ", ]
=


 The prime meridian longitude value is in degrees and relative to Greenwich.

A dataset's coordinate system is identified by the PROJCS keyword if the data is in projected coordinates, or by GEOGCS if in geographic coordinates. The PROJCS keyword is followed by all the pieces that define the projected coordinate system. An object contains the projected coordinate system name, followed by the geographic coordinate system, the map projection, one or more projection parameters, and the linear unit of measure.

All projected coordinate systems are based upon a geographic coordinate system, so you will describe the pieces specific to a projected coordinate system first. For example, UTM zone 10N on the NAD83 datum is defined as

    PROJCS["NAD_1983_UTM_Zone_10N",

,
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-123.0],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_of_Origin",0.0],
UNIT["Meter",1.0]]

The geographic coordinate system name is followed by the datum, the prime meridian, and the angular unit of measure. The geographic coordinate system string for UTM zone 10N on NAD 1983 is:

GEOGCS["GCS_North_American_1983",

DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199433]]

The UNIT object can represent angular or linear units of measure.

  =  

=
= UNIT[" ", ]
=

The conversion factor specifies number of meters (for a linear unit), or number of radians (for an angular unit) per unit and must be greater than zero.

The full string representation of NAD 1983 UTM zone 10N is:

  PROJCS["NAD_1983_UTM_Zone_10N",

GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-123.0],
PARAMETER["Scale_Factor",0.9996],
PARAMETER["Latitude_of_Origin",0.0],
UNIT["Meter",1.0]]

Projection parameters use the units of measure from both the projected and geographic coordinate systems. Linear parameters, like false easting and false northing, have the same units as the linear unit of measure listed at the end of the projected coordinate system string. Angular parameters, like central meridian, latitude of origin, and standard parallel 1, use the angular unit of measure listed in the geographic coordinate system definition.

You have to use the predefined names for map projection and parameter object,s so that Projection Engine can interpret them correctly. For all other objects, you can either use predefined names and values, or define your own. Let's say you define the following geographic coordinate system:

GEOGCS["My_GCS",

DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.0174532925199433]]

The only difference from the predefined NAD 1983 geographic coordinate system is the name. You will get the same results if you project data with either GCS, but the Projection Engine doesn't consider the two definition equivalents.

The easiest method to create a new PE string is to modify an existing one. You can copy and edit parts as needed from several examples. The projection parameters must be in the same units as the coordinate systems. If you are editing a meter-based projected coordinate system to use feet, make sure you adjust the false easting and false northing parameter values to feet. This is the UTM zone 10N based on NAD 1983:

PROJCS["NAD_1983_UTM_Zone_10N", GEOGCS["GCS_North_American_1983",

DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0], UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",-123.0],
PARAMETER["Scale_Factor",0.9996], PARAMETER["Latitude_of_Origin",0.0],
UNIT["Meter",1.0]]

To change it to US survey feet:

1. The PROJCS name to easily identify what's new. The new name will be NAD_1983_UTM_Zone_10N_Feet).

2. The linear unit of measure name and value. The string for US survey feet is UNIT["Feet_US",0.30480060960122].

3. The linear projection parameter values. The false northing value is 0.0 and is unchanged. The false easting value is 500000.0 meters. In US survey feet,
the value is 1640416.6667.

The new string is:

PROJCS["NAD_1983_UTM_Zone_10N_Feet", GEOGCS["GCS_North_American_1983",

DATUM["D_North_American_1983", SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0], UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"], PARAMETER["False_Easting",1640416.6667],
PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",-123.0],
PARAMETER["Scale_Factor",0.9996], PARAMETER["Latitude_of_Origin",0.0],
UNIT["Feet_US",0.30480060960122]]

Remember a PE string is simply a collection of objects. If you can, copy a geographic coordinate system string that includes the datum, spheroid, prime meridian, and angular unit of measure. You don't need to individually define the spheroid or unit strings.

• Creating .prj files for images:

The easiest way to create a .prj file for an image is to simply copy an existing .prj file from a shapefile or from the sample .prj files included with ArcPad on the PC (e.g. C:\ESRI\ArcPad 5.0.1\Coordinate Systems).

Created: 4/10/2000
Last Modified: 2/10/2004

Article Rating: (1)
If you would like to post a comment, please login

Comments

By Anonymous - 10/03/2003 8:45 AM

It's really helpful, but some important symbols are missing in the Backus Naur Form, could you add them?

Rating:

By Anonymous - 03/31/2003 2:20 PM

This needs an example for setting up a local site coordinate system such as is used on engineering and construction jobs.