[ANN] [Geospatial] New set of Go bindings for GEOS

99 views
Skip to first unread message

twp...@gmail.com

unread,
Jun 20, 2021, 1:37:48 PM6/20/21
to golang-nuts
GEOS is the standard geometry library that underpins PostGIS and much of the open source geospatial world.

https://github.com/twpayne/go-geos is a new set of Go bindings for GEOS that make it easy to use GEOS geometries in your Go applications. Features include:
  • Fluent Go API.
  • Low-level Context, CoordSeq, Geom, and PrepGeom types provide access to all GEOS methods.
  • High-level geometry.Geometry type implements all GEOS functionality and many standard Go interfaces, including database/sql/driver.Valuer and database/sql.Scanner (WKB) for PostGIS database integration and encoding/json.Marshaler and encoding/json.Unmarshaler (GeoJSON). See the PostGIS example for a demonstration of the use of these interfaces.
  • Concurrency-safe. go-geos uses GEOS's threadsafe *_r functions under the hood, with locking to ensure safety, even when used across multiple goroutines. For best performance, use one geos.Context per goroutine.
  • Caching of geometry properties to avoid cgo overhead.
  • Optimized GeoJSON encoder.
  • Automatic finalization of GEOS objects.
Reply all
Reply to author
Forward
0 new messages