All Projects → JuliaGeo → Shapefile.jl

JuliaGeo / Shapefile.jl

Licence: other
Parsing .shp files in Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to Shapefile.jl

GeoJSON.jl
Utilities for working with GeoJSON data in Julia
Stars: ✭ 46 (+15%)
Mutual labels:  vector, geo, geospatial, gis, io
GDAL.jl
Thin Julia wrapper for GDAL - Geospatial Data Abstraction Library
Stars: ✭ 78 (+95%)
Mutual labels:  vector, geo, geospatial, io
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+1017.5%)
Mutual labels:  gis, geospatial, geo
NetCDF.jl
NetCDF support for the julia programming language
Stars: ✭ 102 (+155%)
Mutual labels:  geo, geospatial, io
georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: ✭ 168 (+320%)
Mutual labels:  geo, geospatial, gis
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (+845%)
Mutual labels:  gis, geospatial, geo
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (+1040%)
Mutual labels:  gis, geospatial, geo
GMT.jl
Generic Mapping Tools Library Wrapper for Julia
Stars: ✭ 148 (+270%)
Mutual labels:  geo, geospatial, gis
Geocube
Tool to convert geopandas vector data into rasterized xarray data.
Stars: ✭ 87 (+117.5%)
Mutual labels:  vector, gis, geospatial
turf-go
A Go language port of Turf.js
Stars: ✭ 41 (+2.5%)
Mutual labels:  geo, geospatial, gis
Proj4.jl
Julia wrapper for the PROJ cartographic projections library
Stars: ✭ 23 (-42.5%)
Mutual labels:  gis, geospatial, geo
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+11505%)
Mutual labels:  gis, geospatial, shapefile
GeoArrays.jl
Simple geographical raster interaction built on top of ArchGDAL, GDAL and CoordinateTransformations
Stars: ✭ 42 (+5%)
Mutual labels:  geo, gis, io
Python Geospatial
A collection of Python packages for geospatial analysis with binder-ready notebook examples
Stars: ✭ 187 (+367.5%)
Mutual labels:  vector, gis, geospatial
Election Geodata
Precinct shapes (and vote results) for US elections past, present, and future
Stars: ✭ 289 (+622.5%)
Mutual labels:  geospatial, geo, shapefile
pyGISS
📡 A lightweight GIS Software in less than 100 lines of code
Stars: ✭ 114 (+185%)
Mutual labels:  geospatial, gis, shapefile
Pyearth
🌐 A lightweight 3D visualization of the earth in 150 lines of Qt/OpenGL
Stars: ✭ 78 (+95%)
Mutual labels:  gis, geospatial, shapefile
Awesome Gis
😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.
Stars: ✭ 2,582 (+6355%)
Mutual labels:  gis, geospatial, geo
pyturf
A modular geospatial engine written in python
Stars: ✭ 15 (-62.5%)
Mutual labels:  geo, geospatial, gis
Grass
GRASS GIS - free and open source Geographic Information System (GIS)
Stars: ✭ 281 (+602.5%)
Mutual labels:  vector, gis, geospatial

Shapefile

CI

This library supports reading ESRI Shapefiles in pure Julia.

Quick Start

Basic example of reading a shapefile from test cases:

using Shapefile

path = joinpath(dirname(pathof(Shapefile)),"..","test","shapelib_testcases","test.shp")
table = Shapefile.Table(path)

# if you only want the geometries and not the metadata in the DBF file
geoms = Shapefile.shapes(table)

# whole columns can be retrieved by their name
table.Descriptio  # => Union{String, Missing}["Square with triangle missing", "Smaller triangle", missing]

# example function that iterates over the rows and gathers shapes that meet specific criteria
function selectshapes(table)
    geoms = empty(Shapefile.shapes(table))
    for row in table
        if !ismissing(row.TestDouble) && row.TestDouble < 2000.0
            push!(geoms, Shapefile.shape(row))
        end
    end
    return geoms
end

# the metadata can be converted to other Tables such as DataFrame
using DataFrames
df = DataFrame(table)

Shapefiles can contain multiple parts for each shape entity. Use GeoInterface.coordinates to fully decompose the shape data into parts.

# Example of converting the 1st shape of the file into parts (array of coordinates)
julia> GeoInterface.coordinates(Shapefile.shape(first(table)))
2-element Array{Array{Array{Array{Float64,1},1},1},1}:
 Array{Array{Float64,1},1}[Array{Float64,1}[[20.0, 20.0], ...]]
 Array{Array{Float64,1},1}[Array{Float64,1}[[0.0, 0.0], ...]]

Alternative packages

If you want another lightweight pure Julia package for reading feature files, consider also GeoJSON.jl.

For much more fully featured support for reading and writing geospatial data, at the cost of a larger binary dependency, look at GDAL.jl or ArchGDAL.jl packages. The latter builds a higher level API on top of GDAL.jl.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].