/geoarrow-c

Experimental C and C++ implementation of the GeoArrow specification

Primary LanguageCApache License 2.0Apache-2.0

geoarrow-c

Codecov test coverage Documentation nanoarrow on GitHub

The geoarrow C library is a geospatial type system and generic coordinate-shuffling library written in C with bindings in C++, R, and Python. The library supports well-known binary (WKB), well-known text (ISO) and geoarrow encodings as Arrow extension types with all possible mutual conversions including support for Z, M, and ZM geometries.

The library and bindings are still in draft form pending an initial release of the geoarrow specification.

Get started in Python

import geoarrow.pyarrow as ga

ga.point()
# PointType(geoarrow.point)
ga.point().storage_type
# StructType(struct<x: double, y: double>)
ga.as_geoarrow(["POINT (0 1)"])
# PointArray:PointType(geoarrow.point)[1]
# <POINT (0 1)>