Giter Site home page Giter Site logo

iucn-red-list-spatial-data's Introduction

iucn-red-list-spatial-data

Converting IUCN Red List to GeoJSON

Download IUCN data

Once you have created an account at http://www.iucnredlist.org/ you can download data as shapefiles.

Converting to GeoJSON

For background see How to convert Shapefiles to GeoJSON maps for use on GitHub (and why you should) and Managing GeoJSON data using GDAL.

IUCN shapefiles can be big, and the resulting GeoJSON can be huge (for example, if a species distribution is based on geographic provinces, and the polygons follow those the geographical boundaries with a high degree of precision).

Install GDAL

On a Mac download precompiled GDAL from http://www.kyngchaos.com/software:frameworks and add

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH

To .bash_profile

Convert one file

Simply use ogr2ogr:

ogr2ogr -f GeoJson species_13418.geojson species_13418.shp

Extract GeoJSON for one species from multi-species file

The GDAL utility ogr2ogr can be used to extract and simplify GeoJSON. For example, given the data for shrimps (FW_SHRIMP) we can extract data for Euryrhynchus amazoniensis like this:

ogr2ogr -f GeoJson Euryrhynchus_amazoniensis.geojson FW_SHRIMP.shp -sql "SELECT * FROM FW_SHRIMP WHERE binomial='Euryrhynchus amazoniensis'" -simplify 0.1

Note the use of -simplify 0.1 to simplify the polygon (without this the file is huge), and the SQL to extract just the data for one species (the species in the dataset are listed din the *.dbf file).

iucn-red-list-spatial-data's People

Contributors

rdmpage avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

dalavancloud

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.