| Crates.io | geoarrow-geojson |
| lib.rs | geoarrow-geojson |
| version | 0.7.0 |
| created_at | 2025-10-10 19:20:57.072406+00 |
| updated_at | 2026-01-05 04:01:36.731484+00 |
| description | Write GeoArrow arrays to GeoJSON. |
| homepage | |
| repository | https://github.com/geoarrow/geoarrow-rs |
| max_upload_size | |
| id | 1877461 |
| size | 88,390 |
This crate provides two types of writers.
[GeoJsonWriter][crate::writer::GeoJsonWriter] streams Arrow record batches as a GeoJSON FeatureCollection, writing the collection header once and appending each batch of features. Use it when you need a single GeoJSON document containing all features.
Example output (formatted for readability):
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [30, 10] },
"properties": { "count": 10 }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [40, 20] },
"properties": { "count": 20 }
}
]
}
[GeoJsonLinesWriter][crate::writer::GeoJsonWriter] writes each feature as a standalone GeoJSON object separated by newlines, making it suitable for line-delimited sinks and streaming pipelines.
Example output:
{"type":"Feature","geometry":{"type":"Point","coordinates":[30,10]},"properties":{"count":10}}
{"type":"Feature","geometry":{"type":"Point","coordinates":[40,20]},"properties":{"count":20}}