Commit Graph

15 Commits

Author SHA1 Message Date
tidwall 401670e621 Fix NEARBY with SPARSE returning too many results
fixes #618
2021-07-22 08:39:57 -07:00
tidwall 3c699183e0 Additional KNN test 2021-07-11 14:49:23 -07:00
tidwall 579a41abae Merge branch 'housecanary-fix-knn' 2021-07-11 10:02:59 -07:00
Josh 1467cba769
Merge pull request #552 from rshura/clip-by
Add CLIPBY subcommand to INTERSECTS/WITHIN
2021-07-10 09:24:57 -07:00
Benjamin Ramser 2a8b98778b fix: distance if point and object have the same coordinates 2021-03-19 09:42:38 +01:00
Mike Poindexter fe6e3863ba Add bench tests for knn 2020-04-08 11:36:37 -07:00
Alex Roitman 34cb2affdc Add clipby subcommand to INTERSECTS/WITHIN 2020-04-03 16:49:06 -07:00
Melissa Baker bedddcbe13 Added RESP output fields test for NEARBY/WITHIN 2019-06-04 10:43:32 -07:00
Melissa Baker 4ba237b10e Added test for correct json fields output 2019-05-28 12:28:56 -07:00
tidwall fc3e8b4359 Fix nearby with match query invalid results
closes #421
2019-03-01 06:55:26 -07:00
Alex Roitman 0933c541f4 Refactor cursor/paging. 2018-10-31 22:01:37 -07:00
Alex Roitman 7c803f355b Make NEARBY always use knn 2018-10-25 16:37:06 -07:00
tidwall cc75cf22a8 Fix #369 poly in hole query 2018-10-18 06:28:31 -07:00
Alex Roitman 1517a2a770 Add unit tests for WITHIN and INTERSECTS. 2018-10-17 13:34:11 -07:00
tidwall 6257ddba78 Faster point in polygon / GeoJSON updates
The big change is that the GeoJSON package has been completely
rewritten to fix a few of geometry calculation bugs, increase
performance, and to better follow the GeoJSON spec RFC 7946.

GeoJSON updates

- A LineString now requires at least two points.
- All json members, even foreign, now persist with the object.
- The bbox member persists too but is no longer used for geometry
  calculations. This is change in behavior. Previously Tile38 would
  treat the bbox as the object's physical rectangle.
- Corrections to geometry intersects and within calculations.

Faster spatial queries

- The performance of Point-in-polygon and object intersect operations
  are greatly improved for complex polygons and line strings. It went
  from O(n) to roughly O(log n).
- The same for all collection types with many children, including
  FeatureCollection, GeometryCollection, MultiPoint, MultiLineString,
  and MultiPolygon.

Codebase changes

- The pkg directory has been renamed to internal
- The GeoJSON internal package has been moved to a seperate repo at
  https://github.com/tidwall/geojson. It's now vendored.

Please look out for higher memory usage for datasets using complex
shapes. A complex shape is one that has 64 or more points. For these
shapes it's expected that there will be increase of least 54 bytes per
point.
2018-10-13 04:30:48 -07:00