BAE 599
Topics in Agricultural Engineering: Precision Agriculture

Spring Semester 2007

 Educational Module 1 Exercise: Spatial Data Management


Introduction

The global positioning system (GPS) has been adopted by many U.S. grain producers as a method for referencing geographic and agronomic data in a geographic information system (GIS) database. GPS fixes take the format of latitude, longitude and elevation using a WGS84 datum.   A datum is a reference for physical parameters such as the shape of the earth. To utilize the GPS data the coordinates must be projected onto a flat plane or 2 dimensional view. In Kentucky a Lambert Conformal Conic projection is used as the basis of the State Plane Coordinate System. The nature of this projection and the associated mathematics are detailed in Map Projections—A Working Manual, authored by the U.S. Geological Survey as Professional Paper 1395. Once the projected coordinates are obtained, descriptions of the physical features (length, area, etc.) of points, lines and polygons can be quantified. These geometric entities form the basis of a GIS database.  A more descriptive definition for GIS is that it is a relational database where properties are assigned to point, line and polygon entities in space.  The objectives of this Module are to 1) understand and convert GPS point data from WGS84 and project the data into a State Plane coordinate system for a field located in Kentucky, and 2) determine the perimeter and area of a polygon described by the projected data.

Map Projections

Map projections are viewed as a mathematical operation in which latitude and longitude are transformed into Cartesian coordinates (x,y).  Map projections allow longitude and latitude coordinates to be projected from a 3-dimensional position on the earth's surface to a plane, or 2-dimensional surface (paper).  Several projections exist, with each preserving shape, area, distance, or direction differently.  The State Plane Coordinate System (SPCS) is a widely used coordinate system, within the United States.  The conversion is necessary to perform analyses such as area calculations.  The conversion allows GPS data to be projected onto a 2-dimensional plane enabling area and length calculations.  GPS or WGS84 data is unsuitable to support direct length and area determination as longitude and latitude are angular measurements, void of length dimensions and units.

Before discussing SPSC, it is appropriate to talk briefly about datums and their function.  While map projections systematically transform a position on the globe onto a plane, a datum functions as a reference system to describe the shape and size of the earth.   A datum is a smoothed mathematical surface of the earth's mean, sea- level surface.  The earth is not a perfect sphere but rather it is an oblate ellipsoid of revolution, also called an oblate spheroid.  The geoid defines the shape of the earth if all measurements were measured at sea-level.  A datum is necessary for the GPS system to model the earth's surface and calculate the position of GPS satellites and ultimately determine ones position on earth using GPS.  Horizontal datums consist of latitude and longitude of a point, azimuth of a line from that point, and two radii to describe the shape of the oblated sphere which best represents the earth.  Three datums exist which are frequently associated with GPS use: North American Datum of 1927 or know as NAD 27, NAD 83, and World Geodetic System of 1984 or WGS84WGS84 is the one most associated with the use of GPS data and was developed by the US Military in 1984 (basis of GPS receivers calculations).  NAD 27 is based on the Clarke Spheroid of 1866 while NAD 83 is based on the GRS 80 derived ellipsoid.  The radii used of the Clarke and GRS80 spheroids are presented in Table 1.  An important note is that NAD 27 coordinates are in feet while NAD 83 is reported in meters.

The SPCS was devised by the US Coast and Geodetic Survey in 1933 to establish a common coordinate system across the US.  It provides a greater degree of accuracy for area and distance calculations than other projections and coordinates systems.  Many Agricultural GIS and mapping packages use this coordinate system and will be the emphasis of this exercise.  However, the SPCS varies from state to state by dividing each into zones depending on whether the state is oriented more North-South or East-West.  The orientation dictates the map projection, Lambert Conformal Conic or Transverse Mercator, applied to the state.  Lambert Conformal Conic Projection is the most widely used projection and is the basis of state plane coordinate system for states with a greater East-West than North-South distances.  The Transverse Mercator Projection is an ordinary Mercator projection turned through a 90o angle to coincide with the central meridian. This projection is used for state plane coordinate systems in states with greater North/South than East-West directions.  Table 2 presents the projection used along with the number of zones for each state.  Table 3 provides the necessary State Plane parameters and origins for each zone in Indiana, Kentucky and Ohio based on the 1927 North American Datum (NAD 27).  These parameters are necessary to transform from WGS84 into the SPCS.

As mentioned, GPS point data is provided in WGS84.  Two sets of equations exist that transform this data into the SPCS since both the Lambert Conformal Conic and Transverse Mercator projections are used depending upon the state orientation.  The intent of this assignment is to not fully explain all the equations but to understand that they exist and how they can be used to transform WGS84 positions into the SPCS.  Table 4 provides the various equations necessary for the transformation.  Notice that several equations exist for each of the Lambert Conformal Conic and Transverse Mercator projections.   By knowing the standard parallels, origin, ellipsoid parameters and point to be transformed, one can simply plug these initial variables into the equations to calculate x and y coordinates in the SPCS.  It should be noted that longitude and latitude must be degrees and not in degree/minute/second.  If the latter exists, a conversion must be performed to convert from minute and seconds to degrees (1 degree = 60 minutes; 1 minute = 60 seconds).  

Perimeter Determination

            Calculating the perimeter of a polygon requires the use of vectors or more simply using the Pythagorean theorem.  The Pythagorean theorem is expressed by:

