The program was written by programmers working for the Alaska Department of Natural Resources. The source data is derived from the AEH files maintained by the Alaska Bureau of Land Management. As the source data files are updated they will be posted on the State of Alaska Clearinghouse Node along with the program and this document.
PLSS was written in a layered approach: The base program, a dynamic link library (dll) and a Graphical User Interface (GUI). The base program is pure C++ and uses object oriented design and programming. It should be possible to compile the base program on a number of systems without modifying the code. DNR has compiled and tested this on Solaris, Windows NT and Windows 95. The dll includes Microsoft Foundation Classes and therefore will only work with the Microsoft Visual C++ compiler. The GUI is a beta version that includes the ActiveX component of PLSS.
The intent of the program is to be incorporated into a users Commercial GIS software application. This can be done on both the Windows and UNIX platforms. Currently there are two ways this is done, although these are not the only ways possible. On the Windows platform using Visual Basic to directly execute PLSS commands. On the UNIX platform using ARC/Info to execute PLSS commands. Both examples allow the writing of an output file or retrieving the information directly. These examples are included in the samples directory.
The base program has three modes of operation: interactive command line, command line arguments passed in to the program and batch mode. In the interactive mode there is a SPECIFICATION> prompt. The program options are set from the prompt and the legal descriptions are entered.
In the command line mode all of the program options and specifications are passed into the program via flags at the time the program is executed. The order the options are passed is important. The order is settings, specification and information retrieval.
In batch mode an input file is read and executed. The input file consists of one PLSS command per line. The input file can be run from either the interactive or the command line modes.
The dynamic link library was written to be used by other C++ programs. Also, to allow the Graphical User Interface to access the base program. What this means is that any program written in C++ can link to the dll and use any of the PLSS commands. Since the GUI is simply another C++ with some windowing capability, this is how the GUI accesses the functions in PLSS.
The Graphical User Interface (GUI) is primitive and was not fully tested, therefore it is only a beta version. However, it does show some of the capabilities for making a GUI and includes the ActiveX functionality. The ActiveX functionality has been fully tested and some sample code is included to show how to use the commands in Visual Basic.
The required geodetic calculations are derived from:
Snyder John P. Map Projections--- A Working Manual. U.S. Geological Survey professional paper; 1395. Washington, DC 20402: Superintendent of Documents, U.S. Government Printing Office, 1987.
The sections are calculated from a township by stepping off from the border.
The aliquot parts (subdivisions of a section) are calculated by equal
division.
PLSS is memory intensive because of the information that it tracks. Once a legal description is entered a 64*64 matrix (~131,072 bytes) is filled with the calculated points for the township. Also, arrays of 500 elements (~16,000 bytes) are reserved for points and adjacencies. Lastly, an array of 20480 elements (~655,360 bytes) is reserved for the output of unique points. The matrix and the 500 element arrays are reserved for each specification entered, while the 20480 element array is reserved only once at the program start up. This is the reason for the large amount of memory required for this program. NOTE - it is because of this memory requirement that the filtermode command exists.
While the PLSS program was written with MSVC++, none of the Microsoft
Foundation Classes were used to allow for cross platform compatibility
between UNIX and WINDOWS.
--> cp -r /cdrom/aehFiles <permanent location>
Copy the binary files to a directory on the system/network.
--> cp -r /cdrom/bin_UNIX <permanent location>
Set an environment variable called AEH to the directory where the AEH Files are kept.
--> setenv AEH <permanent location of aehFiles>
You should now be able to run PLSS if it is in you path or run PLSS from the directory where it is installed.
--> open explorer.
--> select the cd drive.
--> select the aehFiles directory.
--> hold the [Ctrl] key and drag the aehFiles directory to the
permanent location of the aehFiles.
Copy the binary files to a directory on the system/network.
--> open explorer.
--> select the cd drive.
--> select the bin_WINDOWS directory.
--> hold the [Ctrl] key and drag the bin_WINDOWS to the permanent
location of the PLSS application.
Set an environment variable called AEH to the permanent location of the aehFiles.
You should now be able to run PLSS and the plssGUI from the run option
in the start menu. Also, if desired a menu option can be set up to
run the program. See windows documentation for this.
EXAMPLE [INTERACTIVE] --> AREA "Chugach State Park"
EXAMPLE [CMD LINE] --> plss -AREA="Chugach
State Park"
Sets the name of the attribute file. If the name is to be different
than the output file then this command must be given after the outputfile
command. Otherwise, the attribute file name will be that of the output
file with an att extension.
EXAMPLE [INTERACTIVE] --> AF TEST.att
EXAMPLE [CMD LINE] --> plss -af=test.att
Clear the list of input specifications.
Sets the program options to FEATURE COGOPOINT, FORMAT GENERATE, and VERTEXLEVEL -1. This command is probably only of interest to the LSGIS project.
EXAMPLE [INTERACTIVE] --> cp
EXAMPLE [CMD LINE] --> plss -cp
Sets the output feature. Currently six features are supported:
POINT, LINE, POLY, REGION, CENTROID, and COGOPOINT.
EXAMPLE [INTERACTIVE] --> FEA POLY
EXAMPLE [CMD LINE] --> plss -FEA=POLY
Toggles filter mode. With filter mode on large batch files can
be processed without running out of memory.
EXAMPLE [INTERACTIVE] --> FM ON
EXAMPLE [CMD LINE] --> plss -fm=on
Sets the file format of the output file.
| ADD | produces an AML which executes an ADD command for the current FEATURE. |
| GENERATE | produces an ARC/INFO GENERATE file for the current FEATURE. |
| PROJECT | produces an output file which is ready for the ARC PROJECT command. |
| OILNGAS | produces a format specifically for Ak. DNR, Div of Oil and Gas. |
| DXF12 | produces a DXF12 formatted file. |
| DXF13 | produces a DXF13 formatted file. |
Tells the program to read the aliquot parts in a forward order. The larger part to the smaller part.
EXAMPLE [INTERACTIVE] --> FOR
EXAMPLE [CMD LINE] --> plss -for
Returns the four geographical corners of the aliquot last entered.
EXAMPLE [INTERACTIVE] --> GAQP
EXAMPLE [CMD LINE] --> plss -s="S005N010W
7 NW NE SE SW" -gaqp
Reads commands and specifications from an input file. Used for
processing in batch mode.
EXAMPLE [INTERACTIVE] --> I TEST.pls
EXAMPLE [CMD LINE] --> plss -i=test.pls
Tells the program to produce the requested output which is defined by the current list of specifications and option settings. Currently the file produced is named default.dat by default, and is located in the directory the program is running in. By specifying the full path name to a different file after the command, the output may be placed in another file. Also the OUTPUTFILE command can be used to change the name of the default file names.
EXAMPLE [INTERACTIVE] --> OUT TEST.dxf
EXAMPLE [CMD LINE] --> NOT APPLICABLE.
AUTOMATICALLY DOES OUTPUT IF A SPEC IS ENTERED
This command sets the level to which your input specifications are to
be subdivided prior to output.
| Level | AQP Specification | Acreage |
| -1 (NOT IN CMD LINE MODE) | TOWNSHIP | ~23,040 acres |
| 0 | SECTION | ~640 acres |
| 1 | 1/4 SECTION | ~160 acres |
| 2 | 1/4 1/4 SECTION | ~40 acres |
| 3 | 1/4 1/4 1/4 SECTION | ~10 acres |
| 4 | 1/4 1/4 1/4 1/4 SECTION | ~2.5 acres |
| 5 | 1/4 1/4 1/4 1/4 1/4 SECTION | ~0.625 acres |
Specifies the output file that will be used. Unlike the OUTPUT
command, this command does not actually produce output, it merely specifies
the name of the output file that will be used if one is not specified in
the OUTPUT command.
EXAMPLE [INTERACTIVE] --> OF TEST.gen
EXAMPLE [CMD LINE] --> plss -of=TEST.gen
Sets the geographical projection the points will be in when written
to a file.
| STATEPLANE | Alaska Stateplane where the zone of the township is the fipszone where the township resides. |
| ALBERS | Albers equal area. Where the central meridian is the same as the default Ak. DNR. central meridian for Alaska. The default central meridian is 154 degrees. |
| RADIANS | A spherical geodetic measurement. |
| DMS | Degrees Minutes Seconds also known as Lat/Long. |
| DD | Decimal Degrees. |
| DM | Decimal Minutes. |
| DS | Decimal Seconds. |
Sets the decimal precision of a point to be written. The default
is twelve.
EXAMPLE [INTERACTIVE] --> P 9
EXAMPLE [CMD LINE] --> plss -p=9
Quit the program. Note if you want output, you must explicitly
use the OUTPUT command.
EXAMPLE [INTERACTIVE] --> Q
EXAMPLE [CMD LINE] --> NOT VALID.
Tells the program to read the aliquot parts in a reverse order. The smaller part to the larger part.
EXAMPLE [INTERACTIVE] --> REV
EXAMPLE [CMD LINE] --> plss -rev
Only used when specifying a specification in the CMD LINE mode. Otherwise it is unnecessary.
EXAMPLE [INTERACTIVE] --> S005N010w 21
EXAMPLE [CMD LINE] --> plss -s="S005N010w
21"
If this option is set to on no duplicate points will be written.
A duplicate point occurs when ever two or more aliquot part specifications
are adjacent. Since, each aliquot by itself would contain that point.
This command prevents the writing of duplicate points if turned on.
EXAMPLE [INTERACTIVE] --> UNI ON
EXAMPLE [CMD LINE] --> plss -uni=on
Vertex level specifies the location of output vertices for each specification
(i.e. the level of vertex resolution on arcs). The Vertex level can
not be less than the Output level since the lines for the output level
are derived from the vertex level.
EXAMPLE [INTERACTIVE] --> VL 2
EXAMPLE [CMD LINE] --> plss -vl=2
Returns the Upper Right, Lower Right, Lower Left and Upper Left corners
of the current polygon.
EXAMPLE [INTERACTIVE] --> BC
EXAMPLE [CMD LINE] --> plss -bc
Displays a list of all commands.
EXAMPLE [INTERACTIVE] --> ?
EXAMPLE [CMD LINE] --> plss -help
Displays a list of the previous commands executed.
EXAMPLE [INTERACTIVE] --> H
EXAMPLE [CMD LINE] --> plss -h
Return a TRUE or FALSE answering the question Is the township an irregular township? If a township is given answers the question for that township, otherwise it answers the question for the last township processed.
EXAMPLE [INTERACTIVE] --> IRR
EXAMPLE [CMD LINE] --> plss -irr="C024N005E"
Lists the current input specifications.
| FULL | Lists the specification and the unformatted coordinates. |
| SPECS | Lists the specifications. (Default) |
Reports the sections that exist in a township according to the AEH files.
EXAMPLE [INTERACTIVE] --> SECS
EXAMPLE [CMD LINE] --> plss -secs="S005N010W"
This command shows the current settings for the program.
EXAMPLE [INTERACTIVE] --> SH
EXAMPLE [CMD LINE] --> plss -sh
Default Township: S005N010W
Index: 11595
Default Section: Entire township
Output Level: TOWNSHIP
Vertex Level: TOWNSHIP
Feature:
LINE
Format: ADD
Projection: STATEPLANE
Output file: default.dat
Attribute file: default.att
-------------------- Option Settings ----------------------
Filter Mode: OFF
Pt Precision: 12
Reports the Stateplane FIPSZone for the township. If a township
is given with the command it is the zone for that township, otherwise it
is the zone for the current township.
EXAMPLE [INTERACTIVE] --> SPZ
EXAMPLE [CMD LINE] --> plss -spz="S005N010W"
Reports the graticule for the township. If a township is given
with the command it is the graticule for that township, otherwise it is
the graticule for the current township.
EXAMPLE [INTERACTIVE] --> TWPG
EXAMPLE [CMD LINE] --> plss -twpg="S005N010W"
Reports the AEH index for the township. If a township is given with the command it is the index for that township, otherwise it is the index for the current township.
EXAMPLE [INTERACTIVE] --> TWPI
EXAMPLE [CMD LINE] --> plss -twpi="S005N010W"
Reports information related to a township. If no township is specified the current township (as indicated by the show command) is used.
EXAMPLE [INTERACTIVE] --> TI
EXAMPLE [CMD LINE] --> plss -ti="S005N010W"
Index: 11595 - MTR: S005N010W
State Plane Zone: 4
Irregular: FALSE
Sections: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36
Township Corners:
NE: 331141.188000000024,2398025.458000000101
NW: 299551.456999999995,2398518.217000000179
SW: 299015.342999999993,2366844.503000000026
SE: 330689.569000000018,2366350.848000000231
Township Graticule:
North Latitude - Radians: 1.056981440300
West Longitude - Radians: 2.637435561080
South Latitude - Radians: 1.055468918600
East Longitude - Radians: 2.634371490160
North Latitude - DMS: 60 33 38.071990256331
West Longitude - DMS: 151 6 50.134995367991
South Latitude - DMS: 60 28 26.091994861308
East Longitude - DMS: 150 56 18.125000726925
Displays specific commands without any formatting. This is done for working with ARC aml. ARC aml only talks through stderr and stderr can only be one line.
EXAMPLE [INTERACTIVE] --> UFO
EXAMPLE [CMD LINE] --> plss -ufo
NOTE If this command is used the coordinates must be retrieved
using the poly info commands!
EXAMPLE [ActiveX] --> plss.DISSOLVE
EXAMPLE [ActiveX] --> aqpVerticesCount = plss.GetNumberOfAQPVertices(0)
SPECIFICATION> show
Default Township: s005n010w
Index: 11595
Default Section: Entire township
Output Level: TOWNSHIP
Vertex Level: SECTION
Feature:
LINE
Format: ADD
Projection: STATEPLANE
Output file: default.dat
Attribute file: default.att
-------------------- Option Settings ----------------------
Filter Mode: OFF
Pt Precision: 12
To get information about a township:
SPECIFICATION> ti k001n013w
Index: 8204 - MTR: k001n013w
State Plane Zone: 7
Irregular: FALSE
Sections: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36
Township Corners:
NE: 812931.092999999993,4212593.362999999896
NW: 781360.236000000034,4212272.247000000440
SW: 781629.969000000041,4180596.373999999836
SE: 813305.494999999995,4180918.331999999937
Township Graticule:
North Latitude - Radians: 1.143617931190
West Longitude - Radians: 2.818074234630
South Latitude - Radians: 1.142106490580
East Longitude - Radians: 2.814442412900
North Latitude - DMS: 65 31 28.130997610494
West Longitude - DMS: 161 27 49.535995891238
South Latitude - DMS: 65 26 16.373993034906
East Longitude - DMS: 161 15 20.418990428800
Order is critical. The critical order is filtermode, area, spec, ufo, and any other option. Where area is only used to denote the following specs belong to the same area. Where spec is the legal aliquot part description. Where ufo is if unformatted output is wanted. Where option is setting any of the default settings. Where output is what information is to be displayed. i.e. /plss: bin/plss -bc -s=k001n013w would not work.
- NOTE - The path and executable will probably be different on your
system.
To get the map extent of a township:
/plss: bin/plss -s=k001n013w -bc
NE Corner: 813305.494999999995,4212593.362999999896
SE Corner: 781360.236000000034,4180596.373999999836
SW Corner: 781360.236000000034,4180596.373999999836
NW Corner: 813305.494999999995,4212593.362999999896
To get the unformatted map extent of a township:
/plss: bin/plss -s=k001n013w -ufo -bc
813305.494999999995,4212593.362999999896,781360.236000000034,4180596.373999999836,781360.236000000034,4180596.373999999836,813305.494999999995,4212593.362999999896
Input File
Unedited Output
Edited Output
Both outputs plus coastal referance
NOTE - The input file was not checked with the legal description of
the Chugach State Park. Therefore, this file should be used for demonstration
purposes only.
To get an AutoCAD 13 file named test.dxf of Lat/Long coordinates for a dissolved area consisting of the center sixteen sections of k001n013w:
SAMPLE INPUT FILE: input.pls
outputfile test.dxf
vertexlevel 2
format dxf13
feature poly
projection dd
area test
k001n013w 8-11, 14-17, 20-23, 26-29
output
quit
SAMPLE COMMAND LINE:
/plss: bin/plss -input=input.pls
SAMPLE OUTPUT FILE: test.dxf
This file is too long to be included. Run the above commands
to see the output.
SAMPLE ATTRIBUTE FILE: test.att
1,k001n013w 8
1,k001n013w 9
1,k001n013w 10
1,k001n013w 11
1,k001n013w 14
1,k001n013w 15
1,k001n013w 16
1,k001n013w 17
1,k001n013w 20
1,k001n013w 21
1,k001n013w 22
1,k001n013w 23
1,k001n013w 26
1,k001n013w 27
1,k001n013w 28
1,k001n013w 29
Private Sub GetLastTwp_Click()
Dim plss As Object
Dim polyList As Object
Dim vertex As String
Set plss = CreateObject("Plss.Document")
plss.ProcessInput ("area on")
plss.ProcessInput ("s005n010w 07")
plss.ProcessInput ("s005n010w 06")
plss.dissolve
Let vertex = Str(plss.GetPolyXCoordinate(0, 0))
+ "," +
Str(plss.GetPolyYCoordinate(0, 0))
lastTWP.Text = vertex
End Sub
The term aliquot means an exact proper divisor. In geographical terms this means that an aliquot part is an equal division of an area usually expressed as fractions of that area.
How are the sections calculated?
The sections are calculated from a township by stepping off from the border. The sections were calculated by starting at the origin of a township, as defined by the BLM and ADL protraction diagrams, and stepping of 80 chains in the protraction direction.
How are the sections subdivided into aliquot parts?
A section is divided into an aliquot part by using equal division of the section.
How are sections that are smaller or larger than normal handled?
If the section is smaller the section is clipped to the township border. If the section is larger it is extended to the township border.
How do I get updates of the data files?
As DNR receives updates they will be posted to the State of Alaska Clearinghouse
along with program updates and updates to this document.