Awesome
Turf.jl
Turf is a modular geospatial engine written in JavaScript. It includes traditional spatial operations, helper functions for creating GeoJSON data, and data classification and statistics tools.
This library is a port of Turf.js to the Julia programming language for geospatial analysis.
NOTE: This package is no longer being actively developed. Please see https://github.com/philoez98/Turf.jl instead.
Installation
Turf.jl
is not a listed package (yet). Heres what you're going to need to do to install it:
# You'll need GeoJSON, so install it if you haven't already
Pkg.add("GeoJSON")
# Now download Turf direct from this repository
Pkg.clone("https://github.com/yeesian/Turf.jl.git")
# This will install it to your Julia package directory.
# Running Pkg.update() will always give you the freshest version of Turf
Pkg.test("Turf")
# Doublecheck that it works
##Data in Turf
Turf uses GeoJSON for all geographic data, and expects the data to be standard WGS84 longitude, latitude coordinates. Check out geojson.io for a tool to easily create this data.
Basic Usage
Most Turf functions work with GeoJSON features, provided by the GeoJSON.jl package. These are are pieces of data that represent a collection of properties (ie: population, elevation, zipcode, etc.) along with a geometry.
We provide a few examples of its usage below: