SimpleFeatures.jl

Working with simple feature GIS data in Julia
Author acgold
Popularity
9 Stars
Updated Last
1 Year Ago
Started In
July 2022

SimpleFeatures

Dev Build Status Coverage

Working with simple feature GIS data in Julia

Fast reading, analyzing, manipulating, and writing vector GIS data in Julia. This package:

  • Works with feature data as a DataFrame
  • Stores coordinate reference system (crs) info with the DataFrame and uses it automatically
  • Uses a custom geometry type to interface with GDAL and GEOS for fast I/O and operations

About

The SimpleFeatures package aims to simplify working with geospatial data in Julia.

This package currently offers some basic spatial operations, and more will be added in the future. See docs for more info and examples.

This package creates a SimpleFeature custom type that effectively functions as a DataFrame containing feature data but also contains projection and geometry type info.

Geometries are represented as another custom type called sfgeom. The sfgeom type follows the GeoInterface standard, so it can be converted into other geometry types and GeoInterface functions will work.

Example:

SimpleFeature
---------
geomtype:  wkbPolygon
crs:       PROJCRS["NAD83(2011) / UTM zone 17N",BASEGEOGCRS["NAD83(2011)",DATUM["NAD83 (National Spatial Refere..."
---------
features:  
1000×2 DataFrame
  Row │ geom                          lyr.1 
      │ sfgeom                        Int32 
──────┼─────────────────────────────────────
    1 │ POLYGON ((853787 3905499,...      1
    2 │ POLYGON ((853800 3905499,...      1
    3 │ POLYGON ((853803 3905499,...      1
                    
  998 │ POLYGON ((904045 3905468,...      1
  999 │ POLYGON ((905355 3905468,...      1
 1000 │ POLYGON ((905561 3905469,...      1
                            994 rows omitted

To directly access the DataFrame, crs info, or geometry info, just add .df, .crs, or .geomtype at the end of your SimpleFeature object's name.

Disclaimer: This package is very young and under active development. More tests and checks (e.g., making sure projections match before performing operations) need to be added. See License.md for additional details.

Installation

SimpleFeatures can be installed from the Pkg REPL (press ] in the Julia REPL):

pkg> add SimpleFeatures

Or install from GitHub for the latest:

using Pkg
Pkg.add("https://github.com/acgold/SimpleFeatures.jl.git")