diff --git a/neo.sld.xml b/neo.sld.xml
index b2824317..907b607b 100644
--- a/neo.sld.xml
+++ b/neo.sld.xml
@@ -1,25 +1,23 @@
+ ~ Copyright (c) "Neo4j"
+ ~ Neo4j Sweden AB [http://neo4j.com]
+ ~
+ ~ This file is part of Neo4j Spatial.
+ ~
+ ~ Neo4j is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
org.apache.maven.pluginsmaven-compiler-plugin
- 3.12.1
+ 3.13.0${neo4j.java.version}${neo4j.java.version}
@@ -304,12 +304,6 @@
-
- org.junit.vintage
- junit-vintage-engine
- ${junit.version}
- test
- org.junit.jupiterjunit-jupiter-engine
diff --git a/src/main/assembly/docs-assembly.xml b/src/main/assembly/docs-assembly.xml
index e7baf9ee..f59c2683 100644
--- a/src/main/assembly/docs-assembly.xml
+++ b/src/main/assembly/docs-assembly.xml
@@ -1,24 +1,22 @@
+ ~ Copyright (c) "Neo4j"
+ ~ Neo4j Sweden AB [http://neo4j.com]
+ ~
+ ~ This file is part of Neo4j Spatial.
+ ~
+ ~ Neo4j is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
docsfalse
diff --git a/src/main/assembly/geoserver-plugin.xml b/src/main/assembly/geoserver-plugin.xml
index f8a8f00f..8ad6e75b 100644
--- a/src/main/assembly/geoserver-plugin.xml
+++ b/src/main/assembly/geoserver-plugin.xml
@@ -1,24 +1,22 @@
+ ~ Copyright (c) "Neo4j"
+ ~ Neo4j Sweden AB [http://neo4j.com]
+ ~
+ ~ This file is part of Neo4j Spatial.
+ ~
+ ~ Neo4j is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
diff --git a/src/main/assembly/server-plugin.xml b/src/main/assembly/server-plugin.xml
index 77a885b4..0f981344 100644
--- a/src/main/assembly/server-plugin.xml
+++ b/src/main/assembly/server-plugin.xml
@@ -1,24 +1,22 @@
+ ~ Copyright (c) "Neo4j"
+ ~ Neo4j Sweden AB [http://neo4j.com]
+ ~
+ ~ This file is part of Neo4j Spatial.
+ ~
+ ~ Neo4j is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
diff --git a/src/main/java/org/geotools/data/neo4j/DefaultResourceInfo.java b/src/main/java/org/geotools/data/neo4j/DefaultResourceInfo.java
index ca678007..f32d9403 100644
--- a/src/main/java/org/geotools/data/neo4j/DefaultResourceInfo.java
+++ b/src/main/java/org/geotools/data/neo4j/DefaultResourceInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/Neo4jFeatureBuilder.java b/src/main/java/org/geotools/data/neo4j/Neo4jFeatureBuilder.java
index b99ef43a..f22bcdd5 100644
--- a/src/main/java/org/geotools/data/neo4j/Neo4jFeatureBuilder.java
+++ b/src/main/java/org/geotools/data/neo4j/Neo4jFeatureBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStore.java b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStore.java
index 63007126..85bceb9a 100644
--- a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStore.java
+++ b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStore.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStoreFactory.java b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStoreFactory.java
index 6fdd59c0..f8c17120 100644
--- a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStoreFactory.java
+++ b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialDataStoreFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureSource.java b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureSource.java
index 978d11f4..613ba81b 100644
--- a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureSource.java
+++ b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureStore.java b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureStore.java
index 3df6d18e..7c50ae8c 100644
--- a/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureStore.java
+++ b/src/main/java/org/geotools/data/neo4j/Neo4jSpatialFeatureStore.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/geotools/data/neo4j/StyledImageExporter.java b/src/main/java/org/geotools/data/neo4j/StyledImageExporter.java
index 1974f7cc..e6fb9d62 100644
--- a/src/main/java/org/geotools/data/neo4j/StyledImageExporter.java
+++ b/src/main/java/org/geotools/data/neo4j/StyledImageExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -136,7 +136,7 @@ private File checkFile(File file) {
}
@SuppressWarnings({"unused"})
- private void debugStore(DataStore store, String[] layerNames) throws IOException {
+ private static void debugStore(DataStore store, String[] layerNames) throws IOException {
for (String layerName : layerNames) {
System.out.println(asList(store.getTypeNames()));
System.out.println(Collections.singletonList(store.getSchema(layerName).getAttributeDescriptors()));
@@ -244,7 +244,7 @@ public void saveLayerImage(String[] layerNames, String sldFile, File imagefile,
}
}
- private Style getStyleFromSLDFile(String sldFile) {
+ private static Style getStyleFromSLDFile(String sldFile) {
Style style = null;
if (sldFile != null) {
style = createStyleFromSLD(sldFile);
@@ -283,7 +283,7 @@ private void saveMapContentToImageFile(MapContent mapContent, File imagefile, Re
/**
* Create a Style object from a definition in a SLD document
*/
- private Style createStyleFromSLD(String sldFile) {
+ private static Style createStyleFromSLD(String sldFile) {
try {
SLDParser stylereader = new SLDParser(styleFactory, new File(sldFile).toURI().toURL());
Style[] style = stylereader.readXML();
diff --git a/src/main/java/org/neo4j/gis/spatial/AbstractGeometryEncoder.java b/src/main/java/org/neo4j/gis/spatial/AbstractGeometryEncoder.java
index d95a5ddc..8db100eb 100644
--- a/src/main/java/org/neo4j/gis/spatial/AbstractGeometryEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/AbstractGeometryEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -71,7 +71,7 @@ public Envelope decodeEnvelope(Entity container) {
protected abstract void encodeGeometryShape(Transaction tx, Geometry geometry, Entity container);
- protected Integer encodeGeometryType(String jtsGeometryType) {
+ protected static Integer encodeGeometryType(String jtsGeometryType) {
// TODO: Consider alternatives for specifying type, like relationship to type category objects (or similar indexing structure)
return switch (jtsGeometryType) {
case "Point" -> GTYPE_POINT;
diff --git a/src/main/java/org/neo4j/gis/spatial/ConsoleListener.java b/src/main/java/org/neo4j/gis/spatial/ConsoleListener.java
index 2fd511a6..b6c4a0b7 100644
--- a/src/main/java/org/neo4j/gis/spatial/ConsoleListener.java
+++ b/src/main/java/org/neo4j/gis/spatial/ConsoleListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/Constants.java b/src/main/java/org/neo4j/gis/spatial/Constants.java
index 6013c41e..4ef1fb76 100644
--- a/src/main/java/org/neo4j/gis/spatial/Constants.java
+++ b/src/main/java/org/neo4j/gis/spatial/Constants.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/DefaultLayer.java b/src/main/java/org/neo4j/gis/spatial/DefaultLayer.java
index e6090e49..4b1b34bf 100644
--- a/src/main/java/org/neo4j/gis/spatial/DefaultLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/DefaultLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial;
diff --git a/src/main/java/org/neo4j/gis/spatial/DynamicLayer.java b/src/main/java/org/neo4j/gis/spatial/DynamicLayer.java
index f26391a8..9dfcd0d4 100644
--- a/src/main/java/org/neo4j/gis/spatial/DynamicLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/DynamicLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/DynamicLayerConfig.java b/src/main/java/org/neo4j/gis/spatial/DynamicLayerConfig.java
index 46328e10..f94dbf67 100644
--- a/src/main/java/org/neo4j/gis/spatial/DynamicLayerConfig.java
+++ b/src/main/java/org/neo4j/gis/spatial/DynamicLayerConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/EditableLayer.java b/src/main/java/org/neo4j/gis/spatial/EditableLayer.java
index 0ab353ed..c4879af9 100644
--- a/src/main/java/org/neo4j/gis/spatial/EditableLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/EditableLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/EditableLayerImpl.java b/src/main/java/org/neo4j/gis/spatial/EditableLayerImpl.java
index 5a398671..231e5f0c 100644
--- a/src/main/java/org/neo4j/gis/spatial/EditableLayerImpl.java
+++ b/src/main/java/org/neo4j/gis/spatial/EditableLayerImpl.java
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
*
- * Neo4j is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
diff --git a/src/main/java/org/neo4j/gis/spatial/GeometryEncoder.java b/src/main/java/org/neo4j/gis/spatial/GeometryEncoder.java
index bce98d70..59acaf6c 100644
--- a/src/main/java/org/neo4j/gis/spatial/GeometryEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/GeometryEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/Layer.java b/src/main/java/org/neo4j/gis/spatial/Layer.java
index f10b2b22..9aae8c6f 100644
--- a/src/main/java/org/neo4j/gis/spatial/Layer.java
+++ b/src/main/java/org/neo4j/gis/spatial/Layer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/LineStringNetworkGenerator.java b/src/main/java/org/neo4j/gis/spatial/LineStringNetworkGenerator.java
index a4a1244b..ce56b500 100644
--- a/src/main/java/org/neo4j/gis/spatial/LineStringNetworkGenerator.java
+++ b/src/main/java/org/neo4j/gis/spatial/LineStringNetworkGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/OrderedEditableLayer.java b/src/main/java/org/neo4j/gis/spatial/OrderedEditableLayer.java
index d3a20b75..45c3e4d5 100644
--- a/src/main/java/org/neo4j/gis/spatial/OrderedEditableLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/OrderedEditableLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/ShapefileExporter.java b/src/main/java/org/neo4j/gis/spatial/ShapefileExporter.java
index ffdb7707..7e160a27 100644
--- a/src/main/java/org/neo4j/gis/spatial/ShapefileExporter.java
+++ b/src/main/java/org/neo4j/gis/spatial/ShapefileExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/ShapefileImporter.java b/src/main/java/org/neo4j/gis/spatial/ShapefileImporter.java
index 44df1b01..daebac3e 100644
--- a/src/main/java/org/neo4j/gis/spatial/ShapefileImporter.java
+++ b/src/main/java/org/neo4j/gis/spatial/ShapefileImporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/SimplePointLayer.java b/src/main/java/org/neo4j/gis/spatial/SimplePointLayer.java
index 4fe81fee..dd597f96 100644
--- a/src/main/java/org/neo4j/gis/spatial/SimplePointLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/SimplePointLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -46,7 +46,7 @@ public SpatialDatabaseRecord add(Transaction tx, double x, double y, String[] fi
return add(tx, new Coordinate(x, y), fieldsName, fields);
}
- public Integer getGeometryType() {
+ public static Integer getGeometryType() {
return GTYPE_POINT;
}
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseException.java b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseException.java
index de8b7c18..c230fb4d 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseException.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseRecord.java b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseRecord.java
index 33ee7f55..ae0070b5 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseRecord.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseRecord.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseService.java b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseService.java
index d6bd9f02..09545387 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseService.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialDatabaseService.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -201,7 +201,7 @@ public EditableLayer getOrCreateEditableLayer(Transaction tx, String name, Strin
public static final String RTREE_INDEX_NAME = "rtree";
public static final String GEOHASH_INDEX_NAME = "geohash";
- public Class extends LayerIndexReader> resolveIndexClass(String index) {
+ public static Class extends LayerIndexReader> resolveIndexClass(String index) {
if (index == null) {
return LayerRTreeIndex.class;
}
@@ -321,7 +321,7 @@ public SimplePointLayer createPointLayer(Transaction tx, String name, Class ex
makeEncoderConfig(encoderConfig), org.geotools.referencing.crs.DefaultGeographicCRS.WGS84);
}
- public String makeEncoderConfig(String... args) {
+ public static String makeEncoderConfig(String... args) {
StringBuilder sb = new StringBuilder();
if (args != null) {
for (String arg : args) {
@@ -543,13 +543,13 @@ public Layer getOrCreateRegisteredTypeLayer(Transaction tx, String name, Registe
(config == null) ? registeredLayerType.defaultConfig : config);
}
- public Map getRegisteredLayerTypes() {
+ public static Map getRegisteredLayerTypes() {
Map results = new LinkedHashMap<>();
registeredLayerTypes.forEach((s, definition) -> results.put(s, definition.getSignature()));
return results;
}
- public Class extends Layer> suggestLayerClassForEncoder(Class extends GeometryEncoder> encoderClass) {
+ public static Class extends Layer> suggestLayerClassForEncoder(Class extends GeometryEncoder> encoderClass) {
for (RegisteredLayerType type : registeredLayerTypes.values()) {
if (type.geometryEncoder == encoderClass) {
return type.layerClass;
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialDataset.java b/src/main/java/org/neo4j/gis/spatial/SpatialDataset.java
index 354d3194..563e3092 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialDataset.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialDataset.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialRecord.java b/src/main/java/org/neo4j/gis/spatial/SpatialRecord.java
index 0fa406e2..0e2b15eb 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialRecord.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialRecord.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialRelationshipTypes.java b/src/main/java/org/neo4j/gis/spatial/SpatialRelationshipTypes.java
index d946db6c..41996aa0 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialRelationshipTypes.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialRelationshipTypes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -27,4 +27,4 @@
*/
public enum SpatialRelationshipTypes implements RelationshipType {
LAYER, NETWORK, SPATIAL, LAYERS, DATASETS, LAYER_CONFIG, DATASET, PROPERTY_MAPPING
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java b/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java
index 8351df66..a818f247 100644
--- a/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java
+++ b/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/Utilities.java b/src/main/java/org/neo4j/gis/spatial/Utilities.java
index eea1f69f..8008b33a 100644
--- a/src/main/java/org/neo4j/gis/spatial/Utilities.java
+++ b/src/main/java/org/neo4j/gis/spatial/Utilities.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/WKBGeometryEncoder.java b/src/main/java/org/neo4j/gis/spatial/WKBGeometryEncoder.java
index 5d9a0bcb..923f1f11 100644
--- a/src/main/java/org/neo4j/gis/spatial/WKBGeometryEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/WKBGeometryEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/WKTGeometryEncoder.java b/src/main/java/org/neo4j/gis/spatial/WKTGeometryEncoder.java
index 29573da4..18230130 100644
--- a/src/main/java/org/neo4j/gis/spatial/WKTGeometryEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/WKTGeometryEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMapper.java b/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMapper.java
index 4852b04d..6020eeab 100644
--- a/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMapper.java
+++ b/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMappingManager.java b/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMappingManager.java
index c5068bab..b3e29287 100644
--- a/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMappingManager.java
+++ b/src/main/java/org/neo4j/gis/spatial/attributes/PropertyMappingManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/AbstractSinglePropertyEncoder.java b/src/main/java/org/neo4j/gis/spatial/encoders/AbstractSinglePropertyEncoder.java
index be707609..0ae0dd94 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/AbstractSinglePropertyEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/AbstractSinglePropertyEncoder.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.encoders;
import org.neo4j.gis.spatial.AbstractGeometryEncoder;
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/Configurable.java b/src/main/java/org/neo4j/gis/spatial/encoders/Configurable.java
index 232eff48..fd477671 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/Configurable.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/Configurable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/NativePointEncoder.java b/src/main/java/org/neo4j/gis/spatial/encoders/NativePointEncoder.java
index 06891670..37d0dc06 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/NativePointEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/NativePointEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -40,7 +40,7 @@ public class NativePointEncoder extends AbstractGeometryEncoder implements Confi
private String locationProperty = DEFAULT_GEOM;
private Neo4jCRS crs = Neo4jCRS.findCRS("WGS-84");
- protected GeometryFactory getGeometryFactory() {
+ protected static GeometryFactory getGeometryFactory() {
if (geometryFactory == null) {
geometryFactory = new GeometryFactory();
}
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/SimpleGraphEncoder.java b/src/main/java/org/neo4j/gis/spatial/encoders/SimpleGraphEncoder.java
index b99e27ff..6d2cc672 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/SimpleGraphEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/SimpleGraphEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/SimplePointEncoder.java b/src/main/java/org/neo4j/gis/spatial/encoders/SimplePointEncoder.java
index 2a9bb2a2..4e87ebe6 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/SimplePointEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/SimplePointEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/SimplePropertyEncoder.java b/src/main/java/org/neo4j/gis/spatial/encoders/SimplePropertyEncoder.java
index 322f866e..54f1ff49 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/SimplePropertyEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/SimplePropertyEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jCRS.java b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jCRS.java
index 5f977e7e..d066589b 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jCRS.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jCRS.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jGeometry.java b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jGeometry.java
index 736e12e7..8aab47f9 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jGeometry.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jGeometry.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jPoint.java b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jPoint.java
index c83f973a..ec3eb26f 100644
--- a/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jPoint.java
+++ b/src/main/java/org/neo4j/gis/spatial/encoders/neo4j/Neo4jPoint.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.encoders.neo4j;
import java.util.ArrayList;
diff --git a/src/main/java/org/neo4j/gis/spatial/filter/AbstractSearchIntersection.java b/src/main/java/org/neo4j/gis/spatial/filter/AbstractSearchIntersection.java
index 4ce5b3b8..1a794aca 100644
--- a/src/main/java/org/neo4j/gis/spatial/filter/AbstractSearchIntersection.java
+++ b/src/main/java/org/neo4j/gis/spatial/filter/AbstractSearchIntersection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/filter/SearchCQL.java b/src/main/java/org/neo4j/gis/spatial/filter/SearchCQL.java
index 4e5f6c78..08581185 100644
--- a/src/main/java/org/neo4j/gis/spatial/filter/SearchCQL.java
+++ b/src/main/java/org/neo4j/gis/spatial/filter/SearchCQL.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersect.java b/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersect.java
index c4f62114..5bba9682 100644
--- a/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersect.java
+++ b/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersect.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersectWindow.java b/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersectWindow.java
index bdf1da4e..123bb93f 100644
--- a/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersectWindow.java
+++ b/src/main/java/org/neo4j/gis/spatial/filter/SearchIntersectWindow.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/filter/SearchRecords.java b/src/main/java/org/neo4j/gis/spatial/filter/SearchRecords.java
index b2a0cd65..174ea88e 100644
--- a/src/main/java/org/neo4j/gis/spatial/filter/SearchRecords.java
+++ b/src/main/java/org/neo4j/gis/spatial/filter/SearchRecords.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedMonitor.java b/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedMonitor.java
index 4fc14351..413b5b3f 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedMonitor.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedMonitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedPointIndex.java b/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedPointIndex.java
index a60c3e6a..75892ee8 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedPointIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/ExplicitIndexBackedPointIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/IndexManager.java b/src/main/java/org/neo4j/gis/spatial/index/IndexManager.java
index 7e93c0c5..2a379347 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/IndexManager.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/IndexManager.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.index;
import java.util.List;
@@ -110,7 +130,7 @@ public void deleteIndex(IndexDefinition index) {
}
}
- public void waitForDeletions() {
+ public static void waitForDeletions() {
waitForThreads("IndexMaker");
waitForThreads("IndexRemover");
}
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerGeohashPointIndex.java b/src/main/java/org/neo4j/gis/spatial/index/LayerGeohashPointIndex.java
index 8139489c..058e0a3a 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerGeohashPointIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerGeohashPointIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerHilbertPointIndex.java b/src/main/java/org/neo4j/gis/spatial/index/LayerHilbertPointIndex.java
index 2305d295..5a2174c3 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerHilbertPointIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerHilbertPointIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerIndexReader.java b/src/main/java/org/neo4j/gis/spatial/index/LayerIndexReader.java
index 3ee196be..436af332 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerIndexReader.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerIndexReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerRTreeIndex.java b/src/main/java/org/neo4j/gis/spatial/index/LayerRTreeIndex.java
index 75f60f9c..80ed23c7 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerRTreeIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerRTreeIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -23,7 +23,9 @@
import org.neo4j.gis.spatial.Layer;
import org.neo4j.gis.spatial.filter.SearchRecords;
import org.neo4j.gis.spatial.rtree.RTreeIndex;
+import org.neo4j.gis.spatial.rtree.SpatialIndexVisitor;
import org.neo4j.gis.spatial.rtree.filter.SearchFilter;
+import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Transaction;
/**
@@ -47,6 +49,11 @@ public void init(Transaction tx, Layer layer, int maxNodeReferences) {
this.layer = layer;
}
+ @Override
+ public void visit(Transaction tx, SpatialIndexVisitor visitor, Node indexNode) {
+ super.visit(tx, visitor, indexNode);
+ }
+
@Override
public Layer getLayer() {
return layer;
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerSpaceFillingCurvePointIndex.java b/src/main/java/org/neo4j/gis/spatial/index/LayerSpaceFillingCurvePointIndex.java
index edd0f17a..ff59c0cc 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerSpaceFillingCurvePointIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerSpaceFillingCurvePointIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerTreeIndexReader.java b/src/main/java/org/neo4j/gis/spatial/index/LayerTreeIndexReader.java
index b01c87c1..9f1af2ca 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerTreeIndexReader.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerTreeIndexReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/LayerZOrderPointIndex.java b/src/main/java/org/neo4j/gis/spatial/index/LayerZOrderPointIndex.java
index f918fcf8..5ae8ccef 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/LayerZOrderPointIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/LayerZOrderPointIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/index/PropertyEncodingNodeIndex.java b/src/main/java/org/neo4j/gis/spatial/index/PropertyEncodingNodeIndex.java
index 1d085495..872c0cda 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/PropertyEncodingNodeIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/PropertyEncodingNodeIndex.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.index;
import java.util.Iterator;
diff --git a/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexReader.java b/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexReader.java
index 08a8e928..7bfdfd2b 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexReader.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.index;
diff --git a/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexWriter.java b/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexWriter.java
index 831cdafa..0b91292f 100644
--- a/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexWriter.java
+++ b/src/main/java/org/neo4j/gis/spatial/index/SpatialIndexWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.index;
diff --git a/src/main/java/org/neo4j/gis/spatial/indexfilter/CQLIndexReader.java b/src/main/java/org/neo4j/gis/spatial/indexfilter/CQLIndexReader.java
index baaed7a4..0e9c4db5 100644
--- a/src/main/java/org/neo4j/gis/spatial/indexfilter/CQLIndexReader.java
+++ b/src/main/java/org/neo4j/gis/spatial/indexfilter/CQLIndexReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/indexfilter/DynamicIndexReader.java b/src/main/java/org/neo4j/gis/spatial/indexfilter/DynamicIndexReader.java
index 519c44d5..9f4b9f3e 100644
--- a/src/main/java/org/neo4j/gis/spatial/indexfilter/DynamicIndexReader.java
+++ b/src/main/java/org/neo4j/gis/spatial/indexfilter/DynamicIndexReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -107,7 +107,7 @@ private boolean queryLeafNode(Node geomNode) {
return queryNodeProperties(geomNode, properties) && stepAndQuery(geomNode, step);
}
- private boolean stepAndQuery(Node source, JSONObject step) {
+ private static boolean stepAndQuery(Node source, JSONObject step) {
if (step != null) {
JSONObject properties = (JSONObject) step.get("properties");
RelationshipType relType = RelationshipType.withName(step.get("type").toString());
diff --git a/src/main/java/org/neo4j/gis/spatial/indexfilter/LayerIndexReaderWrapper.java b/src/main/java/org/neo4j/gis/spatial/indexfilter/LayerIndexReaderWrapper.java
index b4118203..8234dcb4 100644
--- a/src/main/java/org/neo4j/gis/spatial/indexfilter/LayerIndexReaderWrapper.java
+++ b/src/main/java/org/neo4j/gis/spatial/indexfilter/LayerIndexReaderWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMDataset.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMDataset.java
index b897783f..f83d2828 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMDataset.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMDataset.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -125,7 +125,7 @@ public Iterable getAllPointNodes(Transaction tx) {
return td.traverse(tx.getNodeByElementId(datasetNodeId)).nodes();
}
- public Iterable getWayNodes(Node way) {
+ public static Iterable getWayNodes(Node way) {
TraversalDescription td = new MonoDirectionalTraversalDescription()
.depthFirst()
.relationships(OSMRelation.NEXT, Direction.OUTGOING)
@@ -136,7 +136,7 @@ public Iterable getWayNodes(Node way) {
).nodes();
}
- public Node getChangeset(Node way) {
+ public static Node getChangeset(Node way) {
try {
return way.getSingleRelationship(OSMRelation.CHANGESET, Direction.OUTGOING).getEndNode();
} catch (Exception e) {
@@ -145,7 +145,7 @@ public Node getChangeset(Node way) {
}
}
- public Node getUser(Node nodeWayOrChangeset) {
+ public static Node getUser(Node nodeWayOrChangeset) {
TraversalDescription td = new MonoDirectionalTraversalDescription()
.depthFirst()
.relationships(OSMRelation.CHANGESET, Direction.OUTGOING)
@@ -229,7 +229,7 @@ public class Way extends OSMNode implements Iterable, Iterator getWayNodes() {
- return OSMDataset.this.getWayNodes(this.node);
+ return OSMDataset.getWayNodes(this.node);
}
public Iterable getWayPoints() {
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMGeometryEncoder.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMGeometryEncoder.java
index 42605dd7..f32ddaac 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMGeometryEncoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMGeometryEncoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -193,7 +193,7 @@ public void remove() {
}
- public Iterable getPointNodesFromWayNode(Node wayNode) {
+ public static Iterable getPointNodesFromWayNode(Node wayNode) {
final Node firstNode = wayNode.getSingleRelationship(OSMRelation.FIRST_NODE, Direction.OUTGOING).getEndNode();
final NodeProxyIterator iterator = new NodeProxyIterator(firstNode);
return () -> iterator;
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java
index 123c7d9c..2fb7904f 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMImporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -1098,7 +1098,7 @@ protected void setDatasetProperties(Map extractProperties) {
}
}
- private void addProperties(Entity node, Map properties) {
+ private static void addProperties(Entity node, Map properties) {
for (String property : properties.keySet()) {
node.setProperty(property, properties.get(property));
}
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMLayer.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMLayer.java
index ce8bdf40..df5cd16a 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMLayer.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -53,7 +53,7 @@ public void setDataset(OSMDataset osmDataset) {
this.osmDataset = osmDataset;
}
- public Integer getGeometryType() {
+ public static Integer getGeometryType() {
// The core layer in OSM is based on the Ways, and we return all of them
// as LINESTRING and POLYGON, so we use the parent GEOMETRY
return GTYPE_GEOMETRY;
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMLayerToShapefileExporter.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMLayerToShapefileExporter.java
index e5c97cde..f8b249de 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMLayerToShapefileExporter.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMLayerToShapefileExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/OSMRelation.java b/src/main/java/org/neo4j/gis/spatial/osm/OSMRelation.java
index dcbc32f3..6baf843c 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/OSMRelation.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/OSMRelation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/osm/RoadDirection.java b/src/main/java/org/neo4j/gis/spatial/osm/RoadDirection.java
index 5af16aae..56df66cc 100644
--- a/src/main/java/org/neo4j/gis/spatial/osm/RoadDirection.java
+++ b/src/main/java/org/neo4j/gis/spatial/osm/RoadDirection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/package-info.java b/src/main/java/org/neo4j/gis/spatial/package-info.java
index b90f99e9..294563d7 100644
--- a/src/main/java/org/neo4j/gis/spatial/package-info.java
+++ b/src/main/java/org/neo4j/gis/spatial/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractExtractGeoPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractExtractGeoPipe.java
index 24f050f3..d8d86156 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractExtractGeoPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractExtractGeoPipe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractFilterGeoPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractFilterGeoPipe.java
index 8aaa2f01..b1985f69 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractFilterGeoPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractFilterGeoPipe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGeoPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGeoPipe.java
index fd54d391..d400282f 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGeoPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGeoPipe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGroupGeoPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGroupGeoPipe.java
index 841d227e..7b76779a 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGroupGeoPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/AbstractGroupGeoPipe.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeFlow.java b/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeFlow.java
index b2920761..7825b9f2 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeFlow.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeFlow.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeline.java b/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeline.java
index 9b8adc68..ced87ec6 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeline.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/GeoPipeline.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCQL.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCQL.java
index 83f1a4d0..b406de2a 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCQL.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCQL.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterContain.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterContain.java
index 5315635d..c2b5907c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterContain.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterContain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCover.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCover.java
index 7f22604a..9a0a0e3d 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCover.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCover.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCoveredBy.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCoveredBy.java
index 26c82f32..25b4d0f7 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCoveredBy.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCoveredBy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCross.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCross.java
index b5b9abef..9a35e142 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCross.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterCross.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterDisjoint.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterDisjoint.java
index 7123bc5e..c357a1b3 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterDisjoint.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterDisjoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEmpty.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEmpty.java
index b0b07122..c7f5b8cc 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEmpty.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEmpty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualExact.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualExact.java
index df7f0b3f..52dea006 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualExact.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualExact.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualNorm.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualNorm.java
index c3ee79b8..eeec013b 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualNorm.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualNorm.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualTopo.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualTopo.java
index b46ae08e..f69fc52b 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualTopo.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterEqualTopo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInRelation.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInRelation.java
index 12712737..471b4456 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInRelation.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInRelation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersect.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersect.java
index 3d7556b4..4537034c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersect.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersect.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersectWindow.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersectWindow.java
index f445d917..fa20f3da 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersectWindow.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterIntersectWindow.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInvalid.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInvalid.java
index 2dc36fca..3c10ca80 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInvalid.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterInvalid.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterOverlap.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterOverlap.java
index 664a8370..9f16d482 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterOverlap.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterOverlap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterProperty.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterProperty.java
index 76b64a12..ce146faf 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterProperty.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNotNull.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNotNull.java
index b2c1e4ab..7bd82405 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNotNull.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNotNull.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNull.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNull.java
index f2a7f165..27e127c6 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNull.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterPropertyNull.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterTouch.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterTouch.java
index c9c6ac7b..dacc01ea 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterTouch.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterTouch.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterValid.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterValid.java
index 014cc327..73b7e744 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterValid.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterValid.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterWithin.java b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterWithin.java
index d0bf371a..dc1d9ad1 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterWithin.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/filtering/FilterWithin.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/AbstractPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/AbstractPipe.java
index ca522678..142ddbf7 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/AbstractPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/AbstractPipe.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.ArrayList;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/FilterPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/FilterPipe.java
index a262ff5c..1b1e6d7c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/FilterPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/FilterPipe.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.Objects;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/IdentityPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/IdentityPipe.java
index ccd6d79f..4e17dad7 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/IdentityPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/IdentityPipe.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
/**
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/LastElementIterator.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/LastElementIterator.java
index 32fde5a2..d5546789 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/LastElementIterator.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/LastElementIterator.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.Iterator;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipe.java
index 40516210..0d1a8a83 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipe.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.Iterator;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipeline.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipeline.java
index f631a60e..d62f3e69 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipeline.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/Pipeline.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.ArrayList;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/impl/RangeFilterPipe.java b/src/main/java/org/neo4j/gis/spatial/pipes/impl/RangeFilterPipe.java
index e4c365b1..d7867239 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/impl/RangeFilterPipe.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/impl/RangeFilterPipe.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.pipes.impl;
import java.util.NoSuchElementException;
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/osm/OSMGeoPipeline.java b/src/main/java/org/neo4j/gis/spatial/pipes/osm/OSMGeoPipeline.java
index 1000a74f..1479ef2c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/osm/OSMGeoPipeline.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/osm/OSMGeoPipeline.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/osm/filtering/FilterOSMAttributes.java b/src/main/java/org/neo4j/gis/spatial/pipes/osm/filtering/FilterOSMAttributes.java
index 35678038..e0a94510 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/osm/filtering/FilterOSMAttributes.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/osm/filtering/FilterOSMAttributes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/osm/processing/ExtractOSMPoints.java b/src/main/java/org/neo4j/gis/spatial/pipes/osm/processing/ExtractOSMPoints.java
index 2fa8b9dc..28157069 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/osm/processing/ExtractOSMPoints.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/osm/processing/ExtractOSMPoints.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ApplyAffineTransformation.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ApplyAffineTransformation.java
index 7b39cdbc..5cbdee57 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ApplyAffineTransformation.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ApplyAffineTransformation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Area.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Area.java
index 9c7a9e5d..7f931478 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Area.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Area.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Boundary.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Boundary.java
index b63a23dc..7fe60846 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Boundary.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Boundary.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Buffer.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Buffer.java
index be6c4bf7..d9dbe4f9 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Buffer.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Buffer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Centroid.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Centroid.java
index ab0287e4..74a6c919 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Centroid.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Centroid.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ConvexHull.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ConvexHull.java
index 970989c3..ebf19e96 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ConvexHull.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ConvexHull.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/CopyDatabaseRecordProperties.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/CopyDatabaseRecordProperties.java
index 6a59b015..cbc676a4 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/CopyDatabaseRecordProperties.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/CopyDatabaseRecordProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Densify.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Densify.java
index 05024b43..d72eadbf 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Densify.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Densify.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/DensityIslands.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/DensityIslands.java
index 4b71a91d..89d30001 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/DensityIslands.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/DensityIslands.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Difference.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Difference.java
index ac0babe3..f2b2df5f 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Difference.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Difference.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Dimension.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Dimension.java
index 324dc40d..f88e3227 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Dimension.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Dimension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Distance.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Distance.java
index da3baa0d..70eaec51 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Distance.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Distance.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/EndPoint.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/EndPoint.java
index 7a26e5ff..a218d397 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/EndPoint.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/EndPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Envelope.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Envelope.java
index d76942b0..db53f019 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Envelope.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Envelope.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractGeometries.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractGeometries.java
index 71f3a7bd..a1bbaa1e 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractGeometries.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractGeometries.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractPoints.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractPoints.java
index 9a184011..d48b3f5c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractPoints.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/ExtractPoints.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GML.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GML.java
index ee0e05e6..1aba17bc 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GML.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GML.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeoJSON.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeoJSON.java
index 7b991fba..06b476aa 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeoJSON.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeoJSON.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeometryType.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeometryType.java
index 61d882df..c064f660 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeometryType.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/GeometryType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/InteriorPoint.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/InteriorPoint.java
index 39c911d2..ae7221cc 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/InteriorPoint.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/InteriorPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/IntersectAll.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/IntersectAll.java
index bd790c44..b4367fc0 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/IntersectAll.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/IntersectAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Intersection.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Intersection.java
index 3ed868fa..6176ad6d 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Intersection.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Intersection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/KeyholeMarkupLanguage.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/KeyholeMarkupLanguage.java
index 9f465254..cc2983cb 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/KeyholeMarkupLanguage.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/KeyholeMarkupLanguage.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Length.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Length.java
index ebb5925d..588de997 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Length.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Length.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Max.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Max.java
index efa15f98..2a7ea486 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Max.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Max.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Min.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Min.java
index 72569794..5d59a3f1 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Min.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Min.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumGeometries.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumGeometries.java
index 75338982..1f411b92 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumGeometries.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumGeometries.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumPoints.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumPoints.java
index a3592f00..2afc88f3 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumPoints.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/NumPoints.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicDistance.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicDistance.java
index b1149a9b..6e7779f1 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicDistance.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicDistance.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicLength.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicLength.java
index 3519a608..412af3c8 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicLength.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/OrthodromicLength.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -53,7 +53,7 @@ protected GeoPipeFlow process(GeoPipeFlow flow) {
return flow;
}
- protected double calculateLength(Geometry geometry, CoordinateReferenceSystem crs) {
+ protected static double calculateLength(Geometry geometry, CoordinateReferenceSystem crs) {
GeodeticCalculator geodeticCalculator = new GeodeticCalculator(crs);
Coordinate[] coords = geometry.getCoordinates();
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyPreservingTopology.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyPreservingTopology.java
index 70e0436f..dbb5be20 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyPreservingTopology.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyPreservingTopology.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyWithDouglasPeucker.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyWithDouglasPeucker.java
index 1e9086e1..22384f62 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyWithDouglasPeucker.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SimplifyWithDouglasPeucker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Sort.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Sort.java
index fd850df8..49d960d0 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Sort.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Sort.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/StartPoint.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/StartPoint.java
index ef70433b..dd449d3f 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/StartPoint.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/StartPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SymDifference.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SymDifference.java
index 9b46dd3c..b4b2f33c 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/SymDifference.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/SymDifference.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Union.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Union.java
index 890770b4..f405ec54 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/Union.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/Union.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/UnionAll.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/UnionAll.java
index 4d473cec..c65d8fac 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/UnionAll.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/UnionAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/pipes/processing/WellKnownText.java b/src/main/java/org/neo4j/gis/spatial/pipes/processing/WellKnownText.java
index e40ec433..8dc67d67 100644
--- a/src/main/java/org/neo4j/gis/spatial/pipes/processing/WellKnownText.java
+++ b/src/main/java/org/neo4j/gis/spatial/pipes/processing/WellKnownText.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java b/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java
index 50415e88..18506840 100644
--- a/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java
+++ b/src/main/java/org/neo4j/gis/spatial/procedures/SpatialProcedures.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -221,7 +221,7 @@ public Stream getAllLayers() {
public Stream getAllLayerTypes() {
SpatialDatabaseService sdb = spatial();
Stream.Builder builder = Stream.builder();
- for (Map.Entry entry : sdb.getRegisteredLayerTypes().entrySet()) {
+ for (Map.Entry entry : SpatialDatabaseService.getRegisteredLayerTypes().entrySet()) {
builder.accept(new NameResult(entry.getKey(), entry.getValue()));
}
return builder.build();
@@ -237,7 +237,7 @@ public Stream addSimplePointLayer(
Layer layer = sdb.getLayer(tx, name);
if (layer == null) {
return streamNode(sdb.createLayer(tx, name, SimplePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), null,
+ SpatialDatabaseService.resolveIndexClass(indexType), null,
selectCRS(crsName)).getLayerNode(tx));
}
throw new IllegalArgumentException("Cannot create existing layer: " + name);
@@ -295,7 +295,8 @@ public Stream addSimplePointLayer(
if (layer == null) {
if (xProperty != null && yProperty != null) {
return streamNode(sdb.createLayer(tx, name, SimplePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), sdb.makeEncoderConfig(xProperty, yProperty),
+ SpatialDatabaseService.resolveIndexClass(indexType),
+ SpatialDatabaseService.makeEncoderConfig(xProperty, yProperty),
selectCRS(hintCRSName(crsName, yProperty))).getLayerNode(tx));
}
throw new IllegalArgumentException(
@@ -317,7 +318,7 @@ public Stream addSimplePointLayerWithConfig(
if (layer == null) {
if (encoderConfig.indexOf(':') > 0) {
return streamNode(sdb.createLayer(tx, name, SimplePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), encoderConfig,
+ SpatialDatabaseService.resolveIndexClass(indexType), encoderConfig,
selectCRS(hintCRSName(crsName, encoderConfig))).getLayerNode(tx));
}
throw new IllegalArgumentException(
@@ -336,7 +337,7 @@ public Stream addNativePointLayer(
Layer layer = sdb.getLayer(tx, name);
if (layer == null) {
return streamNode(sdb.createLayer(tx, name, NativePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), null, selectCRS(crsName)).getLayerNode(tx));
+ SpatialDatabaseService.resolveIndexClass(indexType), null, selectCRS(crsName)).getLayerNode(tx));
}
throw new IllegalArgumentException("Cannot create existing layer: " + name);
}
@@ -392,7 +393,8 @@ public Stream addNativePointLayer(
if (layer == null) {
if (xProperty != null && yProperty != null) {
return streamNode(sdb.createLayer(tx, name, NativePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), sdb.makeEncoderConfig(xProperty, yProperty),
+ SpatialDatabaseService.resolveIndexClass(indexType),
+ SpatialDatabaseService.makeEncoderConfig(xProperty, yProperty),
selectCRS(hintCRSName(crsName, yProperty))).getLayerNode(tx));
}
throw new IllegalArgumentException(
@@ -414,7 +416,7 @@ public Stream addNativePointLayerWithConfig(
if (layer == null) {
if (encoderConfig.indexOf(':') > 0) {
return streamNode(sdb.createLayer(tx, name, NativePointEncoder.class, SimplePointLayer.class,
- sdb.resolveIndexClass(indexType), encoderConfig,
+ SpatialDatabaseService.resolveIndexClass(indexType), encoderConfig,
selectCRS(hintCRSName(crsName, encoderConfig))).getLayerNode(tx));
}
throw new IllegalArgumentException(
@@ -433,7 +435,7 @@ public Stream addNativePointLayerWithConfig(
* @param name CRS name
* @return null or WGS84
*/
- public CoordinateReferenceSystem selectCRS(String name) {
+ public static CoordinateReferenceSystem selectCRS(String name) {
if (name == null) {
return null;
}
@@ -461,7 +463,7 @@ public Stream addLayerWithEncoder(
Layer layer = sdb.getLayer(tx, name);
if (layer == null) {
Class extends GeometryEncoder> encoderClass = encoderClasses.get(encoderClassName);
- Class extends Layer> layerClass = sdb.suggestLayerClassForEncoder(encoderClass);
+ Class extends Layer> layerClass = SpatialDatabaseService.suggestLayerClassForEncoder(encoderClass);
if (encoderClass != null) {
return streamNode(
sdb.createLayer(tx, name, encoderClass, layerClass, null, encoderConfig).getLayerNode(tx));
@@ -481,7 +483,7 @@ public Stream addLayerOfType(
SpatialDatabaseService sdb = spatial();
Layer layer = sdb.getLayer(tx, name);
if (layer == null) {
- Map knownTypes = sdb.getRegisteredLayerTypes();
+ Map knownTypes = SpatialDatabaseService.getRegisteredLayerTypes();
if (knownTypes.containsKey(type.toLowerCase())) {
return streamNode(sdb.getOrCreateRegisteredTypeLayer(tx, name, type, encoderConfig).getLayerNode(tx));
}
@@ -1007,7 +1009,7 @@ private Map toPublic(Map, ?> incoming) {
return map;
}
- private Coordinate toCoordinate(Object value) {
+ private static Coordinate toCoordinate(Object value) {
if (value instanceof Coordinate) {
return (Coordinate) value;
}
diff --git a/src/main/java/org/neo4j/gis/spatial/process/SpatialProcess.java b/src/main/java/org/neo4j/gis/spatial/process/SpatialProcess.java
index 14eda275..9d6d51dc 100644
--- a/src/main/java/org/neo4j/gis/spatial/process/SpatialProcess.java
+++ b/src/main/java/org/neo4j/gis/spatial/process/SpatialProcess.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/EmptyMonitor.java b/src/main/java/org/neo4j/gis/spatial/rtree/EmptyMonitor.java
index ff0299e0..0826dd42 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/EmptyMonitor.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/EmptyMonitor.java
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
*
- * Neo4j is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/Envelope.java b/src/main/java/org/neo4j/gis/spatial/rtree/Envelope.java
index eb25d779..8feb42a1 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/Envelope.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/Envelope.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoder.java b/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoder.java
index 8aa634ee..dcabded5 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoder.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoderFromDoubleArray.java b/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoderFromDoubleArray.java
index a85e87f4..c9824e22 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoderFromDoubleArray.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/EnvelopeDecoderFromDoubleArray.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/Listener.java b/src/main/java/org/neo4j/gis/spatial/rtree/Listener.java
index 77372530..a664a2db 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/Listener.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/Listener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/NullListener.java b/src/main/java/org/neo4j/gis/spatial/rtree/NullListener.java
index 77bd717b..d19b35f7 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/NullListener.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/NullListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/ProgressLoggingListener.java b/src/main/java/org/neo4j/gis/spatial/rtree/ProgressLoggingListener.java
index aad0fbb3..8abaaeea 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/ProgressLoggingListener.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/ProgressLoggingListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeImageExporter.java b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeImageExporter.java
index 807af695..0b2db897 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeImageExporter.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeImageExporter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -123,7 +123,7 @@ public void saveRTreeLayers(Transaction tx, File imagefile, Node rootNode, int l
MapContent mapContent = new MapContent();
drawBounds(mapContent, bounds, Color.WHITE);
- int indexHeight = index.getHeight(rootNode, 0);
+ int indexHeight = RTreeIndex.getHeight(rootNode, 0);
ArrayList> layers = new ArrayList<>(indexHeight);
ArrayList> indexMatches = new ArrayList<>(indexHeight);
for (int i = 0; i < indexHeight; i++) {
@@ -133,10 +133,10 @@ public void saveRTreeLayers(Transaction tx, File imagefile, Node rootNode, int l
layers.add(new ArrayList<>());
ArrayList nodes = layers.get(i);
if (i == 0) {
- nodes.add(new RTreeIndex.NodeWithEnvelope(rootNode, index.getIndexNodeEnvelope(rootNode)));
+ nodes.add(new RTreeIndex.NodeWithEnvelope(rootNode, RTreeIndex.getIndexNodeEnvelope(rootNode)));
} else {
for (RTreeIndex.NodeWithEnvelope parent : layers.get(i - 1)) {
- for (RTreeIndex.NodeWithEnvelope child : index.getIndexChildren(parent.node)) {
+ for (RTreeIndex.NodeWithEnvelope child : RTreeIndex.getIndexChildren(parent.node)) {
layers.get(i).add(child);
}
}
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeIndex.java b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeIndex.java
index 8da346a4..f1b85335 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeIndex.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeIndex.java
@@ -1,20 +1,21 @@
/*
- * Copyright (c) 2002-2020 Neo4j Sweden AB
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
*
- * Neo4j is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
@@ -281,7 +282,7 @@ public class GeometryNodeWithEnvelope extends NodeWithEnvelope {
* height is one.
* Thus, the lowest level is 1.
*/
- int getHeight(Node rootNode, int height) {
+ static int getHeight(Node rootNode, int height) {
try (var relationships = rootNode.getRelationships(Direction.OUTGOING, RTreeRelationshipTypes.RTREE_CHILD)) {
if (relationships.iterator().hasNext()) {
return getHeight(relationships.iterator().next().getEndNode(), height + 1);
@@ -291,7 +292,7 @@ int getHeight(Node rootNode, int height) {
}
}
- List getIndexChildren(Node rootNode) {
+ static List getIndexChildren(Node rootNode) {
List result = new ArrayList<>();
try (var relationships = rootNode.getRelationships(Direction.OUTGOING, RTreeRelationshipTypes.RTREE_CHILD)) {
for (Relationship r : relationships) {
@@ -302,7 +303,7 @@ List getIndexChildren(Node rootNode) {
return result;
}
- private List getIndexChildren(Node rootNode, int depth) {
+ private static List getIndexChildren(Node rootNode, int depth) {
if (depth < 1) {
throw new IllegalArgumentException("Depths must be at least one");
}
@@ -641,7 +642,7 @@ public void remove(Transaction tx, String geomNodeId, boolean deleteGeomNode, bo
}
}
- private Node deleteEmptyTreeNodes(Node indexNode, RelationshipType relType) {
+ private static Node deleteEmptyTreeNodes(Node indexNode, RelationshipType relType) {
if (countChildren(indexNode, relType) == 0) {
Node parent = getIndexNodeParent(indexNode);
if (parent != null) {
@@ -865,7 +866,7 @@ public Envelope getLeafNodeEnvelope(Node geomNode) {
* to use the indexes internal knowledge of the index tree and node
* structure for decoding the envelope.
*/
- public Envelope getIndexNodeEnvelope(Node indexNode) {
+ public static Envelope getIndexNodeEnvelope(Node indexNode) {
// this is ok after an index node split
if (!indexNode.hasProperty(INDEX_PROP_BBOX)) {
return null;
@@ -876,7 +877,7 @@ public Envelope getIndexNodeEnvelope(Node indexNode) {
return new Envelope(bbox[0], bbox[2], bbox[1], bbox[3]);
}
- private void visitInTx(Transaction tx, SpatialIndexVisitor visitor, String indexNodeId) {
+ private static void visitInTx(Transaction tx, SpatialIndexVisitor visitor, String indexNodeId) {
Node indexNode = tx.getNodeByElementId(indexNodeId);
if (!visitor.needsToVisit(getIndexNodeEnvelope(indexNode))) {
return;
@@ -1026,7 +1027,7 @@ private double getAreaEnlargement(Node indexNode, Node geomRootNode) {
return getArea(after) - getArea(before);
}
- private Node chooseIndexNodeWithSmallestArea(List indexNodes) {
+ private static Node chooseIndexNodeWithSmallestArea(List indexNodes) {
Node result = null;
double smallestArea = -1;
@@ -1318,7 +1319,7 @@ private boolean adjustParentBoundingBox(Node indexNode, RelationshipType relatio
return false;
}
- protected void setIndexNodeEnvelope(Node indexNode, Envelope bbox) {
+ protected static void setIndexNodeEnvelope(Node indexNode, Envelope bbox) {
indexNode.setProperty(INDEX_PROP_BBOX,
new double[]{bbox.getMinX(), bbox.getMinY(), bbox.getMaxX(), bbox.getMaxY()});
}
@@ -1330,7 +1331,7 @@ protected void setIndexNodeEnvelope(Node indexNode, Envelope bbox) {
* @param childBBox geomNode inserted
* @return is bbox changed?
*/
- protected boolean expandParentBoundingBoxAfterNewChild(Node parent, double[] childBBox) {
+ protected static boolean expandParentBoundingBoxAfterNewChild(Node parent, double[] childBBox) {
if (!parent.hasProperty(INDEX_PROP_BBOX)) {
parent.setProperty(INDEX_PROP_BBOX, new double[]{childBBox[0], childBBox[1], childBBox[2], childBBox[3]});
return true;
@@ -1379,7 +1380,7 @@ private static double getArea(Envelope e) {
return e.getArea();
}
- private void deleteTreeBelow(Node rootNode) {
+ private static void deleteTreeBelow(Node rootNode) {
try (var relationships = rootNode.getRelationships(Direction.OUTGOING, RTreeRelationshipTypes.RTREE_CHILD)) {
for (Relationship relationship : relationships) {
deleteRecursivelySubtree(relationship.getEndNode(), relationship);
@@ -1387,7 +1388,7 @@ private void deleteTreeBelow(Node rootNode) {
}
}
- private void deleteRecursivelySubtree(Node node, Relationship incoming) {
+ private static void deleteRecursivelySubtree(Node node, Relationship incoming) {
try (var relationships = node.getRelationships(Direction.OUTGOING, RTreeRelationshipTypes.RTREE_CHILD)) {
for (Relationship relationship : relationships) {
deleteRecursivelySubtree(relationship.getEndNode(), relationship);
@@ -1405,11 +1406,11 @@ private void deleteRecursivelySubtree(Node node, Relationship incoming) {
node.delete();
}
- protected boolean isGeometryNodeIndexed(Node geomNode) {
+ protected static boolean isGeometryNodeIndexed(Node geomNode) {
return geomNode.hasRelationship(Direction.INCOMING, RTreeRelationshipTypes.RTREE_REFERENCE);
}
- protected Node findLeafContainingGeometryNode(Node geomNode) {
+ protected static Node findLeafContainingGeometryNode(Node geomNode) {
return geomNode.getSingleRelationship(RTreeRelationshipTypes.RTREE_REFERENCE, Direction.INCOMING)
.getStartNode();
}
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeMonitor.java b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeMonitor.java
index fbbda1d5..3cf5032a 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeMonitor.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeMonitor.java
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
*
- * Neo4j is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeRelationshipTypes.java b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeRelationshipTypes.java
index a89f3f58..f9203891 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/RTreeRelationshipTypes.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/RTreeRelationshipTypes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexRecordCounter.java b/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexRecordCounter.java
index cb31734c..8dbfe77e 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexRecordCounter.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexRecordCounter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexVisitor.java b/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexVisitor.java
index 378c462f..84d1747d 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexVisitor.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/SpatialIndexVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/TreeMonitor.java b/src/main/java/org/neo4j/gis/spatial/rtree/TreeMonitor.java
index 5e190a2d..6d2efb01 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/TreeMonitor.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/TreeMonitor.java
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
*
- * Neo4j is free software: you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/AbstractSearchEnvelopeIntersection.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/AbstractSearchEnvelopeIntersection.java
index 36f77b28..e77bdb64 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/AbstractSearchEnvelopeIntersection.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/AbstractSearchEnvelopeIntersection.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchAll.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchAll.java
index d93526e6..b45b1e24 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchAll.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchAll.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchCoveredByEnvelope.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchCoveredByEnvelope.java
index 2eb6521e..335e6865 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchCoveredByEnvelope.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchCoveredByEnvelope.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchEqualEnvelopes.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchEqualEnvelopes.java
index 0fceb910..6c8ffb66 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchEqualEnvelopes.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchEqualEnvelopes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
@@ -34,4 +34,4 @@ protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
return referenceEnvelope.contains(geomEnvelope) && geomEnvelope.contains(referenceEnvelope);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchFilter.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchFilter.java
index 657d4193..173e56bf 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchFilter.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
diff --git a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchResults.java b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchResults.java
index 496f40ff..45e1bb83 100644
--- a/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchResults.java
+++ b/src/main/java/org/neo4j/gis/spatial/rtree/filter/SearchResults.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.rtree.filter;
diff --git a/src/main/java/org/neo4j/gis/spatial/utilities/GeotoolsAdapter.java b/src/main/java/org/neo4j/gis/spatial/utilities/GeotoolsAdapter.java
index 41ce47e1..aada0f28 100644
--- a/src/main/java/org/neo4j/gis/spatial/utilities/GeotoolsAdapter.java
+++ b/src/main/java/org/neo4j/gis/spatial/utilities/GeotoolsAdapter.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial.utilities;
import static org.geotools.referencing.crs.DefaultEngineeringCRS.GENERIC_2D;
diff --git a/src/main/java/org/neo4j/gis/spatial/utilities/LayerUtilities.java b/src/main/java/org/neo4j/gis/spatial/utilities/LayerUtilities.java
index 89fe1385..e0c80688 100644
--- a/src/main/java/org/neo4j/gis/spatial/utilities/LayerUtilities.java
+++ b/src/main/java/org/neo4j/gis/spatial/utilities/LayerUtilities.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/utilities/ReferenceNodes.java b/src/main/java/org/neo4j/gis/spatial/utilities/ReferenceNodes.java
index 0e9b270c..09150206 100644
--- a/src/main/java/org/neo4j/gis/spatial/utilities/ReferenceNodes.java
+++ b/src/main/java/org/neo4j/gis/spatial/utilities/ReferenceNodes.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.gis.spatial.utilities;
diff --git a/src/main/java/org/neo4j/gis/spatial/utilities/RelationshipTraversal.java b/src/main/java/org/neo4j/gis/spatial/utilities/RelationshipTraversal.java
index 085d4abe..5c80b269 100644
--- a/src/main/java/org/neo4j/gis/spatial/utilities/RelationshipTraversal.java
+++ b/src/main/java/org/neo4j/gis/spatial/utilities/RelationshipTraversal.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2022 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/main/java/org/neo4j/gis/spatial/utilities/TraverserFactory.java b/src/main/java/org/neo4j/gis/spatial/utilities/TraverserFactory.java
index b51f5deb..3faf6f53 100644
--- a/src/main/java/org/neo4j/gis/spatial/utilities/TraverserFactory.java
+++ b/src/main/java/org/neo4j/gis/spatial/utilities/TraverserFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/site/site.xml b/src/site/site.xml
index 71660f0c..605b5d00 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -1,25 +1,23 @@
+ ~ Copyright (c) "Neo4j"
+ ~ Neo4j Sweden AB [http://neo4j.com]
+ ~
+ ~ This file is part of Neo4j Spatial.
+ ~
+ ~ Neo4j is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
diff --git a/src/test/java/org/neo4j/doc/tools/AsciiDocGenerator.java b/src/test/java/org/neo4j/doc/tools/AsciiDocGenerator.java
index 44cd84fe..0a4a9491 100644
--- a/src/test/java/org/neo4j/doc/tools/AsciiDocGenerator.java
+++ b/src/test/java/org/neo4j/doc/tools/AsciiDocGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
@@ -98,7 +98,7 @@ public AsciiDocGenerator description(final String description) {
return this;
}
- protected void line(final Writer fw, final String string)
+ protected static void line(final Writer fw, final String string)
throws IOException {
fw.append(string);
fw.append("\n");
diff --git a/src/test/java/org/neo4j/doc/tools/DocumentationData.java b/src/test/java/org/neo4j/doc/tools/DocumentationData.java
index 2c24d993..8c0af7da 100644
--- a/src/test/java/org/neo4j/doc/tools/DocumentationData.java
+++ b/src/test/java/org/neo4j/doc/tools/DocumentationData.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
@@ -45,9 +45,8 @@ public String getPayload() {
.isEmpty()
&& MediaType.APPLICATION_JSON_TYPE.equals(payloadType)) {
return JSONPrettifier.parse(this.payload);
- } else {
- return this.payload;
- }
+ }
+ return this.payload;
}
public String getPrettifiedEntity() {
diff --git a/src/test/java/org/neo4j/doc/tools/GraphVizConfig.java b/src/test/java/org/neo4j/doc/tools/GraphVizConfig.java
index a8f77793..8cb2ed15 100644
--- a/src/test/java/org/neo4j/doc/tools/GraphVizConfig.java
+++ b/src/test/java/org/neo4j/doc/tools/GraphVizConfig.java
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
- * This file is part of Neo4j.
+ * This file is part of Neo4j Spatial.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
diff --git a/src/test/java/org/neo4j/doc/tools/JSONPrettifier.java b/src/test/java/org/neo4j/doc/tools/JSONPrettifier.java
index c650cfec..3fc9b668 100644
--- a/src/test/java/org/neo4j/doc/tools/JSONPrettifier.java
+++ b/src/test/java/org/neo4j/doc/tools/JSONPrettifier.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
diff --git a/src/test/java/org/neo4j/doc/tools/JavaTestDocsGenerator.java b/src/test/java/org/neo4j/doc/tools/JavaTestDocsGenerator.java
index d30982e7..cb072d66 100644
--- a/src/test/java/org/neo4j/doc/tools/JavaTestDocsGenerator.java
+++ b/src/test/java/org/neo4j/doc/tools/JavaTestDocsGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
diff --git a/src/test/java/org/neo4j/doc/tools/SpatialGraphVizHelper.java b/src/test/java/org/neo4j/doc/tools/SpatialGraphVizHelper.java
index 170384d2..02cbf9bc 100644
--- a/src/test/java/org/neo4j/doc/tools/SpatialGraphVizHelper.java
+++ b/src/test/java/org/neo4j/doc/tools/SpatialGraphVizHelper.java
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
- * This file is part of Neo4j.
+ * This file is part of Neo4j Spatial.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
package org.neo4j.doc.tools;
diff --git a/src/test/java/org/neo4j/gis/spatial/AbstractJavaDocTestBase.java b/src/test/java/org/neo4j/gis/spatial/AbstractJavaDocTestBase.java
index 8c942ef6..cd229eaf 100644
--- a/src/test/java/org/neo4j/gis/spatial/AbstractJavaDocTestBase.java
+++ b/src/test/java/org/neo4j/gis/spatial/AbstractJavaDocTestBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -58,6 +58,7 @@ public static void shutdownDb() {
}
+ @Override
public GraphDatabaseService graphdb() {
return db;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/FakeIndex.java b/src/test/java/org/neo4j/gis/spatial/FakeIndex.java
index 1eb4208d..8a77408f 100644
--- a/src/test/java/org/neo4j/gis/spatial/FakeIndex.java
+++ b/src/test/java/org/neo4j/gis/spatial/FakeIndex.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/LayerSignatureTest.java b/src/test/java/org/neo4j/gis/spatial/LayerSignatureTest.java
index 1520d639..b0a367f7 100644
--- a/src/test/java/org/neo4j/gis/spatial/LayerSignatureTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/LayerSignatureTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/LayersTest.java b/src/test/java/org/neo4j/gis/spatial/LayersTest.java
index e4acec3f..7eca583f 100644
--- a/src/test/java/org/neo4j/gis/spatial/LayersTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/LayersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,9 +21,9 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME;
import java.io.File;
@@ -159,7 +159,7 @@ private void testPointLayer(Class extends LayerIndexReader> indexClass,
inTx(tx -> spatial.deleteLayer(tx, layerName,
new ProgressLoggingListener("deleting layer '" + layerName + "'", System.out)));
inTx(tx -> assertNull(spatial.getLayer(tx, layerName)));
- spatial.indexManager.waitForDeletions();
+ IndexManager.waitForDeletions();
}
@Test
@@ -274,12 +274,12 @@ private String testSpecificEditableLayer(String layerName, Class extends Geome
inTx(tx -> {
Layer layer = spatial.createLayer(tx, layerName, geometryEncoderClass, layerClass);
assertNotNull(layer);
- assertTrue(layer instanceof EditableLayer, "Should be an editable layer");
+ assertInstanceOf(EditableLayer.class, layer, "Should be an editable layer");
});
inTx(tx -> {
Layer layer = spatial.getLayer(tx, layerName);
assertNotNull(layer);
- assertTrue(layer instanceof EditableLayer, "Should be an editable layer");
+ assertInstanceOf(EditableLayer.class, layer, "Should be an editable layer");
EditableLayer editableLayer = (EditableLayer) layer;
CoordinateList coordinates = new CoordinateList();
@@ -317,7 +317,7 @@ private String testSpecificEditableLayer(String layerName, Class extends Geome
return layerName;
}
- private void printResults(Layer layer, List results) {
+ private static void printResults(Layer layer, List results) {
System.out.println("\tTesting layer '" + layer.getName() + "' (class " + layer.getClass() + "), found results: "
+ results.size());
for (SpatialDatabaseRecord r : results) {
@@ -388,7 +388,7 @@ public void testIndexAccessAfterBulkInsertion() {
Result result = tx.execute(cypher);
// System.out.println(result.columns().toString());
Object obj = result.columnAs("count(p)").next();
- assertTrue(obj instanceof Long);
+ assertInstanceOf(Long.class, obj);
assertEquals(1000L, (long) ((Long) obj));
tx.commit();
}
diff --git a/src/test/java/org/neo4j/gis/spatial/Neo4jSpatialDataStoreTest.java b/src/test/java/org/neo4j/gis/spatial/Neo4jSpatialDataStoreTest.java
index 7fb51901..33d2cd5f 100644
--- a/src/test/java/org/neo4j/gis/spatial/Neo4jSpatialDataStoreTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/Neo4jSpatialDataStoreTest.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -119,14 +139,15 @@ public void shouldBeAbleToGetInfoForLayer() throws IOException {
hasItem("Nybrodalsvägen"));
}
- private Set featureNames(SimpleFeatureCollection features) {
+ private static Set featureNames(SimpleFeatureCollection features) {
HashSet names = new HashSet<>();
- SimpleFeatureIterator featureIterator = features.features();
- while (featureIterator.hasNext()) {
- SimpleFeature feature = featureIterator.next();
- Object name = feature.getAttribute("name");
- if (name != null) {
- names.add(name.toString());
+ try (SimpleFeatureIterator featureIterator = features.features()) {
+ while (featureIterator.hasNext()) {
+ SimpleFeature feature = featureIterator.next();
+ Object name = feature.getAttribute("name");
+ if (name != null) {
+ names.add(name.toString());
+ }
}
}
return names;
diff --git a/src/test/java/org/neo4j/gis/spatial/Neo4jTestCase.java b/src/test/java/org/neo4j/gis/spatial/Neo4jTestCase.java
index 6222891d..3a5c5756 100644
--- a/src/test/java/org/neo4j/gis/spatial/Neo4jTestCase.java
+++ b/src/test/java/org/neo4j/gis/spatial/Neo4jTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -143,7 +143,7 @@ public void tearDown() {
private void beforeShutdown() {
}
- Path getNeoPath() {
+ static Path getNeoPath() {
return dbPath.toAbsolutePath();
}
@@ -151,7 +151,7 @@ Path getDbPath() {
return dbPath.toAbsolutePath().resolve("test-" + storePrefix);
}
- private void deleteDatabase() {
+ private static void deleteDatabase() {
try {
FileUtils.deleteDirectory(getNeoPath());
} catch (IOException e) {
diff --git a/src/test/java/org/neo4j/gis/spatial/Neo4jTestUtils.java b/src/test/java/org/neo4j/gis/spatial/Neo4jTestUtils.java
index db9cebdc..ee933602 100644
--- a/src/test/java/org/neo4j/gis/spatial/Neo4jTestUtils.java
+++ b/src/test/java/org/neo4j/gis/spatial/Neo4jTestUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -19,8 +19,8 @@
*/
package org.neo4j.gis.spatial;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.util.ArrayList;
@@ -117,7 +117,7 @@ public static void printTree(Node root, int depth) {
public static void assertCollection(Collection collection, T... expectedItems) {
String collectionString = join(", ", collection.toArray());
- assertEquals(collectionString, expectedItems.length, collection.size());
+ assertEquals(expectedItems.length, collection.size(), collectionString);
for (T item : expectedItems) {
assertTrue(collection.contains(item));
}
@@ -156,9 +156,8 @@ private static long calculateDiskUsage(File file) {
count += calculateDiskUsage(sub);
}
return count;
- } else {
- return file.length();
}
+ return file.length();
}
private static long databaseDiskUsage(File path) {
diff --git a/src/test/java/org/neo4j/gis/spatial/OsmAnalysisTest.java b/src/test/java/org/neo4j/gis/spatial/OsmAnalysisTest.java
index 5ae33790..b64bbeac 100644
--- a/src/test/java/org/neo4j/gis/spatial/OsmAnalysisTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/OsmAnalysisTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -144,7 +144,7 @@ public void testAnalysis2(String osm, int years, int days) throws IOException {
for (Node cNode : dataset.getAllChangesetNodes(tx)) {
long timestamp = (Long) cNode.getProperty("timestamp", 0L);
- Node userNode = dataset.getUser(cNode);
+ Node userNode = OSMDataset.getUser(cNode);
String name = (String) userNode.getProperty("name");
User user = userIndex.get(name);
@@ -302,7 +302,7 @@ public void testAnalysis(String osm) throws Exception {
}
}
- private ReferencedEnvelope getEnvelope(Transaction tx, Collection layers) {
+ private static ReferencedEnvelope getEnvelope(Transaction tx, Collection layers) {
CoordinateReferenceSystem crs = null;
Envelope envelope = null;
@@ -321,7 +321,7 @@ private ReferencedEnvelope getEnvelope(Transaction tx, Collection layers)
return new ReferencedEnvelope(Utilities.fromNeo4jToJts(envelope), crs);
}
- private SortedMap removeEmptyLayers(Transaction tx, Map layers) {
+ private static SortedMap removeEmptyLayers(Transaction tx, Map layers) {
SortedMap result = new TreeMap<>();
for (Entry entry : layers.entrySet()) {
@@ -333,7 +333,7 @@ private SortedMap removeEmptyLayers(Transaction tx, Map exportPoints(Transaction tx, String layerPrefix,
+ private static SortedMap exportPoints(Transaction tx, String layerPrefix,
SpatialDatabaseService spatialService, Set users) {
SortedMap layers = new TreeMap<>();
int startYear = 2009;
@@ -399,7 +399,7 @@ private SortedMap exportPoints(Transaction tx, String layerPrefix
return layers;
}
- private SortedSet getTopTen(Map userIndex) {
+ private static SortedSet getTopTen(Map userIndex) {
SortedSet userList = new TreeSet<>(userIndex.values());
SortedSet topTen = new TreeSet<>();
@@ -420,7 +420,7 @@ private SortedSet getTopTen(Map userIndex) {
return topTen;
}
- private Map collectUserChangesetData(Node usersNode) {
+ private static Map collectUserChangesetData(Node usersNode) {
Map userIndex = new HashMap<>();
for (Relationship r : usersNode.getRelationships(Direction.OUTGOING, OSMRelation.OSM_USER)) {
Node userNode = r.getEndNode();
diff --git a/src/test/java/org/neo4j/gis/spatial/ProgressLoggingListenerTest.java b/src/test/java/org/neo4j/gis/spatial/ProgressLoggingListenerTest.java
index b6ffd9a5..974435e7 100644
--- a/src/test/java/org/neo4j/gis/spatial/ProgressLoggingListenerTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/ProgressLoggingListenerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -47,7 +47,7 @@ public void testProgressLoggingListnerWithOnlyStartAndEnd() {
testProgressLoggingListenerWithSpecifiedWaits(unitsOfWork, timeWait, throttle, 3);
}
- private void testProgressLoggingListenerWithSpecifiedWaits(int unitsOfWork, long timeWait, long throttle,
+ private static void testProgressLoggingListenerWithSpecifiedWaits(int unitsOfWork, long timeWait, long throttle,
int expectedLogCount) {
// When running maven-surefire System.out is replaced with a PrintStream that mockito cannot spy on, so we need to wrap it here
PrintStream wrapped = new PrintStream(System.out);
diff --git a/src/test/java/org/neo4j/gis/spatial/RTreeBulkInsertTest.java b/src/test/java/org/neo4j/gis/spatial/RTreeBulkInsertTest.java
index 0611b44a..bd2e8bf5 100644
--- a/src/test/java/org/neo4j/gis/spatial/RTreeBulkInsertTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/RTreeBulkInsertTest.java
@@ -1,11 +1,32 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME;
import static org.neo4j.gis.spatial.rtree.RTreeIndex.DEFAULT_MAX_NODE_REFERENCES;
import static org.neo4j.internal.helpers.collection.MapUtil.map;
@@ -29,11 +50,11 @@
import org.geotools.api.referencing.crs.CoordinateReferenceSystem;
import org.geotools.data.neo4j.Neo4jFeatureBuilder;
import org.geotools.referencing.crs.DefaultEngineeringCRS;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.neo4j.dbms.api.DatabaseManagementService;
@@ -74,17 +95,17 @@ public class RTreeBulkInsertTest {
// While the current lucene index implmentation is so slow (16n/s) we disable all benchmarks for lucene backed indexes
private static final boolean enableLucene = false;
- @Before
+ @BeforeEach
public void before() throws IOException {
restart();
}
- @After
+ @AfterEach
public void after() throws IOException {
doCleanShutdown();
}
- @Ignore
+ @Disabled
public void shouldDeleteRecursiveTree() {
int depth = 5;
int width = 2;
@@ -134,7 +155,7 @@ private void debugRest() {
}
}
- private void deleteRecursivelySubtree(Node node, Relationship incoming) {
+ private static void deleteRecursivelySubtree(Node node, Relationship incoming) {
for (Relationship relationship : node.getRelationships(Direction.OUTGOING,
RTreeRelationshipTypes.RTREE_CHILD)) {
deleteRecursivelySubtree(relationship.getEndNode(), relationship);
@@ -165,7 +186,7 @@ private EditableLayer getOrCreateSimplePointLayer(String name, String index, Str
}
}
- @Ignore
+ @Disabled
public void shouldInsertSimpleRTree() {
int width = 20;
int blockSize = 10000;
@@ -212,7 +233,7 @@ public void shouldInsertSimpleRTree() {
}
- private List idsToNodes(Transaction tx, List nodeIds) {
+ private static List idsToNodes(Transaction tx, List nodeIds) {
return nodeIds.stream().map(tx::getNodeByElementId).collect(Collectors.toList());
}
@@ -451,6 +472,7 @@ private RTreeIndexMaker(String name, String splitMode, String insertMode, int ma
this.config = config;
}
+ @Override
public EditableLayer setupLayer(Transaction tx) {
this.nodes = setup(name, "rtree", config.width);
this.layer = (EditableLayer) spatial.getLayer(tx, name);
@@ -583,12 +605,12 @@ public void shouldInsertManyNodesInBulkWithHilbert_small() throws FactoryExcepti
insertManyNodesInBulk(new HilbertIndexMaker("Coordinates", "Bulk", testConfigs.get("small")), 5000);
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesIndividuallyWithQuadraticSplit_small_10() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.QUADRATIC_SPLIT, 5000, 10, testConfigs.get("small"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesIndividuallyGreenesSplit_small_10() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.GREENES_SPLIT, 5000, 10, testConfigs.get("small"));
}
@@ -607,12 +629,12 @@ public void shouldInsertManyNodesInBulkWithGreenesSplit_small_10() throws Factor
* Small model 250*250 nodes (shallow tree)
*/
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesIndividuallyWithQuadraticSplit_small_100() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.QUADRATIC_SPLIT, 5000, 100, testConfigs.get("small"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesIndividuallyGreenesSplit_small_100() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.GREENES_SPLIT, 5000, 100, testConfigs.get("small"));
}
@@ -661,12 +683,12 @@ public void shouldInsertManyNodesInBulkWithHilbert_medium() throws FactoryExcept
insertManyNodesInBulk(new HilbertIndexMaker("Coordinates", "Bulk", testConfigs.get("medium")), 5000);
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesIndividuallyWithQuadraticSplit_medium_10() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.QUADRATIC_SPLIT, 5000, 10, testConfigs.get("medium"));
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesIndividuallyGreenesSplit_medium_10() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.GREENES_SPLIT, 5000, 10, testConfigs.get("medium"));
}
@@ -681,12 +703,12 @@ public void shouldInsertManyNodesInBulkWithGreenesSplit_medium_10() throws Facto
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 10, testConfigs.get("medium"));
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesInBulkWithQuadraticSplit_medium_10_merge() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.QUADRATIC_SPLIT, 5000, 10, testConfigs.get("medium"), true);
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesInBulkWithGreenesSplit_medium_10_merge() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 10, testConfigs.get("medium"), true);
}
@@ -695,17 +717,17 @@ public void shouldInsertManyNodesInBulkWithGreenesSplit_medium_10_merge() throws
* Medium model 500*500 nodes (shallow tree - factor 100)
*/
- @Ignore
+ @Disabled
public void shouldInsertManyNodesIndividuallyWithQuadraticSplit_medium_100() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.QUADRATIC_SPLIT, 5000, 100, testConfigs.get("medium"));
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesIndividuallyGreenesSplit_medium_100() throws FactoryException, IOException {
insertManyNodesIndividually(RTreeIndex.GREENES_SPLIT, 5000, 100, testConfigs.get("medium"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesInBulkWithQuadraticSplit_medium_100() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.QUADRATIC_SPLIT, 5000, 100, testConfigs.get("medium"));
}
@@ -715,12 +737,12 @@ public void shouldInsertManyNodesInBulkWithGreenesSplit_medium_100() throws Fact
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 100, testConfigs.get("medium"));
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesInBulkWithQuadraticSplit_medium_100_merge() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.QUADRATIC_SPLIT, 5000, 100, testConfigs.get("medium"), true);
}
- @Ignore
+ @Disabled
public void shouldInsertManyNodesInBulkWithGreenesSplit_medium_100_merge() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 100, testConfigs.get("medium"), true);
}
@@ -759,22 +781,22 @@ public void shouldInsertManyNodesInBulkWithHilbert_large() throws FactoryExcepti
insertManyNodesInBulk(new HilbertIndexMaker("Coordinates", "Bulk", testConfigs.get("large")), 5000);
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesInBulkWithQuadraticSplit_large_10() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.QUADRATIC_SPLIT, 5000, 10, testConfigs.get("large"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesInBulkWithGreenesSplit_large_10() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 10, testConfigs.get("large"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesInBulkWithQuadraticSplit_large_100() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.QUADRATIC_SPLIT, 5000, 100, testConfigs.get("large"));
}
- @Ignore // takes too long, change to @Test when benchmarking
+ @Disabled // takes too long, change to @Test when benchmarking
public void shouldInsertManyNodesInBulkWithGreenesSplit_large_100() throws FactoryException, IOException {
insertManyNodesInBulk(RTreeIndex.GREENES_SPLIT, 5000, 100, testConfigs.get("large"));
}
@@ -896,7 +918,7 @@ private void insertManyNodesIndividually(IndexMaker indexMaker, int blockSize) {
* Run this manually to generate images of RTree that can be used for animation.
* ffmpeg -f image2 -r 12 -i rtree-single/rtree-%d.png -r 12 -s 1280x960 rtree-single2_12fps.mp4
*/
- @Ignore
+ @Disabled
public void shouldInsertManyNodesIndividuallyAndGenerateImagesForAnimation() throws FactoryException, IOException {
IndexTestConfig config = testConfigs.get("medium");
int blockSize = 5;
@@ -1009,7 +1031,7 @@ private void insertManyNodesInBulk(IndexMaker indexMaker, int blockSize) {
* Run this manually to generate images of RTree that can be used for animation.
* ffmpeg -f image2 -r 12 -i rtree-single/rtree-%d.png -r 12 -s 1280x960 rtree-single2_12fps.mp4
*/
- @Ignore
+ @Disabled
public void shouldInsertManyNodesInBulkAndGenerateImagesForAnimation() throws FactoryException, IOException {
IndexTestConfig config = testConfigs.get("medium");
int blockSize = 1000;
@@ -1065,7 +1087,7 @@ public void shouldInsertManyNodesInBulkAndGenerateImagesForAnimation() throws Fa
// debugIndexTree((RTreeIndex) layer.getIndex());
}
- @Ignore
+ @Disabled
public void shouldAccessIndexAfterBulkInsertion() throws Exception {
// Use these two lines if you want to examine the output.
// File dbPath = new File("target/var/BulkTest");
@@ -1117,7 +1139,7 @@ public void shouldAccessIndexAfterBulkInsertion() throws Exception {
Result result = tx.execute(cypher);
// System.out.println(result.columns().toString());
Object obj = result.columnAs("count").next();
- assertTrue(obj instanceof Long);
+ assertInstanceOf(Long.class, obj);
assertEquals((long) ((Long) obj), numNodes);
tx.commit();
}
@@ -1132,14 +1154,14 @@ public void shouldAccessIndexAfterBulkInsertion() throws Exception {
Result result = tx.execute(cypher);
// System.out.println(result.columns().toString());
Object obj = result.columnAs("count").next();
- assertTrue(obj instanceof Long);
+ assertInstanceOf(Long.class, obj);
assertEquals((long) ((Long) obj), numNodes);
tx.commit();
}
System.out.println("\t" + (System.currentTimeMillis() - start) + "ms");
}
- @Ignore
+ @Disabled
public void shouldBuildTreeFromScratch() throws Exception {
//GraphDatabaseService db = this.databases.database("BultTest2");
GraphDatabaseService db = this.db;
@@ -1185,7 +1207,7 @@ public void shouldBuildTreeFromScratch() throws Exception {
buildRTreeFromScratch.invoke(rtree, rtree.getIndexRoot(tx), decodeEnvelopes.invoke(rtree, coords), 0.7);
RTreeTestUtils testUtils = new RTreeTestUtils(rtree);
- Map results = testUtils.get_height_map(tx, rtree.getIndexRoot(tx));
+ Map results = RTreeTestUtils.get_height_map(tx, rtree.getIndexRoot(tx));
assertEquals(1, results.size());
assertEquals((int) expectedHeight.invoke(rtree, 0.7, coords.size()),
results.keySet().iterator().next().intValue());
@@ -1195,7 +1217,7 @@ public void shouldBuildTreeFromScratch() throws Exception {
}
}
- @Ignore
+ @Disabled
public void shouldPerformRTreeBulkInsertion() throws Exception {
// Use this line if you want to examine the output.
//GraphDatabaseService db = databases.database("BulkTest");
@@ -1231,7 +1253,7 @@ public void shouldPerformRTreeBulkInsertion() throws Exception {
RTreeIndex rtree = (RTreeIndex) layer.getIndex();
RTreeTestUtils utils = new RTreeTestUtils(rtree);
- assertTrue(utils.check_balance(tx, rtree.getIndexRoot(tx)));
+ assertTrue(RTreeTestUtils.check_balance(tx, rtree.getIndexRoot(tx)));
tx.commit();
}
@@ -1354,7 +1376,7 @@ private List populateSquareWithStreets(int width) {
}
- private void searchForPos(int numNodes, GraphDatabaseService db) {
+ private static void searchForPos(int numNodes, GraphDatabaseService db) {
System.out.println("Searching with spatial.withinDistance");
long start = System.currentTimeMillis();
try (Transaction tx = db.beginTx()) { // 'points',{longitude:15.0,latitude:60.0},100
@@ -1393,26 +1415,25 @@ private static class NodeWithEnvelope {
}
}
- private void checkIndexOverlaps(Transaction tx, Layer layer, TestStats stats) {
+ private static void checkIndexOverlaps(Transaction tx, Layer layer, TestStats stats) {
RTreeIndex index = (RTreeIndex) layer.getIndex();
Node root = index.getIndexRoot(tx);
ArrayList> nodes = new ArrayList<>();
nodes.add(new ArrayList<>());
- nodes.get(0).add(new NodeWithEnvelope(root, index.getIndexNodeEnvelope(root)));
+ nodes.get(0).add(new NodeWithEnvelope(root, RTreeIndex.getIndexNodeEnvelope(root)));
do {
ArrayList children = new ArrayList<>();
for (NodeWithEnvelope parent : nodes.get(nodes.size() - 1)) {
for (Relationship rel : parent.node.getRelationships(Direction.OUTGOING,
RTreeRelationshipTypes.RTREE_CHILD)) {
Node child = rel.getEndNode();
- children.add(new NodeWithEnvelope(child, index.getIndexNodeEnvelope(child)));
+ children.add(new NodeWithEnvelope(child, RTreeIndex.getIndexNodeEnvelope(child)));
}
}
if (children.isEmpty()) {
break;
- } else {
- nodes.add(children);
}
+ nodes.add(children);
} while (true);
System.out.println("Comparison of index node areas to root area for " + nodes.size() + " index levels:");
for (int level = 0; level < nodes.size(); level++) {
@@ -1423,7 +1444,7 @@ private void checkIndexOverlaps(Transaction tx, Layer layer, TestStats stats) {
}
}
- private double[] calculateOverlap(NodeWithEnvelope root, List nodes) {
+ private static double[] calculateOverlap(NodeWithEnvelope root, List nodes) {
double rootArea = root.envelope.getArea();
double nodesArea = 0.0;
for (NodeWithEnvelope entry : nodes) {
@@ -1472,8 +1493,8 @@ private List queryIndex(Layer layer, TestStats stats) {
stats.put("Indexed", geometrySize);
System.out.println("Index contains " + geometrySize + " geometries");
}
- assertEquals("Expected " + config.expectedGeometries + " nodes to be returned", config.expectedGeometries,
- countGeometries);
+ assertEquals(config.expectedGeometries, countGeometries,
+ "Expected " + config.expectedGeometries + " nodes to be returned");
return nodes;
}
@@ -1509,7 +1530,8 @@ private void getRTreeIndexStats(RTreeIndex index, TreeMonitor monitor, TestStats
// unless the polygon is a rectangle, in which case they are not contained, leading to
// different numbers for expectedGeometries and expectedCount.
// See https://github.com/locationtech/jts/blob/master/modules/core/src/main/java/org/locationtech/jts/operation/predicate/RectangleContains.java#L70
- assertEquals("Expected " + config.expectedCount + " nodes to be matched", config.expectedCount, matched);
+ assertEquals(config.expectedCount, matched,
+ "Expected " + config.expectedCount + " nodes to be matched");
int maxNodeReferences = stats.maxNodeReferences;
int maxExpectedGeometriesTouched = matched * maxNodeReferences;
if (countGeometries > 1 && assertTouches) {
@@ -1521,7 +1543,7 @@ private void getRTreeIndexStats(RTreeIndex index, TreeMonitor monitor, TestStats
}
}
- private void getExplicitIndexBackedIndexStats(ExplicitIndexBackedPointIndex index, TestStats stats,
+ private static void getExplicitIndexBackedIndexStats(ExplicitIndexBackedPointIndex index, TestStats stats,
boolean assertTouches, long countGeometries) {
IndexTestConfig config = stats.config;
ExplicitIndexBackedMonitor monitor = index.getMonitor();
@@ -1535,7 +1557,8 @@ private void getExplicitIndexBackedIndexStats(ExplicitIndexBackedPointIndex inde
// unless the polygon is a rectangle, in which case they are not contained, leading to
// different numbers for expectedGeometries and expectedCount.
// See https://github.com/locationtech/jts/blob/master/modules/core/src/main/java/org/locationtech/jts/operation/predicate/RectangleContains.java#L70
- assertEquals("Expected " + config.expectedCount + " nodes to be matched", config.expectedCount, matched);
+ assertEquals(config.expectedCount, matched,
+ "Expected " + config.expectedCount + " nodes to be matched");
}
private class TimedLogger {
@@ -1577,19 +1600,19 @@ private void log(String line, long number) {
}
}
- private void verifyGeohashIndex(Layer layer) {
+ private static void verifyGeohashIndex(Layer layer) {
LayerIndexReader index = layer.getIndex();
- assertTrue("Index should be a geohash index", index instanceof LayerGeohashPointIndex);
+ assertInstanceOf(LayerGeohashPointIndex.class, index, "Index should be a geohash index");
}
- private void verifyHilbertIndex(Layer layer) {
+ private static void verifyHilbertIndex(Layer layer) {
LayerIndexReader index = layer.getIndex();
- assertTrue("Index should be a hilbert index", index instanceof LayerHilbertPointIndex);
+ assertInstanceOf(LayerHilbertPointIndex.class, index, "Index should be a hilbert index");
}
- private void verifyZOrderIndex(Layer layer) {
+ private static void verifyZOrderIndex(Layer layer) {
LayerIndexReader index = layer.getIndex();
- assertTrue("Index should be a Z-Order index", index instanceof LayerZOrderPointIndex);
+ assertInstanceOf(LayerZOrderPointIndex.class, index, "Index should be a Z-Order index");
}
private void verifyTreeStructure(Layer layer, String splitMode, TestStats stats) {
@@ -1630,7 +1653,7 @@ private void verifyTreeStructure(Layer layer, String splitMode, TestStats stats)
System.out.println("Tree depth to all geometries: " + depthMap);
}
}
- assertEquals("All geometries should be at the same depth", 1, balanced);
+ assertEquals(1, balanced, "All geometries should be at the same depth");
Map leafMap;
try (Transaction tx = db.beginTx()) {
Result resultNumChildren = tx.execute(queryNumChildren, params);
@@ -1783,7 +1806,7 @@ public String toString() {
private static final LinkedHashSet allStats = new LinkedHashSet<>();
- @AfterClass
+ @AfterAll
public static void afterClass() {
System.out.println("\n\nComposite stats for " + allStats.size() + " tests run");
System.out.println(TestStats.headerString());
diff --git a/src/test/java/org/neo4j/gis/spatial/RTreeTestUtils.java b/src/test/java/org/neo4j/gis/spatial/RTreeTestUtils.java
index ac5a111d..261f2049 100644
--- a/src/test/java/org/neo4j/gis/spatial/RTreeTestUtils.java
+++ b/src/test/java/org/neo4j/gis/spatial/RTreeTestUtils.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial;
import java.util.ArrayList;
@@ -45,11 +65,11 @@ public static double compute_overlap(Envelope a, Envelope b) {
public double calculate_overlap(Node child) {
- Envelope parent = rtree.getIndexNodeEnvelope(child);
+ Envelope parent = RTreeIndex.getIndexNodeEnvelope(child);
List children = new ArrayList();
for (Relationship r : child.getRelationships(Direction.OUTGOING, RTreeRelationshipTypes.RTREE_CHILD)) {
- children.add(rtree.getIndexNodeEnvelope(r.getEndNode()));
+ children.add(RTreeIndex.getIndexNodeEnvelope(r.getEndNode()));
}
children.sort(Comparator.comparing(Envelope::getMinX, Double::compare));
double total_overlap = 0.0;
@@ -68,7 +88,7 @@ public double calculate_overlap(Node child) {
}
- public Map get_height_map(Transaction tx, Node root) {
+ public static Map get_height_map(Transaction tx, Node root) {
String id = root.getElementId();
String cypher = "MATCH p = (root) -[:RTREE_CHILD*0..] ->(child) -[:RTREE_REFERENCE]->(leaf)\n" +
@@ -86,7 +106,7 @@ public Map get_height_map(Transaction tx, Node root) {
return map;
}
- public boolean check_balance(Transaction tx, Node root) {
+ public static boolean check_balance(Transaction tx, Node root) {
String id = root.getElementId();
String cypher = "MATCH p = (root) -[:RTREE_CHILD*0..] ->(child) -[:RTREE_REFERENCE]->(leaf)\n" +
diff --git a/src/test/java/org/neo4j/gis/spatial/SpatialIndexPerformanceProxy.java b/src/test/java/org/neo4j/gis/spatial/SpatialIndexPerformanceProxy.java
index d3d38bc5..5e8cc634 100644
--- a/src/test/java/org/neo4j/gis/spatial/SpatialIndexPerformanceProxy.java
+++ b/src/test/java/org/neo4j/gis/spatial/SpatialIndexPerformanceProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java b/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java
index 227d9ef6..8b04b196 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -228,13 +228,13 @@ private void runShapefileExport(String osmFile) throws Exception {
}
@SuppressWarnings("SameParameterValue")
- private Envelope scale(Envelope bbox, double fraction) {
+ private static Envelope scale(Envelope bbox, double fraction) {
double xoff = bbox.getWidth(0) * (1.0 - fraction) / 2.0;
double yoff = bbox.getWidth(1) * (1.0 - fraction) / 2.0;
return new Envelope(bbox.getMinX() + xoff, bbox.getMaxX() - xoff, bbox.getMinY() + yoff, bbox.getMaxY() - yoff);
}
- private String toCoordinateText(Coordinate[] coordinates) {
+ private static String toCoordinateText(Coordinate[] coordinates) {
StringBuilder sb = new StringBuilder();
for (Coordinate c : coordinates) {
if (sb.length() > 0) {
@@ -245,7 +245,7 @@ private String toCoordinateText(Coordinate[] coordinates) {
return sb.toString();
}
- private String toCoordinateText(Envelope bbox) {
+ private static String toCoordinateText(Envelope bbox) {
return "" + bbox.getMinX() + ", " + bbox.getMinY() + ", " + bbox.getMaxX() + ", " + bbox.getMaxY();
}
diff --git a/src/test/java/org/neo4j/gis/spatial/TestIntersectsPathQueries.java b/src/test/java/org/neo4j/gis/spatial/TestIntersectsPathQueries.java
index c986edd6..e50bc3b6 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestIntersectsPathQueries.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestIntersectsPathQueries.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -100,7 +100,7 @@ public void testPointSetGeoptimaIntersection() throws InterruptedException {
}
}
- private void importShapefileDatabase(String shpPath, String dbRoot, String dbName, String layerName) {
+ private static void importShapefileDatabase(String shpPath, String dbRoot, String dbName, String layerName) {
withDatabase(dbRoot, dbName, Neo4jTestCase.LARGE_CONFIG, graphDb -> {
ShapefileImporter importer = new ShapefileImporter(graphDb, new ConsoleListener(), 10000, true);
importer.setFilterEnvelope(makeFilterEnvelope());
@@ -113,14 +113,14 @@ private void importShapefileDatabase(String shpPath, String dbRoot, String dbNam
});
}
- private Envelope makeFilterEnvelope() {
+ private static Envelope makeFilterEnvelope() {
Envelope filterEnvelope = new Envelope();
filterEnvelope.expandToInclude(new Coordinate(-71.00, 42.10));
filterEnvelope.expandToInclude(new Coordinate(-71.70, 42.50));
return filterEnvelope;
}
- private void importOSMDatabase(String osmPath, String dbRoot, String dbName, String layerName)
+ private static void importOSMDatabase(String osmPath, String dbRoot, String dbName, String layerName)
throws InterruptedException {
// TODO: Port to batch inserter in `github.com/neo4j-contrib/osm` project
OSMImporter importer = new OSMImporter(layerName, new ConsoleListener(), makeFilterEnvelope());
@@ -181,14 +181,14 @@ public void stop(Collection results) {
private double overlaps(Collection original) {
if (results == null) {
return 0.0;
- } else if (original.size() < results.size()) {
+ }
+ if (original.size() < results.size()) {
return fractionOf(results, original);
- } else {
- return fractionOf(original, results);
}
+ return fractionOf(original, results);
}
- private double fractionOf(Collection subset, Collection set) {
+ private static double fractionOf(Collection subset, Collection set) {
HashSet all = new HashSet<>(set);
int count = 0;
for (Node node : subset) {
@@ -203,6 +203,7 @@ public double duration() {
return duration / 1000.0;
}
+ @Override
public String toString() {
return name + "\t" + duration;
}
@@ -333,7 +334,7 @@ private void runTestPointSetGeoptimaIntersection(String tracePath, String dbRoot
});
}
- private void printResults(Collection results) {
+ private static void printResults(Collection results) {
System.out.println("\tFound " + results.size() + " results:");
int count = 0;
for (Node node : results) {
@@ -350,7 +351,7 @@ private void printResults(Collection results) {
}
@SuppressWarnings("SameParameterValue")
- private List runSearch(GeoPipeline pipeline, boolean verbose) {
+ private static List runSearch(GeoPipeline pipeline, boolean verbose) {
List results = pipeline.toNodeList();
if (verbose) {
printResults(results);
diff --git a/src/test/java/org/neo4j/gis/spatial/TestOSMImport.java b/src/test/java/org/neo4j/gis/spatial/TestOSMImport.java
index 2deade32..347a35df 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestOSMImport.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestOSMImport.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -114,7 +114,7 @@ public void buildDataModel() {
}
}
- private void debugNode(Node node) {
+ private static void debugNode(Node node) {
Map properties = node.getProperties();
System.out.println(node + " has " + properties.size() + " properties");
for (Map.Entry property : properties.entrySet()) {
diff --git a/src/test/java/org/neo4j/gis/spatial/TestOSMImportBase.java b/src/test/java/org/neo4j/gis/spatial/TestOSMImportBase.java
index 881de89b..4f97943f 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestOSMImportBase.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestOSMImportBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -165,12 +165,12 @@ private static void checkChangesetsAndUsers(Transaction tx, OSMLayer layer) {
int node_count = 0;
int match_count = 0;
Assertions.assertNull(way.getProperty("changeset", null), "Way has changeset property");
- Node wayChangeset = dataset.getChangeset(way);
+ Node wayChangeset = OSMDataset.getChangeset(way);
if (wayChangeset != null) {
long wayCS = (Long) wayChangeset.getProperty("changeset");
- for (Node node : dataset.getWayNodes(way)) {
+ for (Node node : OSMDataset.getWayNodes(way)) {
Assertions.assertNull(node.getProperty("changeset", null), "Node has changeset property");
- Node nodeChangeset = dataset.getChangeset(node);
+ Node nodeChangeset = OSMDataset.getChangeset(node);
if (nodeChangeset == null) {
nodesMissing++;
} else {
@@ -182,7 +182,7 @@ private static void checkChangesetsAndUsers(Transaction tx, OSMLayer layer) {
"Two changeset nodes should not have the same changeset number: way(" + wayCS
+ ")==node(" + nodeCS + ")");
}
- Node user = dataset.getUser(nodeChangeset);
+ Node user = OSMDataset.getUser(nodeChangeset);
if (user != null) {
String userid = user.getElementId();
if (userNodeCount.containsKey(userid)) {
diff --git a/src/test/java/org/neo4j/gis/spatial/TestProcess.java b/src/test/java/org/neo4j/gis/spatial/TestProcess.java
index b391d3b0..8e0e51b6 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestProcess.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestProcess.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/TestReadOnlyTransactions.java b/src/test/java/org/neo4j/gis/spatial/TestReadOnlyTransactions.java
index a72e1ee5..3a6a864a 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestReadOnlyTransactions.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestReadOnlyTransactions.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -71,7 +91,7 @@ private void buildDataModel() {
}
}
- private void readNames(Transaction tx) {
+ private static void readNames(Transaction tx) {
Node n1 = tx.getNodeByElementId(n1Id);
Node n2 = tx.getNodeByElementId(n2Id);
String n1Name = (String) n1.getProperty("name");
diff --git a/src/test/java/org/neo4j/gis/spatial/TestRemove.java b/src/test/java/org/neo4j/gis/spatial/TestRemove.java
index 99b6196c..d0daaa3f 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestRemove.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestRemove.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/TestSimplePointLayer.java b/src/test/java/org/neo4j/gis/spatial/TestSimplePointLayer.java
index 365e2626..c8d7ae17 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestSimplePointLayer.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestSimplePointLayer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -29,7 +29,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
-import junit.framework.AssertionFailedError;
import org.geotools.data.neo4j.StyledImageExporter;
import org.junit.jupiter.api.Test;
import org.locationtech.jts.geom.Coordinate;
@@ -48,6 +47,7 @@
import org.neo4j.graphdb.Transaction;
import org.neo4j.internal.kernel.api.security.SecurityContext;
import org.neo4j.kernel.internal.GraphDatabaseAPI;
+import org.opentest4j.AssertionFailedError;
public class TestSimplePointLayer extends Neo4jTestCase {
@@ -320,7 +320,7 @@ public void testIndexingExistingPointNodesWithMultipleLocations() {
assertIndexCountSameAs(layerNameC, coords.length);
}
- private void checkPointOrder(List results) {
+ private static void checkPointOrder(List results) {
for (int i = 0; i < results.size() - 1; i++) {
GeoPipeFlow first = results.get(i);
GeoPipeFlow second = results.get(i + 1);
diff --git a/src/test/java/org/neo4j/gis/spatial/TestSpatial.java b/src/test/java/org/neo4j/gis/spatial/TestSpatial.java
index 753ef3c3..4de247dd 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestSpatial.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestSpatial.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -372,7 +372,7 @@ private void testSpatialIndex(String layerName) {
}
}
- private void assertEnvelopeEquals(Envelope a, Envelope b) {
+ private static void assertEnvelopeEquals(Envelope a, Envelope b) {
Assertions.assertNotNull(a);
Assertions.assertNotNull(b);
Assertions.assertEquals(a.getDimension(), b.getDimension());
diff --git a/src/test/java/org/neo4j/gis/spatial/TestSpatialQueries.java b/src/test/java/org/neo4j/gis/spatial/TestSpatialQueries.java
index 5a82d511..f04c6b22 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestSpatialQueries.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestSpatialQueries.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java b/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java
index 2ceb6559..964da8de 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -82,7 +82,7 @@ public void testJTSLinearRef() {
* understand the behaviour of the JTS LRS methods better. Currently no
* assertions are made.
*/
- private void debugLRS(Geometry geometry) {
+ private static void debugLRS(Geometry geometry) {
LengthIndexedLine line = new org.locationtech.jts.linearref.LengthIndexedLine(geometry);
double length = line.getEndIndex() - line.getStartIndex();
System.out.println("Have Geometry: " + geometry);
diff --git a/src/test/java/org/neo4j/gis/spatial/TestsForDocs.java b/src/test/java/org/neo4j/gis/spatial/TestsForDocs.java
index 8efdfd89..97b6ef0d 100644
--- a/src/test/java/org/neo4j/gis/spatial/TestsForDocs.java
+++ b/src/test/java/org/neo4j/gis/spatial/TestsForDocs.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -140,7 +140,7 @@ private void checkOSMAPI(Transaction tx, OSMLayer layer) {
assertTrue(way.equals(osm.getWayFromId(tx, mostCommon)), "Start way should be most found way");
}
- private void importMapOSM(GraphDatabaseService db) throws Exception {
+ private static void importMapOSM(GraphDatabaseService db) throws Exception {
// START SNIPPET: importOsm tag::importOsm[]
OSMImporter importer = new OSMImporter("map.osm");
importer.setCharset(StandardCharsets.UTF_8);
@@ -240,7 +240,7 @@ public void testExportShapefileFromQuery() throws Exception {
doGeometryTestsOnResults(bbox, results);
}
- private void doGeometryTestsOnResults(Envelope bbox, List results) {
+ private static void doGeometryTestsOnResults(Envelope bbox, List results) {
System.out.println("Found " + results.size() + " geometries in " + bbox);
Geometry geometry = results.get(0).getGeometry();
System.out.println("First geometry is " + geometry);
diff --git a/src/test/java/org/neo4j/gis/spatial/TryWithResourceTest.java b/src/test/java/org/neo4j/gis/spatial/TryWithResourceTest.java
index 81dc15dd..0e0b2284 100644
--- a/src/test/java/org/neo4j/gis/spatial/TryWithResourceTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/TryWithResourceTest.java
@@ -1,3 +1,23 @@
+/*
+ * Copyright (c) "Neo4j"
+ * Neo4j Sweden AB [http://neo4j.com]
+ *
+ * This file is part of Neo4j Spatial.
+ *
+ * Neo4j is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
package org.neo4j.gis.spatial;
import static org.junit.jupiter.api.Assertions.assertEquals;
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashNativePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashNativePointIndexTest.java
index 218f05b0..7ce8e644 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashNativePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashNativePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerGeohashNativePointIndexTest extends NativePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerGeohashPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashSimplePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashSimplePointIndexTest.java
index b42a49bc..284f9f46 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashSimplePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerGeohashSimplePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerGeohashSimplePointIndexTest extends SimplePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerGeohashPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertNativePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertNativePointIndexTest.java
index edad64b5..b6af5745 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertNativePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertNativePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerHilbertNativePointIndexTest extends NativePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerHilbertPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertSimplePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertSimplePointIndexTest.java
index 63fa502e..8712699f 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertSimplePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerHilbertSimplePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerHilbertSimplePointIndexTest extends SimplePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerHilbertPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerIndexTestBase.java b/src/test/java/org/neo4j/gis/spatial/index/LayerIndexTestBase.java
index 92cca704..3f42774c 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerIndexTestBase.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerIndexTestBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -223,7 +223,7 @@ public void shouldFindOnlyOneOfTwoNodesAddedDirectlyToIndex() {
}
}
- private Polygon makeTestPolygonInSquare(GeometryFactory geometryFactory, int length) {
+ private static Polygon makeTestPolygonInSquare(GeometryFactory geometryFactory, int length) {
if (length < 4) {
throw new IllegalArgumentException("Cannot create letter C in square smaller than 4x4");
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeNativePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeNativePointIndexTest.java
index ef548ddf..8edf35fb 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeNativePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeNativePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerRTreeNativePointIndexTest extends NativePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerRTreeIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeSimplePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeSimplePointIndexTest.java
index ace016a5..07f21055 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeSimplePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerRTreeSimplePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerRTreeSimplePointIndexTest extends SimplePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerRTreeIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderNativePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderNativePointIndexTest.java
index 19f3e5aa..5c0895ca 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderNativePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderNativePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerZOrderNativePointIndexTest extends NativePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerZOrderPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderSimplePointIndexTest.java b/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderSimplePointIndexTest.java
index ec37c907..4b6c81ea 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderSimplePointIndexTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/LayerZOrderSimplePointIndexTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -21,6 +21,7 @@
public class LayerZOrderSimplePointIndexTest extends SimplePointIndexTestBase {
+ @Override
protected Class extends LayerIndexReader> getIndexClass() {
return LayerZOrderPointIndex.class;
}
diff --git a/src/test/java/org/neo4j/gis/spatial/index/NativePointIndexTestBase.java b/src/test/java/org/neo4j/gis/spatial/index/NativePointIndexTestBase.java
index 218f68bd..71d4d778 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/NativePointIndexTestBase.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/NativePointIndexTestBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/index/SimplePointIndexTestBase.java b/src/test/java/org/neo4j/gis/spatial/index/SimplePointIndexTestBase.java
index 0de7e226..8e7aff4e 100644
--- a/src/test/java/org/neo4j/gis/spatial/index/SimplePointIndexTestBase.java
+++ b/src/test/java/org/neo4j/gis/spatial/index/SimplePointIndexTestBase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesDocTest.java b/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesDocTest.java
index 070be1a1..58d4313d 100644
--- a/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesDocTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesDocTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -630,7 +630,7 @@ public void extract_points() {
assertEquals(1, flow.getProperties().size());
String wkt = (String) flow.getProperties().get("WellKnownText");
- assertTrue(wkt.indexOf("POINT") == 0);
+ assertEquals(0, wkt.indexOf("POINT"));
}
// every rectangle has 5 points, the last point is in the same position of the first
@@ -1064,7 +1064,7 @@ public static void init() {
exporter.setExportDir("target/docs/images/");
}
- private GeoPipeFlow print(GeoPipeFlow pipeFlow) {
+ private static GeoPipeFlow print(GeoPipeFlow pipeFlow) {
System.out.println("GeoPipeFlow:");
for (String key : pipeFlow.getProperties().keySet()) {
System.out.println(key + "=" + pipeFlow.getProperties().get(key));
diff --git a/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesPerformanceTest.java b/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesPerformanceTest.java
index 176e4313..1d98fe2b 100644
--- a/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesPerformanceTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesPerformanceTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -19,7 +19,7 @@
*/
package org.neo4j.gis.spatial.pipes;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import org.junit.jupiter.api.BeforeEach;
@@ -83,17 +83,16 @@ class TimeRecord {
public float average() {
if (count > 0) {
return (float) time / (float) count;
- } else {
- return 0;
}
+ return 0;
}
+ @Override
public String toString() {
if (count > 0) {
return "" + chunk + ": " + average() + "ms per record (" + count + " records over " + time + "ms)";
- } else {
- return "" + chunk + ": INVALID (" + count + " records over " + time + "ms)";
}
+ return "" + chunk + ": INVALID (" + count + " records over " + time + "ms)";
}
}
@@ -136,9 +135,9 @@ public void testQueryPerformance() {
count += rec.count;
System.out.println("\t" + rec);
float average = (float) rec.time / (float) rec.count;
- assertTrue("Expected record average of " + rec.average()
+ assertTrue(rec.average() < 2 * average, "Expected record average of " + rec.average()
+ " to not be substantially larger than running average "
- + average, rec.average() < 2 * average);
+ + average);
}
tx.commit();
}
diff --git a/src/test/java/org/neo4j/gis/spatial/pipes/OrthodromicDistanceTest.java b/src/test/java/org/neo4j/gis/spatial/pipes/OrthodromicDistanceTest.java
index 00165f26..ce58cfc8 100644
--- a/src/test/java/org/neo4j/gis/spatial/pipes/OrthodromicDistanceTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/pipes/OrthodromicDistanceTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
diff --git a/src/test/java/org/neo4j/gis/spatial/procedures/SpatialProceduresTest.java b/src/test/java/org/neo4j/gis/spatial/procedures/SpatialProceduresTest.java
index e864dfb1..dab6800a 100644
--- a/src/test/java/org/neo4j/gis/spatial/procedures/SpatialProceduresTest.java
+++ b/src/test/java/org/neo4j/gis/spatial/procedures/SpatialProceduresTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2020 "Neo4j,"
+ * Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j Spatial.
@@ -26,10 +26,11 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
import static org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME;
import static org.neo4j.gis.spatial.Constants.LABEL_LAYER;
import static org.neo4j.gis.spatial.Constants.PROP_GEOMENCODER;
@@ -46,11 +47,10 @@
import java.util.Map;
import java.util.function.Consumer;
import org.hamcrest.MatcherAssert;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
import org.neo4j.configuration.GraphDatabaseInternalSettings;
import org.neo4j.configuration.GraphDatabaseSettings;
import org.neo4j.dbms.api.DatabaseManagementService;
@@ -80,7 +80,7 @@ public class SpatialProceduresTest {
private DatabaseManagementService databases;
private GraphDatabaseService db;
- @Before
+ @BeforeEach
public void setUp() throws KernelException, IOException {
Path dbRoot = new File("target/procedures").toPath();
FileUtils.deleteDirectory(dbRoot);
@@ -92,7 +92,7 @@ public void setUp() throws KernelException, IOException {
registerProceduresAndFunctions(db, SpatialProcedures.class);
}
- @After
+ @AfterEach
public void tearDown() {
databases.shutdown();
}
@@ -101,14 +101,6 @@ public static void testCall(GraphDatabaseService db, String call, Consumer