Python module to ingest and process Texas Railroad Commission (RRC) Digital Map Information from .zip archives
Project description
RRC Mapdata Parser
A Python module to ingest and process Texas Railroad Commission (RRC) Digital Map Information directly from exported .zip archives.
Overview
This package processes ESRI Shapefile collections from RRC GIS exports. Currently focused on Wells layer with planned expansion to:
| Layer | Status | Description |
|---|---|---|
| Wells | ✅ Implemented | Surface, Bottom, and Arc features |
| Base | 🚧 Planned | Airports, Cities, Roads, etc. |
| Surveys | 🚧 Planned | Lines, Polygons, Bay tracts |
| Pipelines | 🚧 Planned | Abandoned, Liquid, Gas |
Installation
pip install rrc-mapdata-parser
For development:
pip install -e ".[dev]"
Usage
Main Parser Class (Recommended)
from rrc_mapdata_parser import RRCMapdataParser
# Create parser instance
parser = RRCMapdataParser(convert_values=True)
# Parse a zip file
result = parser.parse("well329.zip")
# Access wells data
wells = result.wells
print(f"County FIPS: {result.fips}")
print(f"Surface wells: {wells.surface_count}")
print(f"Bottom holes: {wells.bottom_count}")
print(f"Arcs: {wells.arc_count}")
# Iterate over surface wells
for well in wells.surface:
print(f"API: {well.get('api12')}, Type: {well.get('SYMNUM')}")
# Find a specific well by API
well = wells.get_well_by_api("423290001234")
Processing Multiple Files
parser = RRCMapdataParser()
# Process multiple counties
for result in parser.parse_many(["well329.zip", "well307.zip"]):
print(f"Processed {result.fips}: {result.wells.surface_count} wells")
Low-Level Functions
from rrc_mapdata_parser import ingest_zip, parse_shapefile
# Direct ingestion
result = ingest_zip("well329.zip", convert_values=True)
# Direct shapefile parsing
records = parse_shapefile("well329s.shp", convert_values=True)
Wells Layer Data
Layer Types
| Pattern | Layer Type | Description |
|---|---|---|
well<fips>s.* |
Surface | Surface well point locations |
well<fips>b.* |
Bottom | Bottom hole point locations |
well<fips>l.* |
Arc | Lines connecting surface to bottom |
Primary Keys
APINUM- 12-digit API number (includes state code 42)API10- 10-digit API numberAPI- 8-digit API number
Coordinates
All coordinates maintain double-precision (DOUBLE 18, 8):
LAT27,LONG27- NAD27 datumLAT83,LONG83- NAD83 datum
Relational Fields
SURFACE_ID- Links to surface well pointsBOTTOM_ID- Links to bottom hole points
Code Conversion
With convert_values=True, numeric codes become readable text:
| Field | Example Code | Converted Value |
|---|---|---|
| SYMNUM | 4 | "Oil Well" |
| SYMNUM | 5 | "Gas Well" |
| SYMNUM | 11 | "Injection/Disposal Well" |
| RELIAB | 20 | "WELLBORE Distances" |
| RELIAB | 45 | "Field Inspection by RRC personnel" |
Technical Specifications
| Property | Value |
|---|---|
| Coordinate System | Geographic (Decimal Degrees) |
| Default Datum | NAD27 |
| Character Encoding | ISO-8859-1 |
| Storage Overhead | 1.5x - 2x of compressed size |
Testing
# Run tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src/rrc_mapdata_parser
Place sample data at tests/data/well329.zip for integration tests.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rrc_mapdata_parser-0.1.0.tar.gz.
File metadata
- Download URL: rrc_mapdata_parser-0.1.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7546c2cc6e95a21c5d6baa7c6d824c79e2af32534683de9c2433f16c9209916
|
|
| MD5 |
9b7771d0e166286eea57ffc1366aa23b
|
|
| BLAKE2b-256 |
7214b6fa24f0ab3ccd2a8044ecec825e3ec817ec0d6db6655c3b1d459209511b
|
File details
Details for the file rrc_mapdata_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rrc_mapdata_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db19ddaf56c183de23c47a10f60bc12936020bb404e0a12b1703966088b7a64
|
|
| MD5 |
e6f1f9b34f1f134627ea7e5345a261f4
|
|
| BLAKE2b-256 |
1457371b50c4240eefc891b5440899905580c12651aeb97965af96473200c35a
|