Skip to content

Commit df110ce

Browse files
abhinavdangetirsnedjmrbrawerjonatasemidio
authored
Merging latest from golang/geo into blevesearch/geo (#24)
``` * 7807d88 Abhinav Dangeti | Add github workflows * f0977fe Abhinav Dangeti | Reroute golang/geo imports to blevesearch/geo * d718384 Abhi Dangeti | Merge branch 'master' into golang_master |\ | * 6c403ec Abhi Dangeti | Upgrade to [email protected] (#17) | * d029aee Abhi Dangeti | Move up to [email protected] (#16) | * e7a63fe Abhi Dangeti | MB-54131: Corner cases when buffer not setup & formatting (#15) | * 045f1ed Likith B | MB-54131: Geoshape query decode optimization (#14) | * 7135870 Abhi Dangeti | Update GO version (#13) | * c261b53 Abhi Dangeti | Upgrade to [email protected] (#12) | * 7bbb772 Abhi Dangeti | Upgrade to [email protected] (#11) | * a8f4556 Aditi Ahuja | Updated intersection logic (#10) | * 256c704 Aditi Ahuja | Added disjoint relation (#8) | * 1bc1d50 Aditi Ahuja | Fix for linestrings enclosed by polygon (#9) | * 6c4acc9 Abhi Dangeti | Set bleve/bleve_index_api to v1.0.3 (#7) | * c569765 Sreekanth Sivasankaran | Adding Value() ([]byte, error) method (#6) | * aab42ad Sreekanth Sivasankaran | Merge pull request #5 from blevesearch/vertex_linestring_fix | |\ | | * c1e383d Sreekanth Sivasankaran | Fix for Polygon-LineString containment | |/ | * e435177 Sreekanth Sivasankaran | Merge pull request #4 from blevesearch/jsoniter_version | |\ | | * c8c7ced Sreekanth Sivasankaran | Reverting to a stable jsoniter version | * | 1e74e8d Sreekanth Sivasankaran | Merge pull request #3 from blevesearch/polygon_hole_fix | |\| | | * fa50322 Sreekanth Sivasankaran | Include the polygon vertices for WithIn query | |/ | * 4ff549e Sreekanth Sivasankaran | Merge pull request #2 from blevesearch/linestring_fix | |\ | | * d9ebb09 Sreekanth Sivasankaran | Updating LineString for multiple points. | |/ | * 0850958 Sreekanth Sivasankaran | Merge pull request #1 from blevesearch/s2_encode_decode | |\ | | * 4b50f5f Sreekanth Sivasankaran | Introduce Serialisation method for the geo shapes. | |/ | * 2b95922 Sreekanth Sivasankaran | Fix hasCrossingRelation() method | * 5734244 Sreekanth Sivasankaran | updating repo name in go.mod | * 2e12926 Sreekanth Sivasankaran | updating readme | * f95441b Sreekanth Sivasankaran | adding region term indexer unit tests | * 1daa5fa Sreekanth Sivasankaran | Introduce new APIs, | * 187b978 Sreekanth Sivasankaran | adding commentary for region term indexing Options | * 37c8f96 Sreekanth Sivasankaran | adding more commentary and utility functions | * 0a702af Sreekanth Sivasankaran | Introducing CapFromCenterAndRadius api | * ecc18e7 Sreekanth Sivasankaran | updating the go.mod files | * 2112278 Sreekanth Sivasankaran | Update rect.go | * 761d9da Sreekanth Sivasankaran | Update go.mod | * c9f6529 Sreekanth Sivasankaran | cb build errors | * c7de933 Sreekanth Sivasankaran | temp fix for marker terms | * c708aa2 Sreekanth Sivasankaran | adding setter methods for points only and space optimisation * | ce8b781 Robert Snedegar | Add golangci-lint Github Action formatter and lint checks (golang#140) * | b0c6031 Robert Snedegar | Add the OSSF and other action badges to the top of the README (golang#149) * | 97e19c1 Jesse Rosenstock | CellID.AllNeighbors: Return nil for invalid level (golang#146) * | 9ff7231 Jesse Rosenstock | Run gofmt -s (golang#148) * | 1bf973d Jesse Rosenstock | tests: Remove outdated flaky test comments (golang#147) * | 07d601f Robert Snedegar | Create scorecard.yml for OSSF (golang#143) * | b4895f7 Robert Snedegar | Fix some small issues that were flagged by upcoming lint checks. (golang#138) * | b51e350 Pekka Vainio | edge_query: use shapeID instead of index.idForShape lookup (golang#136) * | dc45a10 guoguangwu | lexicon: replace loop with values = append(values, ids...) (golang#102) * | 7b99cb2 Robert Snedegar | Add methods for testing Points normalizability. (golang#127) * | 35ab489 Peter Johnson | edge_distances: fix test (golang#106) * | 45267f9 Robert Snedegar | Changes to better support random seeds for flaky tests. (golang#129) * | 9f6155a cui fliter | query_options: remove redundant type conversion (golang#94) * | b92cf6f Philipp Klose | Replace godoc.org links with pgk.go.dev (golang#93) * | 0b6e08c Jonatas Emidio | cell_index_test: Fix typo (golang#125) * | f57e2fe Sascha Brawer | metric_test: fix bad error message (golang#96) * | bc23e40 Robert Snedegar | Final two Lax types completing move to public types. |\ \ | * | 06402e1 Robert Snedegar | Converting remaining lax types to public. | * | f404cd9 Robert Snedegar | Converting remaining lax types to public. | * | 68235aa Robert Snedegar | Rename lax_loop_test_test.go as final step of making laxLoop an official public type. (Step 1 was lax_loop_test.go -> lax_loop.go with type laxLoop converting to public type LaxLoop.) (Step 2 was remove lax_loop_test.go to make way for step 3) (Step 3 lax_loop_test_test.go -> lax_loop_test.go to fit traditional conventions.) | * | 9eb1fa2 Robert Snedegar | Remove lax_loop_test.go as step two of making laxLoop an official public type. * | | 824710a Robert Snedegar | Merge pull request golang#123 from rsned/master |\| | | * | 8e0a9ee Robert Snedegar | Restore check on childPos to no longer test for unreachable negative values. Fix two lint errors. |/ / * | 2bb09a9 Robert Snedegar | Add IJCoordOfEdge, UVCoordOfEdge, CellBoundary and assosciated tests. Update comments in Cell. Migrate IJ and ST methods from Cell to stuv.go to more closely resemble C++ file splits. Add missing tests to stuv.go Add new maxXYZToUVError constant Add more tests for InterpolateDistance. Update comments. Add special case in interpolateFloat64. Add SignDotProd and submethods along with associated tests. Add gappa proof comments to predicates for some of the methods. Fix TestCellDistanceToEdge with updated tolerances to reduce test flakiness. (It is now better but still not zero random edges that fail. Still need more digging to resolve.) Initial internal components of polyline_alignment. Implement VertexAlignment and associated tests for PolylineAlignment Add EdgeRaw, VertexRaw to Cell for the unnormalized variations which are needed for some methods in s2 Predicates. Add SignDotProt and CircleEdgeIntersectionOrdering and associated sub methods and tests. Update textformat to support higher precision printout of values for higher fidelity save/load of values. Update related callers and add test to show the change. Update edge_distance with PointOnRay, PointOnLeft, PointOnRight, PointOnLine and related tests. Added commented parts of several existing tests that needed those. Move epsilon to tests since it's not used in the regular s2 code. Add roundingEpsilon and epsilonForDigits and related tests. Use a constant for sqrt(3) instead of recomputing it many many times. * | 3c33606 Robert Snedegar | Revise the total precision bits of the big.Floats to be closer to the amounts used in C++ exact_float (from billions down to millions) * | 438f30b Robert Snedegar | Merge pull request golang#122 from jmr/deflake |\ \ | * | a681026 Jesse Rosenstock | Deflake tests |/ / * | 69a8a98 Robert Snedegar | Merge pull request golang#117 from jmr/polyline-interp-test |\ \ | * | 65bb56d Jesse Rosenstock | TestPolylineInterpolate: Fix unused `want` var * | | f13cb10 Robert Snedegar | Merge pull request golang#118 from jmr/cell-id-from-string |\ \ \ | * | | 070ebca Jesse Rosenstock | CellIDFromString: Remove no-op byte < 0 check | |/ / * | | 1e303e5 Robert Snedegar | Update go.yml with correct branch name * | | cab189c Robert Snedegar | Merge pull request golang#119 from jmr/cell-test |\ \ \ | * | | 911c8a2 Jesse Rosenstock | s2cell_test: Increase TestCellDistanceToEdge tolerance | |/ / * | | ed1c8b9 Robert Snedegar | Merge pull request golang#116 from jmr/shapeutil-test |\ \ \ | |/ / |/| | | * | 3a1f0cb Jesse Rosenstock | TestShapeutilRangeIteratorNext: Test sentinel id |/ / * | 6188549 Robert Snedegar | Merge pull request golang#114 from jmr/latlng-bm |\ \ | * | c5e5a69 Jesse Rosenstock | latlng_test: Add benchmark functions * | | 2fc3d43 Robert Snedegar | Merge pull request golang#115 from golang/rsned-patch-1 |\ \ \ | * | | ae3ea9d Robert Snedegar | Create go.yml |/ / / * / / aa6d65d Robert Snedegar | Add go.sum to match go.mod. |/ / * | bd601d2 Robert Snedegar | Merge pull request golang#113 from jmr/comments |\ \ | * | 9c70ae5 Jesse Rosenstock | Add and reformat comments |/ / * | 29de3e1 Robert Snedegar | Merge pull request golang#112 from jmr/update-2025-03-17 |\ \ | * | 029bad8 Jesse Rosenstock | Export latest google3 version |/ / * | 6adc566 Robert Snedegar | Fix package on s2intersect_test.go * | c62752d Robert Snedegar | Merge pull request golang#101 from rahul2393/master |\ \ | * | eee7799 Robert Snedegar | Sync to latest |/ / * / c4acd7a Robert Snedegar | Update go version to support the use of 'any'.q |/ ``` --------- Signed-off-by: cui fliter <[email protected]> Co-authored-by: Robert Snedegar <[email protected]> Co-authored-by: Robert Snedegar <[email protected]> Co-authored-by: Jesse Rosenstock <[email protected]> Co-authored-by: Sascha Brawer <[email protected]> Co-authored-by: Jonatas Emidio <[email protected]> Co-authored-by: Philipp Klose <[email protected]> Co-authored-by: cui fliter <[email protected]> Co-authored-by: Peter Johnson <[email protected]> Co-authored-by: guoguangwu <[email protected]> Co-authored-by: Pekka Vainio <[email protected]> Co-authored-by: Alan Strohm <[email protected]> Co-authored-by: Alan Strohm <[email protected]>
1 parent 6c403ec commit df110ce

File tree

130 files changed

+7682
-2729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+7682
-2729
lines changed

.github/workflows/tests.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: Tests
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
go-version: [1.21.x, 1.22.x, 1.23.x]
12+
platform: [ubuntu-latest, macos-latest, windows-latest]
13+
runs-on: ${{ matrix.platform }}
14+
steps:
15+
- name: Install Go
16+
uses: actions/setup-go@v1
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
- name: Test
22+
run: |
23+
go version
24+
go test -race ./...

.golangci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
version: "2"
2+
linters:
3+
enable:
4+
# Commented entries here are not enabled by default, but that we should
5+
# add once the relevant lines are fixed up.
6+
7+
# - errorlint # found 2 cases to be fixed.
8+
# - exhaustive # found some cases that should be fixed.
9+
# - exhaustruct # found some structs which missed fields in initializing.
10+
# - inamedparam # fix missing named param
11+
# - makezero # fix the unallocated elements.
12+
# - misspell # fix spelling
13+
# - nlreturn # fix these missing blank line
14+
# - nonamedreturns # found some shadowing
15+
# - predeclared # found some shadowing
16+
# - revive # detects a number of good fixes
17+
# - thelper # fix test methods with t.Testing not as first param
18+
- unconvert
19+
# - wastedassign # fix and enable
20+
# - whitespacew # fix and enable
21+
disable:
22+
# A number of these checks run by default so they are explicitly
23+
# disabled here.
24+
#
25+
# Other of these checks are disabled by default, but we want to
26+
# comment on why we plan to keep them excluded going forward.
27+
#
28+
# TODO(rsned): Move the checks to enable: once the flagged
29+
# problems are resolved for each check.
30+
# https://github.com/golang/geo/issues/145
31+
32+
# Enable once we reduce the cleverness with unicode chars.
33+
# Identifier "ε" contain non-ASCII character: U+03B5 'ε'
34+
- asciicheck
35+
# TODO(rsned): This should be enabled once we define the appropriate
36+
# list of acceptable external imports. (e.g. should only be trusted
37+
# verifiable sources)
38+
- depguard
39+
# Enable once we fix the detected doubled words.
40+
# e.g. Duplicate words (bound) found (dupword)
41+
# // 3. Best asymptotic bound: This bound bound is derived by
42+
- dupword
43+
# Enable once outstanding lint bugs are fixed.
44+
- errcheck
45+
# This check is not necessary as we only use types internally that we
46+
# fully control so we do not expect type assertion failures.
47+
- forcetypeassert
48+
# Enable once these are fixed.
49+
# goconst found a few instances where repeated values could be const-ified.
50+
- goconst
51+
# Enable once these are fixed.
52+
# gocritic suggests a number of code cleanups to be implemented.
53+
- gocritic
54+
# There are too many package globals constants and types used in s2.
55+
# (lookup tables and such)
56+
- gochecknoglobals
57+
# Enable once these are all fixed.
58+
# gosec detects a bunch of unsafe integer conversions.
59+
- gosec
60+
# This triggers on many many of the math values chosen by S2.
61+
# e.g., Magic number: 2, in <argument> detected (mnd)
62+
# math.Remainder(i.Lo-margin, 2*math.Pi),
63+
# Not clear if these are every likely to be all fixed so leave
64+
# this check disabled.
65+
# TODO(rsned): Enable manually once in a while to look for any
66+
# actually fixable cases.
67+
- mnd
68+
# Triggers on most tests for failing to call paralleltest.
69+
# We don't have a need to use this so keep it disabled.
70+
- paralleltest
71+
# Enable once outstanding lint bugs are fixed.
72+
- staticcheck
73+
# This triggers on every _test file saying they should be separate
74+
# parallel packages e.g. s2->s2_test package. We do not plan to ever
75+
# reshuffle the tests into a separate package.
76+
- testpackage
77+
# This triggers on many parts written in advance of the code that
78+
# actually calls them. It may occasionally find some real unused
79+
# code so running it by hand once in while could be useful.
80+
- unused
81+
formatters:
82+
enable:
83+
- gofmt
84+
- goimports

README.md

Lines changed: 149 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Overview
1+
# S2 geometry library in Go
2+
3+
[![Go Build and Test](https://github.com/golang/geo/actions/workflows/go.yml/badge.svg)](https://github.com/golang/geo/actions/workflows/go.yml) [![CodeQL](https://github.com/golang/geo/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/golang/geo/actions/workflows/github-code-scanning/codeql) [![golangci-lint](https://github.com/golang/geo/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/golang/geo/actions/workflows/golangci-lint.yml) [![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/golang/geo?label=OpenSSF%20Scorecard&style=flat)](https://scorecard.dev/viewer/?uri=github.com/golang/geo)
24

35
This forked version of s2geometry implements a few essential functionalities
46
like region term indexer, polygon projections etc for enabling the use of s2geo
@@ -9,7 +11,7 @@ S2 is a library for spherical geometry that aims to have the same robustness,
911
flexibility, and performance as the best planar geometry libraries.
1012

1113
This is a library for manipulating geometric shapes. Unlike many geometry
12-
libraries, S2 is primarily designed to work with _spherical geometry_, i.e.,
14+
libraries, S2 is primarily designed to work with *spherical geometry*, i.e.,
1315
shapes drawn on a sphere rather than on a planar 2D map. (In fact, the name S2
1416
is derived from the mathematical notation for the unit sphere **.) This makes
1517
it especially suitable for working with geographic data.
@@ -84,7 +86,7 @@ to geography are not part of the core library (e.g. easting/northing
8486
conversions, ellipsoid approximations, geodetic vs. geocentric coordinates,
8587
etc).
8688

87-
See http://godoc.org/github.com/golang/geo for specific package documentation.
89+
See https://pkg.go.dev/github.com/golang/geo for specific package documentation.
8890

8991
For an analogous library in C++, see https://github.com/google/s2geometry, in
9092
Java, see https://github.com/google/s2-geometry-library-java, and Python, see
@@ -97,109 +99,150 @@ This library is principally a port of the
9799
where it makes sense. We detail the progress of this port below relative to that
98100
C++ library.
99101

100-
## [ℝ¹](https://godoc.org/github.com/golang/geo/r1) - One-dimensional Cartesian coordinates
101-
102-
Full parity with C++.
103-
104-
## [ℝ²](https://godoc.org/github.com/golang/geo/r2) - Two-dimensional Cartesian coordinates
105-
106-
Full parity with C++.
107-
108-
## [ℝ³](https://godoc.org/github.com/golang/geo/r3) - Three-dimensional Cartesian coordinates
109-
110-
Full parity with C++.
111-
112-
## [](https://godoc.org/github.com/golang/geo/s1) - Circular Geometry
113-
114-
Full parity with C++.
115-
116-
## [](https://godoc.org/github.com/golang/geo/s2) - Spherical Geometry
117-
118-
Approximately ~40% complete.
119-
120-
**Complete** These files have full parity with the C++ implementation.
121-
122-
* Cap
123-
* Cell
124-
* CellID
125-
* CellUnion
126-
* ContainsVertexQuery
127-
* ConvexHullQuery
128-
* CrossingEdgeQuery
129-
* LatLng
130-
* matrix3x3
131-
* Metric
132-
* PaddedCell
133-
* Point
134-
* PointCompression
135-
* Region
136-
* RegionCoverer
137-
* RegionUnion
138-
* RegionTermIndexer - (implemented in this fork)
139-
* s2edge_clipping
140-
* s2edge_crosser
141-
* s2edge_crossings
142-
* s2edge_distances
143-
* edgeVectorShape
144-
* laxLoop
145-
* laxPolyline
146-
* s2projections - Helpers for projecting points between R2 and S2.
147-
* s2rect_bounder
148-
* s2stuv.go (s2coords.h in C++) - This file is a collection of helper and
149-
conversion methods to and from ST-space, UV-space, and XYZ-space.
150-
* s2wedge_relations
151-
* ShapeIndex
152-
* idSetLexicon,sequenceLexicon
153-
154-
**Mostly Complete** Files that have almost all of the features of the original
155-
C++ code, and are reasonably complete enough to use in live code. Up to date
156-
listing of the incomplete methods are documented at the end of each file.
157-
158-
* EdgeQuery/Closest/Furthest - missing Project, GetEdge
159-
* ContainsPointQuery - missing visit edges
160-
* laxPolygon
161-
* Loop - Loop is mostly complete now. Missing Project, Distance, Union, etc.
162-
* Polyline - Missing InitTo... methods, NearlyCoversPolyline
163-
* Rect (AKA s2latlngrect in C++) - Missing Centroid, InteriorContains.
164-
* s2_test.go (AKA s2testing and s2textformat in C++) - Missing Fractal test
165-
shape generation. This file is a collection of testing helper methods.
166-
* s2edge_distances - Missing Intersection
167-
168-
**In Progress** Files that have some work done, but are probably not complete
169-
enough for general use in production code.
170-
171-
* CellIndex - A queryable index of CellIDs.
172-
* Polygon - Polygons with multiple loops are supported. It fully implements
173-
Shape and Region, but it's missing most other methods. (Area, Centroid,
174-
Distance, Intersection, Union, Contains, Normalized, etc.)
175-
* PolylineSimplifier - Initial work has begun on this.
176-
* s2predicates.go - This file is a collection of helper methods used by other
177-
parts of the library.
178-
* s2shapeutil - Initial elements added. Missing VisitCrossings.
179-
180-
**Not Started Yet.** These files (and their associated unit tests) have
181-
dependencies on most of the In Progress files before they can begin to be
182-
started.
183-
184-
* BooleanOperation - used when assembling polygons and loops.
185-
* Builder - This is a robust tool for creating the various Shape types from
186-
collection of simpler S2 types.
187-
* BuilderClosedSetNormalizer
188-
* BuilderFindPolygonDegneracies
189-
* BuilderGraph
190-
* BuilderLayers
191-
* BuilderSnapFunctions
192-
* BuilderTesting
193-
* Centroids
194-
* ClosestPointQuery
195-
* EdgeTesselator
196-
* LoopMeasures
197-
* PointIndex
198-
* PointRegion
199-
* PointUtil
200-
* PolygonMeasures
201-
* RegionIntersection
202-
* ShapeIndexRegion - Allows ShapeIndexes to be used as Regions for things like
102+
Legend:
103+
104+
* ✅ - Feature Complete
105+
* 🟡 - Mostly Complete
106+
* ❌ - Not available
107+
108+
## [ℝ¹](https://pkg.go.dev/github.com/golang/geo/r1) - One-dimensional Cartesian coordinates
109+
110+
C++ Type | Go
111+
:--------- | ---
112+
R1Interval | ✅
113+
114+
## [ℝ²](https://pkg.go.dev/github.com/golang/geo/r2) - Two-dimensional Cartesian coordinates
115+
116+
C++ Type | Go
117+
:------- | ---
118+
R2Point | ✅
119+
R2Rect | ✅
120+
121+
## [ℝ³](https://pkg.go.dev/github.com/golang/geo/r3) - Three-dimensional Cartesian coordinates
122+
123+
C++ Type | Go
124+
:------------ | ---
125+
R3Vector | ✅
126+
R3ExactVector | ✅
127+
Matrix3x3 | ✅
128+
129+
## [](https://pkg.go.dev/github.com/golang/geo/s1) - Circular Geometry
130+
131+
C++ Type | Go
132+
:----------- | ---
133+
S1Angle | ✅
134+
S1ChordAngle | ✅
135+
S1Interval | ✅
136+
137+
## [](https://pkg.go.dev/github.com/golang/geo/s2) - Spherical Geometry
138+
139+
### Basic Types
140+
141+
C++ Type | Go
142+
:------------------- | ---
143+
S2Cap | ✅
144+
S2Cell | ✅
145+
S2CellId | ✅
146+
S2CellIdVector | ❌
147+
S2CellIndex | 🟡
148+
S2CellUnion | ✅
149+
S2Coords | ✅
150+
S2DensityTree | ❌
151+
S2DistanceTarget | ✅
152+
S2EdgeVector | ✅
153+
S2LatLng | ✅
154+
S2LatLngRect | ✅
155+
S2LaxLoop | 🟡
156+
S2LaxPolygon | 🟡
157+
S2LaxPolyline | 🟡
158+
S2Loop | ✅
159+
S2PaddedCell | ✅
160+
S2Point | ✅
161+
S2PointIndex | ❌
162+
S2PointSpan | ❌
163+
S2PointRegion | ❌
164+
S2PointVector | ✅
165+
S2Polygon | 🟡
166+
S2Polyline | ✅
167+
S2R2Rect | ❌
168+
S2Region | ✅
169+
S2RegionCoverer | ✅
170+
S2RegionIntersection | ❌
171+
S2RegionUnion | ✅
172+
S2Shape | ✅
173+
S2ShapeIndex | ✅
174+
S2ShapeIndexRegion | ❌
175+
EncodedLaxPolygon | ❌
176+
EncodedLaxPolyline | ❌
177+
EncodedShapeIndex | ❌
178+
EncodedStringVector | ❌
179+
EncodedUintVector | ❌
180+
IdSetLexicon | ❌
181+
ValueSetLexicon | ❌
182+
SequenceLexicon | ❌
183+
LaxClosedPolyline | ❌
184+
VertexIDLaxLoop | ❌
185+
186+
### Query Types
187+
188+
C++ Type | Go
189+
:------------------- | ---
190+
S2ChainInterpolation | ❌
191+
S2ClosestCell | ❌
192+
S2FurthestCell | ❌
193+
S2ClosestEdge | ✅
194+
S2FurthestEdge | ✅
195+
S2ClosestPoint | ❌
196+
S2FurthestPoint | ❌
197+
S2ContainsPoint | ✅
198+
S2ContainsVertex | ✅
199+
S2ConvexHull | ✅
200+
S2CrossingEdge | ✅
201+
S2HausdorffDistance | ❌
202+
S2ShapeNesting | ❌
203+
204+
### Supporting Types
205+
206+
C++ Type | Go
207+
:------------------------------- | ---
208+
S2BooleanOperation | ❌
209+
S2BufferOperation | ❌
210+
S2Builder | ❌
211+
S2BuilderClosedSetNormalizer | ❌
212+
S2BuilderFindPolygonDegeneracies | ❌
213+
S2BuilderGraph | ❌
214+
S2BuilderLayers | ❌
215+
S2BuilderSnapFunctions | ❌
216+
S2BuilderTesting | ❌
217+
S2Builderutil\* | ❌
218+
S2Coder | ❌
219+
S2EdgeClipping | ✅
220+
S2EdgeCrosser | ✅
221+
S2EdgeCrossings | ✅
222+
S2EdgeDistances | ✅
223+
S2EdgeTessellator | ✅
224+
S2LoopMeasures | ❌
225+
S2Measures | ✅
226+
S2MemoryTracker | ❌
227+
S2Metrics | ❌
228+
S2PointUtil | 🟡
229+
S2PolygonBuilder | ❌
230+
S2PolylineAlignment | ❌
231+
S2PolylineMeasures | ✅
232+
S2PolylineSimplifier | ❌
233+
S2Predicates | ✅
234+
S2Projections | ❌
235+
S2rectBounder | ❌
236+
S2RegionTermIndexer | ❌
237+
S2ShapeIndexMeasures | ❌
238+
S2ShapeIndexUtil\* | 🟡
239+
S2ShapeMeasures | ❌
240+
S2ShapeUtil\* | 🟡
241+
S2Stats | ❌
242+
S2Testing | ✅
243+
S2TextFormat | ✅
244+
S2WedgeRelations | ✅
245+
S2WindingOperation | ❌
203246

204247
### Encode/Decode
205248

geojson/geojson_s2_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
index "github.com/blevesearch/bleve_index_api"
2222
"github.com/blevesearch/geo/s2"
23-
"github.com/golang/geo/s1"
23+
"github.com/blevesearch/geo/s1"
2424
)
2525

2626
// ------------------------------------------------------------------------

0 commit comments

Comments
 (0)