# an-empty-string/asr2geojson architecture

> Architecture diagram of the GitHub repository an-empty-string/asr2geojson, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/an-empty-string/asr2geojson
- Repository: https://github.com/an-empty-string/asr2geojson

## Overview

asr2geojson downloads FCC Antenna Structure Registration data, imports it into SQLite, and exports spatial formats for GIS use. The documented workflow has retrieval, file normalization, import, and format-conversion stages. The Makefile and schema.sql contents were not sampled, so links depending on their exact implementation are limited to documented behavior.

Main entry points: [`Makefile`](https://github.com/an-empty-string/asr2geojson/blob/main/Makefile) (Make workflow), [`import_data.py`](https://github.com/an-empty-string/asr2geojson/blob/main/import_data.py) (Data importer), [`out_geojson.py`](https://github.com/an-empty-string/asr2geojson/blob/main/out_geojson.py) (GeoJSON exporter), [`fix_file.py`](https://github.com/an-empty-string/asr2geojson/blob/main/fix_file.py) (File normalization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Data acquisition"]
  node_make["Make workflow"]
end

subgraph group_processing["Data processing"]
  node_fix["File normalization<br/>[fix_file.py]"]
  node_import["Data importer<br/>[import_data.py]"]
  node_schema["SQLite schema<br/>[schema.sql]"]
  node_sqlite[("ASR database")]
end

subgraph group_outputs["Spatial outputs"]
  node_geojson["GeoJSON exporter<br/>[out_geojson.py]"]
  node_ogr["GDAL ogr2ogr"]
  node_geojsonfile["GeoJSON file"]
  node_geopackage[("GeoPackage")]
  node_spatialite[("SpatiaLite")]
end

node_user(("GIS user"))
node_fcc[("FCC ASR data")]

node_user -->|"runs"| node_make
node_fcc -->|"provides data"| node_make
node_make -->|"normalizes files"| node_fix
node_fix -->|"supplies fixed data"| node_import
node_import -->|"reads table map"| node_schema
node_import -->|"writes records"| node_sqlite
node_geojson -->|"reads tables"| node_sqlite
node_geojson -->|"writes features"| node_geojsonfile
node_make -->|"converts formats"| node_ogr
node_ogr -->|"writes"| node_geopackage
node_ogr -->|"writes"| node_spatialite

click node_make "https://github.com/an-empty-string/asr2geojson/blob/main/Makefile"
click node_fix "https://github.com/an-empty-string/asr2geojson/blob/main/fix_file.py"
click node_import "https://github.com/an-empty-string/asr2geojson/blob/main/import_data.py"
click node_schema "https://github.com/an-empty-string/asr2geojson/blob/main/schema.sql"
click node_geojson "https://github.com/an-empty-string/asr2geojson/blob/main/out_geojson.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_make,node_user toneBlue
class node_fix,node_import,node_schema,node_sqlite,node_fcc toneAmber
class node_geojson,node_ogr,node_geojsonfile,node_geopackage,node_spatialite toneMint
```

## Components

### Data acquisition

- [Make workflow](https://github.com/an-empty-string/asr2geojson/blob/main/Makefile): `Makefile`

### Data processing

- [File normalization](https://github.com/an-empty-string/asr2geojson/blob/main/fix_file.py): `fix_file.py`
- [Data importer](https://github.com/an-empty-string/asr2geojson/blob/main/import_data.py): `import_data.py`
- [SQLite schema](https://github.com/an-empty-string/asr2geojson/blob/main/schema.sql): `schema.sql`
- **ASR database**

### Spatial outputs

- [GeoJSON exporter](https://github.com/an-empty-string/asr2geojson/blob/main/out_geojson.py): `out_geojson.py`
- **GDAL ogr2ogr**
- **GeoJSON file**
- **GeoPackage**
- **SpatiaLite**

### Other components

- **GIS user**
- **FCC ASR data**

## Connections

- GIS user → Make workflow: runs
- FCC ASR data → Make workflow: provides data
- Make workflow → File normalization: normalizes files
- File normalization → Data importer: supplies fixed data
- Data importer → SQLite schema: reads table map
- Data importer → ASR database: writes records
- GeoJSON exporter → ASR database: reads tables
- GeoJSON exporter → GeoJSON file: writes features
- Make workflow → GDAL ogr2ogr: converts formats
- GDAL ogr2ogr → GeoPackage: writes
- GDAL ogr2ogr → SpatiaLite: writes
