Skip to content

Enhance spatial documentation with clearer descriptions and examples #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ ui:
bundle:
url: https://static-content.neo4j.com/build/ui-bundle.zip
snapshot: true
urls:
html_extension_style: indexify

asciidoc:
extensions:
- "@neo4j-documentation/macros"
attributes:
page-theme: docs
page-theme: labs
page-cdn: /_/
6 changes: 5 additions & 1 deletion docs/docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
* xref:overview/introduction.adoc[]
* xref:api/index.adoc[]
+
--
include::partial$generated/api-nav.adoc[]
--

* xref::dev/index.adoc[]
** xref:dev/indexing.adoc[]
** xref:dev/layers.adoc[]
** xref:dev/procedures.adoc[]
** xref:dev/querying.adoc[]
** xref:dev/examples.adoc[]
*** xref:geo-pipes/index.adoc[]
Expand Down
8 changes: 8 additions & 0 deletions docs/docs/modules/ROOT/pages/api/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[procedures-and-functions]]
= Procedures & Functions
:description: This chapter provides a reference of all the procedures and functions in the spatial library.

Neo4j Spatial is also packaged as a ZIP file that can be unzipped into the http://neo4j.com[Neo4j Server] `$NEO4J_HOME/plugins` directory.
After restarting the server, you should be able to use the following *procedure* and *function* calls from the Cypher query language.

include::partial$generated/api/index.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial.addNode/spatial.addNode.byId.adoc[]

// == Examples
//
// include::partial$generated/api/spatial.addNode/spatial.addNode.byId-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial.addNodes/spatial.addNodes.byId.adoc[]

// == Examples
//
// include::partial$generated/api/spatial.addNodes/spatial.addNodes.byId-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial.removeNode/spatial.removeNode.byId.adoc[]

== Examples

include::partial$generated/api/spatial.removeNode/spatial.removeNode.byId-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial.removeNodes/spatial.removeNodes.byId.adoc[]

// == Examples
//
// include::partial$generated/api/spatial.removeNodes/spatial.removeNodes.byId-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addLayerWithEncoder.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addLayerWithEncoder-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayerGeohash.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayerGeohash-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayerHilbert.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayerHilbert-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayerWithConfig.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayerWithConfig-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayerXY.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayerXY-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNativePointLayerZOrder.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNativePointLayerZOrder-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.addNode.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNode.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNode-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addNodes.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addNodes-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayerGeohash.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayerGeohash-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayerHilbert.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayerHilbert-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayerWithConfig.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayerWithConfig-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayerXY.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayerXY-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addPointLayerZOrder.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addPointLayerZOrder-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.addWKT.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addWKT.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addWKT-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addWKTLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addWKTLayer-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.addWKTs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.addWKTs.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.addWKTs-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.asExternalGeometry.adoc[]

// == Examples
//
// include::partial$generated/api/spatial/spatial.asExternalGeometry-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.asGeometry.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.asGeometry-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.asMap.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.asMap.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.asMap-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.bbox.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.bbox.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.bbox-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.closest.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.closest.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.closest-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.decodeGeometry.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.decodeGeometry-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.getFeatureAttributes.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.getFeatureAttributes-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.importOSM.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.importOSM-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.importOSMToLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.importOSMToLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.importShapefile.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.importShapefile-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.importShapefileToLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.importShapefileToLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.intersects.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.intersects-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.layer.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.layer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.layer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.layerTypes.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.layerTypes-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.layers.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.layers.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.layers-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.neo4jGeometryToWkt.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.neo4jGeometryToWkt-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.procedures.adoc[]

// == Examples
//
// include::partial$generated/api/spatial/spatial.procedures-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.removeLayer.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.removeLayer-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.removeNode.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.removeNode-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.removeNodes.adoc[]

// == Examples
//
// include::partial$generated/api/spatial/spatial.removeNodes-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.setFeatureAttributes.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.setFeatureAttributes-examples.adoc[]
5 changes: 5 additions & 0 deletions docs/docs/modules/ROOT/pages/api/spatial/spatial.upgrade.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.upgrade.adoc[]

// == Examples
//
// include::partial$generated/api/spatial/spatial.upgrade-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.withinDistance.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.withinDistance-examples.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include::partial$generated/api/spatial/spatial.wktToGeoJson.adoc[]

== Examples

include::partial$generated/api/spatial/spatial.wktToGeoJson-examples.adoc[]
1 change: 0 additions & 1 deletion docs/docs/modules/ROOT/pages/dev/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

* xref:dev/indexing.adoc[]
* xref:dev/layers.adoc[]
* xref:dev/procedures.adoc[]
* xref:dev/querying.adoc[]
* xref:dev/examples.adoc[]
** xref:geo-pipes/index.adoc[]
Expand Down
48 changes: 0 additions & 48 deletions docs/docs/modules/ROOT/pages/dev/procedures.adoc

This file was deleted.

1 change: 1 addition & 0 deletions docs/docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:toclevels: 2

* xref:overview/introduction.adoc[]
* xref:api/index.adoc[]
* xref:dev/index.adoc[]
* xref:appendix/index.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/modules/ROOT/pages/overview/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The key features include:

The easiest way to get started with neo4j-spatial is to grab the `server-plugin-*.jar` from https://github.com/neo4j-contrib/spatial/releases[the latest release], copy it to your `$NEO4J_HOME/plugins` and restart your Neo4j server.

From there you can use all the xref:dev/procedures.adoc[spatial-procedures] in your Cypher queries to add Nodes to the spatial index and perform a number of spatial point, distance and intersection queries.
From there you can use all the xref:api/index.adoc[spatial procedures and functions] in your Cypher queries to add Nodes to the spatial index and perform a number of spatial point, distance and intersection queries.

.Simple Example
[source,cypher]
Expand Down
Loading