Skip to content

Commit 2cd7ede

Browse files
authored
Add driver-based access for the geoserver-plugin (#448)
This commit adds driver-based access for the geoserver plugin by implementing a significant refactoring of the Neo4j Spatial codebase to use the Neo4j Java Driver instead of embedded database access. * Migrates from embedded GraphDatabaseService to driver-based Neo4j access using Sessions and Transactions * Introduces new spatial procedures and functions for improved GeoServer integration * Adds comprehensive test infrastructure using Neo4j Test Harness instead of embedded test databases
1 parent bb59bd7 commit 2cd7ede

File tree

74 files changed

+3174
-1154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3174
-1154
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.cql.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.cql-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.extractAttributes.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.extractAttributes-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.getFeatureCount.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.getFeatureCount-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.getLayerBoundingBox.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.getLayerBoundingBox-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.layerMeta.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.layerMeta-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.nodeAsWKT.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.nodeAsWKT-examples.adoc[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include::partial$generated/api/spatial/spatial.updateWKT.adoc[]
2+
3+
== Examples
4+
5+
include::partial$generated/api/spatial/spatial.updateWKT-examples.adoc[]

docs/docs/modules/ROOT/partials/generated/api-nav.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,29 @@
2323
** xref:api/spatial/spatial.asMap.adoc[]
2424
** xref:api/spatial/spatial.bbox.adoc[]
2525
** xref:api/spatial/spatial.closest.adoc[]
26+
** xref:api/spatial/spatial.cql.adoc[]
2627
** xref:api/spatial/spatial.decodeGeometry.adoc[]
28+
** xref:api/spatial/spatial.extractAttributes.adoc[]
2729
** xref:api/spatial/spatial.getFeatureAttributes.adoc[]
30+
** xref:api/spatial/spatial.getFeatureCount.adoc[]
31+
** xref:api/spatial/spatial.getLayerBoundingBox.adoc[]
2832
** xref:api/spatial/spatial.importOSM.adoc[]
2933
** xref:api/spatial/spatial.importOSMToLayer.adoc[]
3034
** xref:api/spatial/spatial.importShapefile.adoc[]
3135
** xref:api/spatial/spatial.importShapefileToLayer.adoc[]
3236
** xref:api/spatial/spatial.intersects.adoc[]
3337
** xref:api/spatial/spatial.layer.adoc[]
38+
** xref:api/spatial/spatial.layerMeta.adoc[]
3439
** xref:api/spatial/spatial.layerTypes.adoc[]
3540
** xref:api/spatial/spatial.layers.adoc[]
3641
** xref:api/spatial/spatial.neo4jGeometryToWkt.adoc[]
42+
** xref:api/spatial/spatial.nodeAsWKT.adoc[]
3743
** xref:api/spatial/spatial.procedures.adoc[]
3844
** xref:api/spatial/spatial.removeLayer.adoc[]
3945
** xref:api/spatial/spatial.removeNode.adoc[]
4046
** xref:api/spatial/spatial.removeNodes.adoc[]
4147
** xref:api/spatial/spatial.setFeatureAttributes.adoc[]
48+
** xref:api/spatial/spatial.updateWKT.adoc[]
4249
** xref:api/spatial/spatial.upgrade.adoc[]
4350
** xref:api/spatial/spatial.withinDistance.adoc[]
4451
** xref:api/spatial/spatial.wktToGeoJson.adoc[]

docs/docs/modules/ROOT/partials/generated/api/index.adoc

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,30 @@ Finds all geometry nodes in the given layer within the lower left and upper righ
109109

110110
Finds all geometry nodes in the layer within the distance to the given coordinate
111111
|label:procedure[]
112+
|xref:api/spatial/spatial.cql.adoc[spatial.cql icon:book[]]
113+
114+
Finds all geometry nodes in the given layer that matches the given CQL
115+
|label:procedure[]
112116
|xref:api/spatial/spatial.decodeGeometry.adoc[spatial.decodeGeometry icon:book[]]
113117

114118
Returns a geometry of a layer node as the Neo4j geometry type, to be passed to other procedures or returned to a client
115119
|label:function[]
120+
|xref:api/spatial/spatial.extractAttributes.adoc[spatial.extractAttributes icon:book[]]
121+
122+
Returns attributes of the node
123+
|label:function[]
116124
|xref:api/spatial/spatial.getFeatureAttributes.adoc[spatial.getFeatureAttributes icon:book[]]
117125

118126
Returns feature attributes of the given layer
119127
|label:procedure[]
128+
|xref:api/spatial/spatial.getFeatureCount.adoc[spatial.getFeatureCount icon:book[]]
129+
130+
Returns the number of features in the layer
131+
|label:procedure[]
132+
|xref:api/spatial/spatial.getLayerBoundingBox.adoc[spatial.getLayerBoundingBox icon:book[]]
133+
134+
Returns the bounding box of the layer
135+
|label:procedure[]
120136
|xref:api/spatial/spatial.importOSM.adoc[spatial.importOSM icon:book[]]
121137

122138
Imports the the provided osm-file from URI to a layer of the same name, returns the count of data added
@@ -141,6 +157,10 @@ Returns all geometry nodes that intersect the given geometry (shape, polygon) in
141157

142158
Returns the layer root node for the given layer `name`
143159
|label:procedure[]
160+
|xref:api/spatial/spatial.layerMeta.adoc[spatial.layerMeta icon:book[]]
161+
162+
Returns the layer details for the given layer `name`
163+
|label:procedure[]
144164
|xref:api/spatial/spatial.layerTypes.adoc[spatial.layerTypes icon:book[]]
145165

146166
Returns the different registered layer types
@@ -153,6 +173,10 @@ Returns name, and details for all layers
153173

154174
Converts a point or point array to WKT
155175
|label:function[]
176+
|xref:api/spatial/spatial.nodeAsWKT.adoc[spatial.nodeAsWKT icon:book[]]
177+
178+
Returns a geometry of a layer node as WKT
179+
|label:function[]
156180
|xref:api/spatial/spatial.procedures.adoc[spatial.procedures icon:book[]]
157181

158182
Lists all spatial procedures with name and signature
@@ -173,6 +197,10 @@ Removes the given nodes from the layer, returns the count of nodes removed
173197

174198
Sets the feature attributes of the given layer
175199
|label:procedure[]
200+
|xref:api/spatial/spatial.updateWKT.adoc[spatial.updateWKT icon:book[]]
201+
202+
Updates a node with the geometry defined by the given WKT, returns the node
203+
|label:procedure[]
176204
|xref:api/spatial/spatial.upgrade.adoc[spatial.upgrade icon:book[]]
177205

178206
Upgrades an older spatial data model and returns a list of layers upgraded
@@ -192,7 +220,7 @@ Converts a WKT to GeoJson structure
192220
[.procedures,opts=header,cols='5a,1a']
193221
|===
194222
|Qualified Name |Type
195-
|xref:api/spatial.addNode/spatial.addNode.byId.adoc[spatial.addNode.byId icon:book[]]
223+
|xref:api/spatial.addNode/spatial.addNode.byId.adoc[spatial.addNode.byId icon:book[]] label:deprecated[]
196224

197225
Adds the given node to the layer, returns the geometry-node
198226
|label:procedure[]
@@ -203,7 +231,7 @@ Adds the given node to the layer, returns the geometry-node
203231
[.procedures,opts=header,cols='5a,1a']
204232
|===
205233
|Qualified Name |Type
206-
|xref:api/spatial.addNodes/spatial.addNodes.byId.adoc[spatial.addNodes.byId icon:book[]]
234+
|xref:api/spatial.addNodes/spatial.addNodes.byId.adoc[spatial.addNodes.byId icon:book[]] label:deprecated[]
207235

208236
Adds the given nodes list to the layer, returns the count
209237
|label:procedure[]
@@ -214,7 +242,7 @@ Adds the given nodes list to the layer, returns the count
214242
[.procedures,opts=header,cols='5a,1a']
215243
|===
216244
|Qualified Name |Type
217-
|xref:api/spatial.removeNode/spatial.removeNode.byId.adoc[spatial.removeNode.byId icon:book[]]
245+
|xref:api/spatial.removeNode/spatial.removeNode.byId.adoc[spatial.removeNode.byId icon:book[]] label:deprecated[]
218246

219247
Removes the given node from the layer, returns the geometry-node
220248
|label:procedure[]
@@ -225,7 +253,7 @@ Removes the given node from the layer, returns the geometry-node
225253
[.procedures,opts=header,cols='5a,1a']
226254
|===
227255
|Qualified Name |Type
228-
|xref:api/spatial.removeNodes/spatial.removeNodes.byId.adoc[spatial.removeNodes.byId icon:book[]]
256+
|xref:api/spatial.removeNodes/spatial.removeNodes.byId.adoc[spatial.removeNodes.byId icon:book[]] label:deprecated[]
229257

230258
Removes the given nodes from the layer, returns the count of nodes removed
231259
|label:procedure[]

docs/docs/modules/ROOT/partials/generated/api/spatial.addNode/spatial.addNode.byId.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33

44
:description: This section contains reference documentation for the spatial.addNode.byId procedure.
55

6-
label:procedure[]
6+
label:procedure[] label:deprecated[]
77

88
[.emphasis]
99
Adds the given node to the layer, returns the geometry-node
1010

11+
[WARNING]
12+
====
13+
14+
This procedure is deprecated by: spatial.addNode
15+
====
16+
1117
== Signature
1218

1319
[source]

0 commit comments

Comments
 (0)