Skip to main content

🌐 Reprojection in Geoflip

Geoflip makes coordinate system reprojection simple.

Unlike traditional GIS workflows where you must explicitly run a "reproject" tool, reprojection is inherent in every API request.

By setting the desired output.epsg in your job config, Geoflip automatically reprojects your input data into the target CRS.


📜 How It Works

  1. Input CRS

    • GeoJSON — always assumed to be EPSG:4326 (WGS84) per the GeoJSON specification.
    • Shapefile (SHP) — CRS is read from the included .prj file.
    • DXF — must provide input.epsg explicitly in the config (since DXF has no CRS metadata).
  2. Output CRS

    • Defined by the output.epsg parameter in your request config.
    • Defaults to EPSG:4326 if not specified.
    • GeoJSON outputs are always EPSG:4326, regardless of what you set, since the spec does not allow custom CRS.
  3. Transformation

    • Geoflip reprojects all geometries to the target CRS before writing the output file.

⚙️ Example Config

Reproject Shapefile data into Web Mercator (EPSG:3857) and export as DXF:

{
"input": {
"format": "shp"
},
"transformations": [],
"output": {
"format": "dxf",
"epsg": 3857
}
}

📑 Example API Call

curl -X POST https://api.geoflip.io/transform \
-F 'config={
"input":{"format":"shp"},
"transformations":[],
"output":{"format":"dxf","epsg":3857}
}' \
-F "input_file=@/path/to/parcels.zip;type=application/zip"

This will:

  1. Read the SHP (using .prj for CRS).
  2. Reproject into EPSG:3857.
  3. Write a DXF file in the requested CRS.

⚠️ Notes on GeoJSON & KML/KMZ

  • GeoJSON inputs are always treated as EPSG:4326.
  • GeoJSON outputs will always be EPSG:4326, even if you request a different EPSG. This is by design, as the GeoJSON spec requires WGS84 longitude/latitude.

✅ General Notes

  • If output.epsg is not provided, results default to EPSG:4326.
  • Ensure your input CRS is defined correctly (e.g., .prj for SHP, explicit EPSG for DXF).
  • Reprojection works with all supported writer formats (geojson, shp, dxf).
  • You can chain reprojection with transformations — e.g., buffer in input CRS, then export in a different CRS.

➡️ Next Steps