#shapefile

geozero-shp

Shapefile reader with GeoZero API

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

#66 in #geo

41 downloads per month

MIT/Apache

520KB
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.6MB
~54K SLoC