pyTRS¶
pyTRS (imported as pytrs
) is a pure Python library for parsing
Public Land Survey System (PLSS) land descriptions (or “legal
descriptions”) for use in data analysis, GIS mapping, spreadsheets, etc.
It accounts for common variations in layout, abbreviations, typos, etc.
and can therefore process a range of real-world data.
Copyright (c) 2020-2022, James P. Imes, all rights reserved.
THIS LIBRARY IS NOT TO BE USED FOR ANY UNLICENSED COMMERCIAL PURPOSES OR FOR GENERATING OR MODIFYING LEGAL DESCRIPTIONS IN ANY LEGAL DOCUMENT! Intended for data analysis purposes ONLY. Read license and disclaimer prior to using for any purpose.
Feel free to reach out via my GitHub with feedback or inquiries, or to let me know if you run into any issues.
Also visit the GitHub page for a quickstart guide.
Bird’s-eye View¶
import pytrs
The two primary parsing classes in the library are PLSSDesc
and
Tract
, which are automatically imported as top-level classes.
The conceptual difference between these two classes is that a Tract
represents land within a single specific section; whereas a PLSSDesc
can represent land across any number of sections in any number of
townships (i.e. one or more tracts).
Parsing a PLSSDesc
object will create one or more Tract
objects.
Tract
objects can also be created directly, for when our dataset
already has the description blocks separated from their respective
Twp/Rge/Sec.
Tract
objects can also be parsed, in which case they will break down
their respective descriptions into lots and aliquot “quarter-quarters”.
Top-level classes and functions¶
These classes and functions are all imported with import pytrs
.
Classes for parsing:
PLSSDesc
PLSSDesc
PLSSDesc.__getitem__()
PLSSDesc.__init__()
PLSSDesc.config_tracts()
PLSSDesc.deduce_layout()
PLSSDesc.filter()
PLSSDesc.filter_duplicates()
PLSSDesc.filter_errors()
PLSSDesc.group_by()
PLSSDesc.group_by_nested()
PLSSDesc.iter_to_dict()
PLSSDesc.iter_to_list()
PLSSDesc.list_trs()
PLSSDesc.parse()
PLSSDesc.parse_tracts()
PLSSDesc.preprocess()
PLSSDesc.pretty_desc()
PLSSDesc.pretty_print_desc()
PLSSDesc.print_data()
PLSSDesc.print_desc()
PLSSDesc.quick_desc()
PLSSDesc.quick_desc_short()
PLSSDesc.require_colon
PLSSDesc.sort_tracts()
PLSSDesc.tracts_to_csv()
PLSSDesc.tracts_to_dict()
PLSSDesc.tracts_to_list()
PLSSDesc.tracts_to_str()
Tract
TRS
Classes for configuring the parsers:
Classes that are containers/extractors for parsed data:
TractList
TractList
TractList.config_tracts()
TractList.from_multiple()
TractList.iter_to_dict()
TractList.iter_to_list()
TractList.list_trs()
TractList.parse_tracts()
TractList.pretty_desc()
TractList.pretty_print_desc()
TractList.print_data()
TractList.print_desc()
TractList.quick_desc()
TractList.quick_desc_short()
TractList.snapshot_inside()
TractList.sort_grouped_tracts()
TractList.tracts_to_csv()
TractList.tracts_to_dict()
TractList.tracts_to_list()
TractList.tracts_to_str()
TRSList
Misc functions:
Information on layouts:
Additional modules¶
(These modules are not imported by default.)
Robust writing of parsed data to .csv files:
Tkinter-based GUI applications for getting user config data and Tract attributes:
Misc. utility functions:
License