Project archive · The Wilderness Society · 2015–2019
The Bureau of Land Management records every oil, gas, coal, wind and solar authorization on public land. For years it published them only as text reports with legal land descriptions. This project scraped those reports with Python and Selenium and turned each description into a polygon.
The decoder on this page does the core step by hand. Type a legal description and it shades the part of a one-mile section it describes.
Examples are rows from a California solar right-of-way used to test the tool: San Bernardino Meridian, T3S R15E, Riverside County. IDs follow the PLSS geodatabase key the scripts build.
The problem
The BLM manages the federal mineral estate, including minerals under land run by the Forest Service, Park Service and Fish and Wildlife Service. Its system of record was LR2000, the Legacy Rehost System. LR2000 could report on any lease or right-of-way, but only as a table.
GIS coverage was patchy. State offices published some layers, not every state published mineral leasing, and none carried everything in LR2000. The BLM's GeoCommunicator site filled part of the gap until its funding was removed in 2011 over concerns about data quality. The boundaries it derived from LR2000's legal descriptions were not accurate enough.
Each record describes its location in the Public Land Survey System: meridian, township, range, section, then aliquot parts such as E2NE. A person can find one in ArcMap by selecting PLSS polygons by hand. The Wyoming state office alone had more than 155,000 case records.
Manual selection = mind-numbing madness.Slide 8, Esri Developer Summit 2017
The pipeline
The final version is seven Python modules, about 2,500 lines, run from an ArcGIS script tool. It went through 28 numbered revisions of the shape-building module between 2015 and 2016.
Administrative state, case types, date range, disposition, a list or range of serial numbers, or a master search for everything.
Selenium drives Firefox through the LR2000 criteria form and saves the summary report. A custom profile sends downloads straight to a folder with no dialog.
LR2000 accepts 60 serial numbers per detail request. The script loops until the list is done, with randomized pauses and up to three attempts at each click.
One detail file holds several stacked sub-tables. Regular expressions separate them into lessee, coordinates, relinquished, action and remarks tables.
Each coordinate row becomes a PLSS key. ArcPy selects the matching polygons with a SQL IN query, which ran faster than a join, then dissolves them by serial number.
Each run is appended to a per-state, per-commodity geodatabase and de-duplicated. A master list records which cases have shapes and which have no detail in LR2000.
Matching and error checking
The same parcel shows up in LR2000 as lot 1, L1 or 1. Ranges such as 1-4 have to be expanded. Columns that hold comma-separated lists are quoted in the CSV, and some values contain quotes themselves. In places the PLSS layer is simply missing.
The tool normalizes what it can. Anything it still can't match at the quarter-quarter level is drawn from the next level up, and the miss is counted. Every finished shape carries the two counts and an accuracy flag, so a map reader can tell an exact boundary from an approximation.
correct only when both error counts are zero.Quarter-quarter sections and lots, nominally 40 acres. Exact match on the concatenated key.
The whole section, 640 acres. Counted in SUM_ERROR_SECDIV_NUM.
The 36-section township. Counted in SUM_ERROR_FRSTDIV_NUM.
Coverage · 12 September 2019
Counts are by BLM administrative state, across all commodities. About one case in five fell back from the second division for at least one row, and 3.4% fell back to the township.
| Admin state | Records scraped | Total records | Authorized scraped | Authorized total | Authorized complete | 2nd division fallback | 1st division fallback |
|---|---|---|---|---|---|---|---|
| Total | 548,745 | 797,851 | 218,754 | 251,245 | 87% | 19.89% | 3.41% |
Source: project tracking sheet shown in the September 2019 overview. Eastern States had not been scraped. Remaining at that date: 32,491 authorized cases and 249,106 records in all.
What it made possible
The shapes were loaded to PostgreSQL and ArcGIS Server and published as map services with their related tables. By 2019 the work had a name, the Federal Lands Use & Transparency Tool.
Six of every seven were already closed. Mapping them shows where leasing has been, as well as where it is now.
Because closed leases were mapped too, the full footprint could be measured. Forty percent of federal public land in the Western states has been under lease at some point.
Timeline
The first toolbox models turn one California solar right-of-way's land description into polygons.
Selenium scraping, parsing and shape building run as one tool. The shape module reaches version 28.
Presented as "Using Python and Selenium to Make Geographical Sense of BLM's LR2000."
548,745 records scraped. Next steps: extract everything, update services weekly, add mining claims and land transfers.