[ANN] gos2: S2 geometry library in Go

697 views
Skip to first unread message

David Symonds

unread,
Mar 13, 2013, 10:37:35 PM3/13/13
to golang-nuts, Daniel Nadasi
I'm pleased to announce the initial open source release of the Go port
of the S2 geometry library:

https://code.google.com/p/gos2/
http://godoc.org/code.google.com/p/gos2/s2

(or "go get code.google.com/p/gos2/s2".)

/*
Package s2 implements types and functions for working with geometry in
S² (spherical geometry).

Its related packages, parallel to this one, are s1 (operates on S¹),
r1 (operates on ℝ¹) and r3 (operates on ℝ³).

This package provides types and functions for the S2 cell hierarchy
and coordinate systems. The S2 cell hierarchy is a hierarchical
decomposition of the surface of a unit sphere (S²) into “cells”; it is
highly efficient, scales from continental size to under 1 cm² and
preserves spatial locality (nearby cells have close IDs).

A presentation that gives an overview of S2 is
https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/view.
*/


Note that it is not as complete as the C++ version it is based on, but
it works well for what it does support, and is sufficient for geo
indexing and the like.

Fumin Wang

unread,
Sep 14, 2014, 10:51:37 AM9/14/14
to golan...@googlegroups.com, dna...@google.com
This is great work and a much needed library, thanks a lot to you David and the other authors.
However, this port apparently still lacks a major part of the original C++/Java implementation, such as the S2RegionCoverer class and intersect methods of the Cell and S2LatLngRect classes.

I see that there are some attempts at completing this port including http://godoc.org/github.com/timehop/gos2/s2 but unfortunately none of them are on par.

Any plans or suggestions to get the community help out and involve deeper with the project at https://code.google.com/p/gos2/ ?

mho...@uber.com

unread,
May 5, 2017, 9:03:25 PM5/5/17
to golang-nuts, dna...@google.com
I am trying to find a group associated with https://code.google.com/archive/p/s2-geometry-library/. This is the only post that comes up when searching groups.

My question on the library is, Do the bounding polygons associated with a cell id include the boundaries or sides of the polygon? If so what sides (top, left), (bottom, left)... etc?

Thanks,
Matthew Hoggan

dja...@gmail.com

unread,
May 5, 2017, 10:22:51 PM5/5/17
to golang-nuts
Hi,
this package is moved to
just in case you don't noticed.
Djadala

Robert Snedegar

unread,
May 6, 2017, 2:32:48 PM5/6/17
to mho...@uber.com, golang-nuts
Are you using the C++ or Go libraries?  

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages