File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
src/main/asciidoc/appendix Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ include::query-creation.adoc[]
14
14
15
15
include::custom-queries.adoc[]
16
16
17
+ include::spatial-types.adoc[]
18
+
17
19
include::migrating.adoc[]
18
20
19
21
include::build.adoc[]
Original file line number Diff line number Diff line change
1
+ [[spatial-types]]
2
+ = Spatial types
3
+
4
+ Spring Data Neo4j supports the following spatial types
5
+
6
+ [[spatial-types.conversion]]
7
+ == Supported conversions
8
+
9
+ * Spring Data common's `Point` (*must* be a WGS 84-2D/SRID 4326 point in the database)
10
+ * `GeographicPoint2d` (WGS84 2D/SRID 4326)
11
+ * `GeographicPoint3d` (WGS84 3D/SRID 4979)
12
+ * `CartesianPoint2d` (Cartesian 2D/SRID 7203)
13
+ * `CartesianPoint3d` (Cartesian 3D/SRID 9157)
14
+
15
+ [[spatial-types.derived-finder]]
16
+ == Derived finder keywords
17
+
18
+ If you are using the native Neo4j Java driver `org.neo4j.driver.types.Point` type,
19
+ you can make use of the following keywords and parameter types in derived finder methods.
20
+
21
+ Query inside an area:
22
+
23
+ * `findBy[...]Within(org.springframework.data.geo.Circle circle)`
24
+ * `findBy[...]Within(org.springframework.data.geo.Box box)`
25
+ * `findBy[...]Within(org.springframework.data.neo4j.repository.query.BoundingBox boundingBox)`
26
+
27
+ NOTE: You could also use a `org.springframework.data.geo.Polygon` but would need to pass it into a `BoundingBox` by calling `BoundingBox#of`.
28
+
29
+ Query near a certain point:
30
+
31
+ * `findBy[...]Near(org.neo4j.driver.types.Point point)` - returns result sorted by distance to the given point ascending
32
+ * `findBy[...]Near(Point point, org.springframework.data.geo.Distance max)`
33
+ * `findBy[...]Near(Point point, org.springframework.data.domain.Range<Distance> between)`
34
+ * `findBy[...]Near(Range<Distance> between, Point p)`
You can’t perform that action at this time.
0 commit comments