combined_municipal_limits_geoprocessing is a Python command line ETL script that combines City Limits from multiple GIS layers into one GIS layer using a unified schema for Limestone County (Alabama, USA). This takes five (5) files, with four (4) different schema and two (2) projections. The script merges the files are merged into one layer with one projection and one schema.
The script makes the process of updating the combined GIS layer fast, easy, and less error prone.
GIS data from different sources has attribute tables that can vary widely:
Here are the five (5) different GIS layers as viewed GIS window:
The resulting GIS data of the ETL script.
NAME
column.The resulting combined table (some columns have been omitted):
NAME | ProperName | MUNITYP | GNIS | LOCALFIPS | LASTUPDATE | ChangeDesc | MUNIAREA |
---|---|---|---|---|---|---|---|
Ardmore | City of Ardmore | City | 1304866 | 01640 | 8/23/13 | NULL | 4.539 |
Athens | City of Athens | City | 2403123 | 02956 | 2/23/21 | Added Annex... | 41.063 |
Decatur | City of Decatur | City | 2404206 | 20104 | 6/10/19 | NULL | 60.786 |
Huntsville | City of Huntsville | City | 2404746 | 37000 | 5/31/19 | NULL | 218.987 |
Madison | City of Madison | City | 2404989 | 45784 | 9/2/16 | NULL | 30.478 |
Ardmore | Town of Ardmore | Town | 2405163 | 02260 | 12/9/14 | Verified limits... | 2.050 |
Elkmont | Town of Elkmont | Town | 2406437 | 23488 | 12/8/14 | Mapped based... | 1.725 |
Lester | Town of Lester | Town | 2406007 | 42352 | 5/11/15 | Verified limits... | 1.326 |
Mooresville | Town of Mooresville | Town | 2406188 | 51264 | 8/23/13 | NULL | 0.235 |
Screenshot of table in QGIS software.
I learned the hard way that Python virtual environment are a great way to keep an the API stable, so that the code will most likely still work later. Updates may have the unintended consequence of changing the API, for better or worse. Python virtual environments allow the developer to upgrade when the developer is ready to upgrade. Not when software in the rest of the environment has been upgraded.
ETL, GIS, Python, geoprocessing — May 1, 2023
Made with Hexo . Website's repo.