simplefeatures

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2020 License: MIT

README

Simple Features

Build Status Documentation

Simple Features is a pure Go Implementation of the OpenGIS Simple Feature Access Specification (which can be found here).

The specification describes a common access and storage model for 2-dimensional geometries. This is the same access and storage model used by libraries such as GEOS, JTS, and PostGIS.

Changelog

The changelog can be found here.

Supported Features
  • Marshalling/unmarshalling:

    • WKT (well known text)
    • WKB (well known binary)
    • GeoJSON
  • Geometry attribute calculations:

    • Geometry validity checks
    • Dimensionality check
    • Bounding box calculation
    • Emptiness check
    • Boundary calculation
  • Spatial analysis:

    • Convex Hull calculation
    • Intersects check
    • Length calculation
    • Closed geometry calculation
    • Ring property calculation
    • Area calculation
    • Centroid calculation
In the works
  • Spatial analysis:
    • Intersection calculation
    • Spatially equality calculation
    • Point on surface calculation
Features Not Planned Yet
  • SRIDs

  • 3D/Measure coordinates.

  • Spatial analysis:

    • Geometry buffering
    • Disjoint check
    • Touches check
    • Crosses check
    • Within check
    • Contains check
    • Overlaps check
    • Relates check
Tests

Some of the tests have a dependency on a Postgis database being available.

While the tests can be run in the usual Go way if you have Postgis set up locally, it's easier to run the tests using docker-compose:

docker-compose up --abort-on-container-exit

There is also an additional suite of tests utilising an automatically generated test corpus. This test suite tests every function against every input combination exhaustively, and compares the result against PostGIS. These take much longer to run, and are designed to be used as a final double check for correctness. They can be run using:

docker-compose -f docker-compose-full.yml up --abort-on-container-exit

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL