Diesel Storage Tanks
What it does
Section titled “What it does”Loads petroleum storage tank location data (Petroleum_Storage_Tanks.geojson) into a PostGIS-enabled PostgreSQL database for spatial querying and mapping.
Pipeline
Section titled “Pipeline”src/diesel_storage_tanks/load.py:
- Connects via
utils.db.PostgresDBHelper(shared workspaceutilspackage). setup_postgis_extension— drops/recreates thepostgisextension.create_table— drops/recreatespetroleum_storage_tanks(columns:pst_id,lat_dd,long_dd,geometry GEOMETRY,properties JSONB).validate_geojson— checks thefeatureskey and reports invalid/missing geometries.load_geojson_to_db— bulk-inserts valid features viaST_GeomFromGeoJSON, within a transaction; logs progress/errors withloguru.
Single DVC-tracked source: Petroleum_Storage_Tanks.geojson (see data/registry.yml), registered under data/preprocessed/.
geojson, loguru, shared utils.db.PostgresDBHelper for the Postgres/PostGIS connection.
Status
Section titled “Status”Ingestion-only; the visualization layer has not been built out yet.