Skip to main content

GeoJSON import and export

GeoJSON is Siter's preferred interchange format for ad-hoc data movement. Imports and exports both round-trip cleanly, making GeoJSON the right format when you need to script transformations, move data through QGIS, or hand off a layer to a developer who'll work with it programmatically.

Learning objectives

By the end of this lesson you should be able to:

  • Export a GeoJSON file from a project
  • Import a GeoJSON file into an existing project
  • Recognize the geometry and attribute conventions Siter expects

Why GeoJSON over shapefile​

GeoJSONShapefile
File countOneFour-plus sidecars in a zip
Attribute namesNo length limit10-character limit
EncodingUTF-8 alwaysEncoding-dependent (.cpg)
Coordinate systemEmbedded in the fileSeparate .prj sidecar
Human-readableYes (it's JSON)No (binary)
Round-trip in SiterCleanestLossy on attribute names

For anything Siter-to-Siter or Siter-via-script, prefer GeoJSON. Shapefile remains relevant only for legacy interop with tools that don't speak GeoJSON.

Export​

[TODO: FILL IN — GeoJSON export UI flow: layer or project scope → export menu → file save. Note whether the export includes Siter-specific extensions (custom properties for type code, attributes, explosives) and whether those survive a round-trip.]

A Siter GeoJSON export typically includes:

  • Geometry per feature
  • Type code as a property
  • Attributes as properties (one per attribute)
  • Explosives as nested properties (one entry per hazard division)
  • Relationship metadata where applicable

[TODO: FILL IN — exact property naming conventions Siter uses on export and whether any data is dropped vs. preserved.]

Import​

Open the Import Layer panel from the Feature Layers sidebar's upload icon and pick the .geojson or .json file — or drag the file from your computer straight onto the map. On the Details tab set the Layer Name, Layer Type, Feature Labels column, and Default Feature Types; check the Features tab for features marked with errors (left out) or warnings (imported with a note); then click the save icon. See Layers → How to import a layer for the full steps.

After import:

  1. Verify the layer flavor matches your intent (see QD-visible vs background layers)
  2. Confirm type codes and attributes survived the import correctly
  3. Run analysis to verify the features participate as expected

Round-trip fidelity​

A GeoJSON exported from Siter and re-imported through Import Layer brings back the shapes, not the full facility records:

  • Geometry is preserved
  • Path facilities (roads) come back as ordinary polygons — since v0.32 the export doesn't write a road's centerline and width, so re-importing doesn't recreate the path layout
  • Names come from whichever column you choose for Feature Labels
  • Type codes come from the Default Feature Types you pick at import, not from the file's cat:: properties
  • Attributes, explosives, and relationships are not restored — the file's other properties are shown on the Features tab for reference only

To move complete facilities — type codes, attributes, explosives, relationships — between projects, use a project snapshot or archive (see Export and import) or Compare / Merge.

CRS conventions​

GeoJSON is conventionally in WGS84 (EPSG:4326) latitude/longitude. Siter expects this — if your source data is in a projected coordinate system, transform to WGS84 before importing.

[TODO: FILL IN — Siter's exact CRS expectations for GeoJSON, and any tolerance for non-WGS84 inputs.]

Try it​

Round-trip a layer:

  1. Export a QD-visible layer from one project as GeoJSON
  2. Open the exported file in a text editor and inspect the structure — note the type codes and attributes as JSON properties
  3. Drag the same file onto the map of a different project and import it
  4. Confirm the shapes match the source and that the type codes are the defaults you picked rather than the source's