Therefore, the length (L) of the line segment between adjacent points making up a polygon can be calculated using the above equation.  Once calculated, all the line segments can be summed to determine the perimeter of the polygon.

Area Determination

As one might suspect, calculus can be used to estimate the area of the enclosed polygon defined by the set of GPS coordinates. Simply stated, the area of any real region is defined as,

(1)

Using Green’s Theorem, the area of smooth simple closed curve C is defined as,

(2)

Similarly we can right,

(3)

Combining both relationships the area is determined to be,

(4)

The line integral can be evaluated using the following discrete approximation,

(5)

Procedures

A field boundary traverse of a field at the UK Animal Research Center in Woodford County, Kentucky will be used for this exercise.   A downloadable Microsoft Excel file is provided containing the necessary data and conversion equations to complete this assignment.  The KY_State_Plane_N.xls (Kentucky State Plane North) file contains the WGS84 DGPS boundary points along with a table containing text and equations for projecting the DGPS data into the appropriate State Plane Coordinate System.  Start by downloading the Excel file containing the DGPS data.  Once the Excel file has been extracted fill in the provided tables to convert the DGPS data into State Plane coordinates.

1) Downloading the Excel File

To download the file, click on the button at the bottom of this page. Find an appropriate directory or create a new directory to download the applications file into and then click 'SAVE.'  Once completing this step, use your "Windows Explorer" to navigate to this application file (KY_State_Plane_N.xls).

2) Exercise Steps

The KY_State_Plane_N.xls file contains several sheets.  The boundary data (in decimal degrees) is contained on the second sheet labeled Raw Data - WGS84.   It was obtained using an ATV with a DGPS receiver and laptop computer. The boundary of the field was traced by a rider operating the ATV with DGPS fixes recorded every 1.0 second.  Note that the first and last records contain the same point in order to close the polygon representing the field boundary.

Below are several steps outlining what is required for completion of  this assignment.  Before starting, look over the first sheet labeled ‘Projection Relationships' in the KY_State_Plane_N.xls file.  This page contains the necessary variables and equations for the Lambert Conformal Projection.  Equations can be viewed by clicking on a variable's particular cell and are needed to transform the GPS data into the State Plane Coordinate System.  The remaining sheets provide prefabricated tables to use for projecting the data and calculating the perimeter and area for this field boundary.  Several variables must be calculated for each data point before using the x and y equations for the projections to determine the new location in meters.  Each table has been labeled with the required variables to calculate. Equations from Table 4 must be entered to calculate these variables and the new coordinates.   Equations can be easily copied and pasted.

3) Project Requirements

1.      Plot the latitude and longitude coordinate pairs in Microsoft Excel using the Chart Wizard to confirm that indeed an enclosed polygon exists (remember that longitude and latitude are in degrees).

2.      On the appropriate labeled sheets (i.e., KYN State Plane Coordinates), transform the WGS84-GPS coordinates to the correct State Plane Coordinate System using the Lambert Conformal Conic projection with the NAD27 datum.  Equations are provided on the first sheet labeled Projection Relationships.  Table headings have already been provided to help keep data organized.

3.      Convert the calculated Easting and Northing coordinates from meters to feet (1 meter = 3.281 feet).

4.      Again, plot the coordinate pairs in Microsoft Excel to confirm that a polygon exists.

5.      Print out a hardcopy of the original boundary and the newly projected boundary in SPCS for comparison and contrast (label all plots and include units).

6.      Copy the transformed coordinates (feet) over to the appropriate Area Determination sheet.

7.      Determine the area of each field using the discrete method outlined above using  Equation 5.  Starting with the second point, calculate the difference in x (Dx) and y (Dy) between the first and second point and then use these along with the x and y values of the second point to compute xDy - yDx for each point.  Repeat the same step for each point.

8.      The last column should be summed and then multiplied by 0.5 to get the total area of the in ft2.

9.      Convert from ft2 to acres (1 acre = 43,560 ft2) to determine the final answer.

10.  Answer the questions in section 4 below.

4)  Questions

  1. What is a datum and why is specification of a datum important to the projections and coordinate transformation processes?

  2. What are the physical dimensions that describe the shape of the earth in the NAD27 datum?

  3.  Which projection is used in the Kentucky North State Plane projection, and why?

  4.  Projections preserve parameters such as lengths, areas and angles differently.  Describe how the Transverse Mercator projection affects these parameters.

  5. What is the UTM projection, and what prompted its development?

  6. The data table below lists coordinate pairs describing the boundary of a field.  Using the discrete approximation for calculating the area of a polygon (derived from Green's Theorem and presented in class), create a table and calculate the area of the enclosed polygon described by these coordinates.  Also calculate the perimeter of the boundary.

i x y
1 0 0
2 100 12
3 132 76
4 157 209
5 72 186
6 0 100

*Please Note:  Projects are to be submitted in both hardcopy and in electronic form (Excel files only!).  Make sure labels (including units) exist for all tables and plots.  When e-mailing the Excel file, be certain that your name is contained in the file name.  While a formal report format is not required, be certain that you meet all of the Project Requirements, and that you answer all of the above questions.  Work neatly!


 Click on the file name to download the Excel file that you will need for this investigation: KY_State_Plane_N.xls