geozero-shp

Crates.iogeozero-shp
lib.rsgeozero-shp
version0.5.1
sourcesrc
created_at2021-01-05 23:08:47.232674
updated_at2024-09-26 08:32:03.611182
descriptionWARNING: The shp driver is now included in geozero.
homepagehttps://github.com/georust/geozero
repositoryhttps://github.com/georust/geozero
max_upload_size
id332498
size96,187
geozero-publishers (github:georust:geozero-publishers)

documentation

README

DEPRECATED: The shp driver is now included in geozero.

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();
Commit count: 565

cargo fmt