simplefeatures

module
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 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 are two additional suite of test suits utilising an automatically generated test corpus. The test suite test every function against every input combination exhaustively, and compare the result against a reference implementation. They take much longer to run, and are designed to be used as a final double check for correctness. They can be run using the following commands:

docker-compose -f docker-compose-postgis.yml up --abort-on-container-exit
docker-compose -f docker-compose-cmprefimpl.yml up --abort-on-container-exit

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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