空間類型
Spring Data Neo4j 支援下列空間類型
支援的轉換
-
Spring Data common 的
Point
(必須是資料庫中 WGS 84-2D/SRID 4326 點) -
GeographicPoint2d
(WGS84 2D/SRID 4326) -
GeographicPoint3d
(WGS84 3D/SRID 4979) -
CartesianPoint2d
(Cartesian 2D/SRID 7203) -
CartesianPoint3d
(Cartesian 3D/SRID 9157)
衍生搜尋器關鍵字
如果您使用原生 Neo4j Java 驅動程式 org.neo4j.driver.types.Point
類型,您可以在衍生搜尋器方法中使用下列關鍵字和參數類型。
在區域內查詢
-
findBy[…]Within(org.springframework.data.geo.Circle circle)
-
findBy[…]Within(org.springframework.data.geo.Box box)
-
findBy[…]Within(org.springframework.data.neo4j.repository.query.BoundingBox boundingBox)
您也可以使用 org.springframework.data.geo.Polygon ,但需要透過呼叫 BoundingBox#of 將其傳遞至 BoundingBox 。 |
查詢靠近特定點
-
findBy[…]Near(org.neo4j.driver.types.Point point)
- 傳回依與給定點的距離升序排序的結果 -
findBy[…]Near(Point point, org.springframework.data.geo.Distance max)
-
findBy[…]Near(Point point, org.springframework.data.domain.Range<Distance> between)
-
findBy[…]Near(Range<Distance> between, Point p)