-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Geospatial queries for points (#6562)
* Add s2geometry sources for geo queries support from mongodb repo as is * s2: cleanup/remove unneeded files * s2: add to build * Add basic test for s2geometry link * Object store Geospatial mappings * starting queries * s2: cleanup tests related functions * Fix build due to removed error categories * Replace std exceptions with realm specific * Move geo query tests to separate test file for future expansion * Add init types for polygon and center sphere * Add basic geo_within support for Polygon and CenterSphere * Fix windows build * Style: rename geo constants * Fix MacOS compatibility build issue * More win/mac build fixes * Add s2geometry library for swift package build * Suppress s2 warnings for gcc * fix clang-format complaint * Trim down unnecessary S2 sources (#6456) * integrate Realm logging and assertions * remove some string utilities * remove encoder/decoder * remove some base files * remove hash * fix header search path for s2 swift builds * Fix include of external when built as subproject of sdk * Use modern language features (#6466) * scoped_ptr -> std::unique_ptr * use std type_traits * Replace deprecated is_pod with is_trivial --------- Co-authored-by: Kirill Burtsev <kirill.burtsev@mongodb.com> * Use radians for CenterSphere to be unit-neutral (#6496) * Don't use optional for sphere radius to reduce the size of Geospatial * Use radians for CenterSphere radius, expose constant * Add comments about points in Box and Polygon * Don't construct optional needlessly on Geospatial comparison * Geospatial RQL (#6352) * geospatial query parser support WIP * some error handling * RQL geoSphere * RQL geoPolygon * query geospatial arguments * C-API geospatial in mixed * add a Geospatial type checking API * format * fix warnings on Windows * Alternative syntax definition * API changes from feedback and testing * remove type_GeoPoint as Geospatial is an umbrella for this * additional tests * fix an unused warning * review feedback * Use NaN for GeoPoint (#6490) * Use NaN for altitude, expose to public * Check for NaN for lat/lon --------- Co-authored-by: James Stone <james.stone@mongodb.com> * formatting * remove GeospatialRef and use Geospatial* remove wrong C-API implementation (#6518) --------- Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com> Co-authored-by: Kirill Burtsev <kirill.burtsev@mongodb.com> * Add REALM_ENABLE_GEOSPATIAL cmake option to disable feature (#6525) * Allow to disable compilation of whole geospatial support * Turn on the geo feature for swift build by default * Remove non-compiling hash_value function (#6533) * Geospatial Polygons support holes (#6529) * Geospatial uses a variant polygon has holes * support holes in polygons in RQL * touch ups * Add REALM_ENABLE_GEOSPATIAL to config.h * add missing include * Fix test build for geo feature, optimize copying (#6550) * Fix build without geospatial * Don't force to copy primitives on get<> * Allow less curly braces for GeoPolygon on init * format --------- Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com> Co-authored-by: Kirill Burtsev <kirill.burtsev@mongodb.com> * changelog and test without geospatial on CI * disable geospatial by default for cocoa builds, review feedback * turn off geospatial in swift builds for now * formatting --------- Co-authored-by: Kirill Burtsev <kirill.burtsev@mongodb.com> Co-authored-by: Jørgen Edelbo <jorgen.edelbo@mongodb.com> Co-authored-by: Nikola Irinchev <irinchev@me.com>
- Loading branch information
1 parent
a546bd4
commit a4ff1b0
Showing
104 changed files
with
21,861 additions
and
1,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(s2geometry) | ||
|
||
set(S2_SOURCES | ||
s1angle.cc | ||
s2.cc | ||
s2cellid.cc | ||
s2latlng.cc | ||
s1interval.cc | ||
s2cap.cc | ||
s2cell.cc | ||
s2cellunion.cc | ||
s2edgeindex.cc | ||
s2edgeutil.cc | ||
s2latlngrect.cc | ||
s2loop.cc | ||
s2pointregion.cc | ||
s2polygon.cc | ||
s2polygonbuilder.cc | ||
s2polyline.cc | ||
s2r2rect.cc | ||
s2region.cc | ||
s2regioncoverer.cc | ||
s2regionintersection.cc | ||
s2regionunion.cc | ||
) | ||
|
||
set(S2_UTIL_MATH_SOURCES | ||
util/math/mathutil.cc | ||
util/math/mathlimits.cc | ||
) | ||
|
||
add_library(s2geometry OBJECT | ||
${S2_SOURCES} | ||
${S2_UTIL_MATH_SOURCES} | ||
) | ||
|
||
target_include_directories(s2geometry PRIVATE "." "..") | ||
|
||
# suppress s2 specific warnings (lib is very noisy) | ||
target_compile_options(s2geometry PRIVATE | ||
$<$<CXX_COMPILER_ID:MSVC>: /wd4068 /wd4244 /wd4267 /wd4305> | ||
) | ||
if (NOT MSVC) | ||
set(CMAKE_REQUIRED_QUIET ON) | ||
add_target_option_if_supported(s2geometry PRIVATE | ||
-Wno-deprecated-declarations | ||
-Wno-ignored-qualifiers | ||
-Wno-macro-redefined | ||
-Wno-missing-prototypes | ||
-Wno-shorten-64-to-32 | ||
-Wno-undefined-var-template | ||
-Wno-unknown-pragmas | ||
-Wno-unused-const-variable | ||
-Wno-unused-function | ||
-Wno-unused-local-typedefs | ||
-Wno-unused-parameter | ||
) | ||
endif() |
Oops, something went wrong.