geoarrow-geojson

Crates.iogeoarrow-geojson
lib.rsgeoarrow-geojson
version0.7.0
created_at2025-10-10 19:20:57.072406+00
updated_at2026-01-05 04:01:36.731484+00
descriptionWrite GeoArrow arrays to GeoJSON.
homepage
repositoryhttps://github.com/geoarrow/geoarrow-rs
max_upload_size
id1877461
size88,390
Kyle Barron (kylebarron)

documentation

README

geoarrow-geojson

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}}
    
Commit count: 761

cargo fmt