5 releases (3 breaking)

0.4.0 Jan 27, 2023
0.3.1 Apr 1, 2022
0.3.0 Mar 13, 2022
0.2.0 Feb 27, 2021
0.1.0 Jan 5, 2021

#11 in #geo-json

Download history 12/week @ 2023-12-18 10/week @ 2024-02-19 14/week @ 2024-02-26 18/week @ 2024-03-11 88/week @ 2024-04-01

106 downloads per month

MIT/Apache

535KB
10K SLoC

GeoZero Shapefile driver

Reading Shapefiles with GeoZero API.

Features:

  • Read support for OGC simple feature types
  • Convert to GeoJSON, WKB (PostGIS/GeoPackage), WKT, GEOS, GDAL formats and more
  • Support for Multipatch types
  • Read spatial index
  • Read projection files

For writing Shapefiles either use shapefile-rs or the GDAL driver of GeoZero

Originally based on shapefile-rs from Thomas Montaigu.

Usage example

use geozero::geojson::GeoJsonWriter;

let reader = geozero_shp::Reader::from_path("poly.shp")?;
let mut json: Vec<u8> = Vec::new();
let cnt = reader.iter_features(GeoJsonWriter::new(&mut json))?.count();

Dependencies

~1.7–2.5MB
~53K SLoC