Giter Site home page Giter Site logo

shapefile-tools's Introduction

Some (very) basic shapefile utilities. Currently requires shapefiles to be unzipped and located in the same repo as the scripts.

read_shp.py

python read_shp.py <source-dir> -g <index of feature to display>

Reads a shapefile and prints information about its CRS, number of features etc, and a table of properties.

source-dir: an unzipped shapefile folder; assumes that all files in the folder have the same name as the folder.

-g / --geometry-index: Optional index of a specific feature in the shapefile; prints the feature's coordinates

rename_atttibutes.py

python rename_attributes.py <source-dir> <destination-dir>

Reads a shapefile, makes all the property names title case, adds a new property for the updated date and writes out the first 1000 features to a new shapefile.

source-dir: an unzipped shapefile folder; assumes that all files in the folder have the same name as the folder.

destination-dir: directory to write the new shapefile to.

shppandas.py

python shppandas.py <source-dir> <destination-dir>

Just an example of how to write a shapefile with geopandas instead of fiona; reads a shapefile, reprojects it to epsg=3857, writes out to a new shapefile.

shapefile-tools's People

Watchers

James Cloos avatar Becky Smith avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.