🌐 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
-
Input CRS
- GeoJSON — always assumed to be EPSG:4326 (WGS84) per the GeoJSON specification.
- Shapefile (SHP) — CRS is read from the included
.prjfile. - DXF — must provide
input.epsgexplicitly in the config (since DXF has no CRS metadata).
-
Output CRS
- Defined by the
output.epsgparameter 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.
- Defined by the
-
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:
- Read the SHP (using
.prjfor CRS). - Reproject into EPSG:3857.
- 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.epsgis not provided, results default to EPSG:4326. - Ensure your input CRS is defined correctly (e.g.,
.prjfor 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
- Learn about Reader Formats and their CRS requirements.
- Explore Writer Formats for output details.
- Try a Getting Started example with reprojection.