📄 CSV Writer
The CSV writer allows you to export results from Geoflip as Comma-Separated Values (CSV) files. This format is widely used for exchanging tabular data and is easy to open in databases, spreadsheets, or custom applications.
📜 Format Details
- File type:
.csv - Delivery: Always returned as a single CSV file.
- CRS handling: The output CRS is defined by
output.epsg. All geometries are reprojected into this CRS before being written. - Geometry column: A column named
geom_wktis always included. This contains the geometry of each feature in Well-Known Text (WKT) format.
Column Mapping
When exporting to CSV:
- Attributes → Written as plain text/numeric fields
- Geometry → Written into
geom_wktcolumn using WKT in the specifiedoutput.epsg
⚙️ Example Config
{
"input": { "format": "shp" },
"transformations": [
{ "type": "buffer", "distance": 50, "units": "meters" }
],
"output": {
"format": "csv",
"epsg": 4326
}
}
📑 Example API Call
curl -X POST https://api.geoflip.io/transform \
-F 'config={
"input":{"format":"shp"},
"transformations":[{"type":"buffer","distance":50,"units":"meters"}],
"output":{"format":"csv","epsg":4326}
}' \
-F "input_file=@/path/to/parcels.zip;type=application/zip"
Response
{ "job_id": "abcd-ef01-2345-6789" }
Poll for status:
curl https://api.geoflip.io/result/status/abcd-ef01-2345-6789
When the status is SUCCESS, download from the output_url:
curl -O https://api.geoflip.io/result/output/abcd-ef01-2345-6789
This will download a .csv file containing your transformed features, including attributes and a geom_wkt column in the requested EPSG.
🏗️ Load into Snowflake / BigQuery
Once the CSV is loaded through the GUI, you can convert the geom_wkt column into a GEOGRAPHY column named geom.
Snowflake
ALTER TABLE mydb.myschema.parcels
ADD COLUMN geom GEOGRAPHY;
UPDATE mydb.myschema.parcels
SET geom = TO_GEOGRAPHY(geom_wkt);
Use
TRY_TO_GEOGRAPHY(geom_wkt)if you want invalid WKT rows to becomeNULLinstead of raising an error.
BigQuery
ALTER TABLE `myproject.mydataset.parcels`
ADD COLUMN geom GEOGRAPHY;
UPDATE `myproject.mydataset.parcels`
SET geom = ST_GEOGFROMTEXT(geom_wkt);
Use
SAFE.ST_GEOGFROMTEXT(geom_wkt)if you want invalid WKT rows to returnNULL.
✅ Notes
- Geometries are always written into a
geom_wktcolumn. - The geometry CRS is controlled by the
output.epsgvalue. - Attributes are written into other CSV columns as-is.
- Suitable for workflows where data needs to be ingested into databases, BI tools, or spreadsheets.
➡️ Next Steps
- Learn about the GeoJSON Writer
- Learn about the Shapefile Writer
- Revisit Writer Formats Overview