Commit Graph

222 Commits

Author SHA1 Message Date
Alex Roitman bf5317f040 Fix tests. 2018-11-01 15:18:55 -07:00
Alex Roitman 0933c541f4 Refactor cursor/paging. 2018-10-31 22:01:37 -07:00
Alex Roitman b94f3685b6 Move iterating up to the cursor before any tests. 2018-10-31 22:01:24 -07:00
Alex Roitman f45d81d692 Simplification 2018-10-31 01:30:10 -07:00
Alex Roitman d2c687d61e camelCase 2018-10-31 00:45:16 -07:00
Alex Roitman 63b41691e6 Clean up obsolete code. 2018-10-31 00:40:09 -07:00
Alex Roitman 18d7398d50 Minor refactoring 2018-10-29 18:18:04 -07:00
Alex Roitman 2383594048 Use haversine instead of distance in knn if distance is not required. 2018-10-29 15:32:47 -07:00
tidwall 60b054d58c Fixed test 2018-10-29 08:16:04 -07:00
tidwall e577f60481 Updated redigo imports 2018-10-29 05:00:54 -07:00
tidwall 555e47036c Replaced net package with evio
- Added threads startup flag
- Replaced net package with evio
- Refactored controller into server
2018-10-28 15:51:47 -07:00
tidwall b17bbbd829 Merge branch 'always_knn_nearby' of https://github.com/rshura/tile38 into rshura-always_knn_nearby 2018-10-27 09:22:04 -07:00
tidwall e15cfb66d1 Inline optimization 2018-10-27 07:08:24 -07:00
Alex Roitman c673fa01d5 Pass Circle into nearestNeighbor. 2018-10-26 10:05:33 -07:00
Alex Roitman 33530075a4 Use new Meters() function. 2018-10-25 17:00:19 -07:00
Alex Roitman 7c803f355b Make NEARBY always use knn 2018-10-25 16:37:06 -07:00
tidwall b1370332e6 Always use compressed indexing 2018-10-23 11:23:55 -07:00
tidwall ccd6975f5f Fix some tests 2018-10-22 14:52:48 -07:00
tidwall 7cc4008442 Added multiple indexing kinds 2018-10-21 19:08:56 -07:00
tidwall 8ee4c10862 Added geom indexing environment options
T38IDXGEOM  -- Point threshold for indexing geometry
T38IDXMULTI -- Child threshold for indexing multi/collection

Default is 64
Using zero will disable indexing

Example:

T38IDXGEOM=0 tile38-server    # disables geometry indexing
T38IDXGEOM=256 tile38-server  # indexing geometries 256+ points
2018-10-19 06:29:47 -07:00
tidwall d64aad9be0 Change btree implementation for collections 2018-10-18 07:13:24 -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