Building Cypher Query using spatial relations?

815
4
Jump to solution
04-08-2022 11:19 PM
Labels (1)
xingchenc
Occasional Contributor

When I look closely at the supply chain demo shown at Esri 2022 developer summit(Plenary | 2022 Esri Developer Summit - Esri Videos: GIS, Events, ArcGIS Products & Industries), I noticed that inside the Cypher Query, it compares the spatial relationship between the two entities and returned the path that has the correct relationship(in this case, "Intersect").  

xingchenc_2-1649484594968.png

xingchenc_1-1649484462529.png

The capability to query entities using spatial relations is a huge bonus when extracting information from the Knowledge Graph. However, when I was looking for detailed explanations regarding how this is done in the ArcGIS Pro help, I found nothing. I was wondering if anyone know where should I look? 

@MeganBanaski1 Hi Megan, I was wondering if you have more information on this stuff?

 

0 Kudos
1 Solution

Accepted Solutions
MeganBanaski1
Esri Contributor

@xingchenc Currently, supported spatial relation operators are esri.graph.ST_Equals(<geom>, <geom>), esri.graph.ST_Intersects(<geom>, <geom>), and esri.graph.ST_Contains(<geom>, <geom>).

For spatial utility, there is esri.graph.ST_GeoDistance(<geom>, <geom>) and for spatial construction there is esri.graph.ST_SKTToGeometry(string).

View solution in original post

4 Replies
MeganBanaski1
Esri Contributor

@xingchenc Currently, supported spatial relation operators are esri.graph.ST_Equals(<geom>, <geom>), esri.graph.ST_Intersects(<geom>, <geom>), and esri.graph.ST_Contains(<geom>, <geom>).

For spatial utility, there is esri.graph.ST_GeoDistance(<geom>, <geom>) and for spatial construction there is esri.graph.ST_SKTToGeometry(string).

xingchenc
Occasional Contributor

Hi Megan,

Thanks a lot, this is really helpful!

BTW, can you elaborate on the esri.graph.ST_SKTToGeometry(string) method?

0 Kudos
MeganBanaski1
Esri Contributor

Apologies there was a typo in there, it is esri.graph.ST_WKTToGeometry(string). It constructs a geometry from the OGC simple feature access well-known text format.

0 Kudos
xingchenc
Occasional Contributor

Thanks Megan!

0 Kudos