Skip to content

Commit 688662c

Browse files
committed
GH-2410 - Documentation for existing geo features.
Closes #2410
1 parent 8c262f9 commit 688662c

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/main/asciidoc/appendix/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ include::query-creation.adoc[]
1414

1515
include::custom-queries.adoc[]
1616

17+
include::spatial-types.adoc[]
18+
1719
include::migrating.adoc[]
1820

1921
include::build.adoc[]
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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)`

0 commit comments

Comments
 (0)