From 10bacf510c72dbeaf2adc533b58d4733cc530bfa Mon Sep 17 00:00:00 2001 From: nkuehnel Date: Thu, 16 May 2024 16:07:56 +0200 Subject: [PATCH] update geotools import statements --- .../emissions/TestWarmEmissionAnalysisModule.java | 1 - .../ev/discharging/LTHDriveEnergyConsumption.java | 1 - .../contrib/minibus/schedule/CreatePStops.java | 2 +- ...psOnJunctionApproachesAndBetweenJunctions.java | 2 +- .../java/org/matsim/contrib/noise/DEMContext.java | 5 +++-- .../org/matsim/contrib/noise/DEMContextImpl.java | 7 ++++--- .../contrib/noise/FeatureNoiseBarriersReader.java | 10 +++++----- .../matsim/contrib/noise/RLS19NoiseEmission.java | 12 ++++++------ .../drawer/SimpleBackgroundFeatureDrawer.java | 4 ++-- .../analysis/RegionModeshareAnalyzer.java | 2 +- .../parking/parkingproxy/run/RunAreaAnalysis.java | 2 +- .../analysis/skims/CalculateSkimMatrices.java | 2 +- .../sbb/matsim/analysis/skims/MatricesToXY.java | 2 +- .../utils/WriteStationShapefile.java | 4 ++-- .../playground/vsp/analysis/DefaultAnalysis.java | 2 +- .../modules/act2mode/ActivityToModeAnalysis.java | 2 +- .../modules/networkAnalysis/NetworkAnalyzer.java | 2 +- .../ptAccessibility/utils/PtAccesShapeWriter.java | 4 ++-- .../utils/PtAccessMapShapeWriter.java | 4 ++-- .../ptPaxVolumes/PtPaxVolumesAnalyzer.java | 2 +- .../transitSchedule2Shp/TransitSchedule2Shp.java | 4 ++-- .../TransitVehicleVolumeAnalyzer.java | 4 ++-- .../vsp/analysis/utils/heatMap/HeatMap.java | 4 ++-- .../vsp/andreas/utils/ana/RouteAllModesAsCar.java | 4 ++-- .../LinksstatsPolygonBasedFeatureGenerator.java | 4 ++-- .../LinkstatsStringBasedFeatureGenerator.java | 4 ++-- .../ana/compareLinkStats/NetworkAndMore2ESRI.java | 2 +- ...untVehOnLinksPolygonBasedFeatureGenerator.java | 4 ++-- ...ountVehOnLinksStringBasedFeatureGenerator.java | 4 ++-- .../utils/ana/countVehOnLinks/PackageMain.java | 2 +- .../filterActsPerShape/WorkHomeShapeCounter.java | 4 ++-- .../utils/pop/FilterPopulationByShape.java | 2 +- .../pt/transitSchedule2shape/DaShapeWriter.java | 2 +- .../CORINELandCoverCoordsModifier.java | 2 +- .../vsp/corineLandcover/CorineLandCoverData.java | 2 +- .../CommuterDemandWriter.java | 6 +++--- .../commuterDemandCottbus/CommuterGenerator.java | 6 +++--- .../commuterDemandCottbus/DgLanduseReader.java | 6 +++--- .../DgPopulation2ShapeWriter.java | 8 ++++---- .../vsp/demandde/counts/TSBASt2Count.java | 2 +- .../vsp/demandde/pendlermatrix/GVPlanReader.java | 2 +- .../pendlermatrix/PendlerMatrixReader.java | 4 ++-- .../vsp/demandde/pendlermatrix/Verschmierer.java | 2 +- .../demandde/prognose2025/DemandMatrixReader.java | 4 ++-- .../cemdap/input/SynPopCreator.java | 2 +- .../cemdap/input/SynPopCreatorChildren.java | 2 +- .../cemdap/input/ZoneAndLOSGeneratorV2.java | 3 +-- .../cemdap/output/Cemdap2MatsimUtils.java | 2 +- .../output/CemdapOutput2MatsimPlansConverter.java | 2 +- .../TransitRouteTrimmerUtils.java | 10 +++++----- .../pt/stop2stop/PtStop2StopAnalysis2Shp.java | 2 +- .../NetworkTeleatlasAddManeuverRestrictions.java | 4 ++-- .../core/network/io/NetworkReaderTeleatlas.java | 6 +++--- .../matsim/core/utils/geometry/GeometryUtils.java | 2 +- .../matsim/core/utils/geometry/geotools/MGC.java | 4 ++-- .../transformations/GeotoolsTransformation.java | 8 ++++---- .../org/matsim/core/utils/gis/GeoFileReader.java | 15 +++++---------- .../org/matsim/core/utils/gis/GeoFileWriter.java | 14 +++++++------- .../core/utils/gis/PointFeatureFactory.java | 6 +++--- .../core/utils/gis/PolygonFeatureFactory.java | 6 +++--- .../core/utils/gis/PolylineFeatureFactory.java | 6 +++--- .../matsim/core/utils/gis/ShapeFileReader.java | 13 ++++++------- .../matsim/core/utils/gis/ShapeFileWriter.java | 3 ++- .../gis/matsim2esri/network/FeatureGenerator.java | 2 +- .../network/FeatureGeneratorBuilderImpl.java | 2 +- .../network/LineStringBasedFeatureGenerator.java | 4 ++-- .../gis/matsim2esri/network/Links2ESRIShape.java | 4 ++-- .../gis/matsim2esri/network/Nodes2ESRIShape.java | 4 ++-- .../network/PolygonFeatureGenerator.java | 4 ++-- .../plans/SelectedPlans2ESRIShape.java | 4 ++-- .../matsim/core/utils/gis/GeoFileReaderTest.java | 2 +- .../matsim/core/utils/gis/GeoFileWriterTest.java | 6 +++--- .../network/Network2ESRIShapeTest.java | 4 ++-- .../plans/SelectedPlans2ESRIShapeTest.java | 4 ++-- 74 files changed, 152 insertions(+), 158 deletions(-) diff --git a/contribs/emissions/src/test/java/org/matsim/contrib/emissions/TestWarmEmissionAnalysisModule.java b/contribs/emissions/src/test/java/org/matsim/contrib/emissions/TestWarmEmissionAnalysisModule.java index cd88c087a65..30b456f1455 100644 --- a/contribs/emissions/src/test/java/org/matsim/contrib/emissions/TestWarmEmissionAnalysisModule.java +++ b/contribs/emissions/src/test/java/org/matsim/contrib/emissions/TestWarmEmissionAnalysisModule.java @@ -20,7 +20,6 @@ package org.matsim.contrib.emissions; -import org.geotools.metadata.iso.quality.TemporalAccuracyImpl; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.ParameterizedTest; diff --git a/contribs/ev/src/main/java/org/matsim/contrib/ev/discharging/LTHDriveEnergyConsumption.java b/contribs/ev/src/main/java/org/matsim/contrib/ev/discharging/LTHDriveEnergyConsumption.java index ea20f84a484..f055b3f49e2 100644 --- a/contribs/ev/src/main/java/org/matsim/contrib/ev/discharging/LTHDriveEnergyConsumption.java +++ b/contribs/ev/src/main/java/org/matsim/contrib/ev/discharging/LTHDriveEnergyConsumption.java @@ -24,7 +24,6 @@ import org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolatingFunction; import org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolator; import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.matsim.api.core.v01.network.Link; import org.matsim.contrib.ev.EvUnits; import org.matsim.contrib.ev.fleet.ElectricVehicle; diff --git a/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStops.java b/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStops.java index 52c5a6fe36d..a26e8d6e1be 100644 --- a/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStops.java +++ b/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStops.java @@ -31,6 +31,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -49,7 +50,6 @@ import org.matsim.pt.transitSchedule.TransitScheduleFactoryImpl; import org.matsim.pt.transitSchedule.api.TransitSchedule; import org.matsim.pt.transitSchedule.api.TransitStopFacility; -import org.opengis.feature.simple.SimpleFeature; /** * Create one TransitStopFacility for each car mode link of the network diff --git a/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStopsOnJunctionApproachesAndBetweenJunctions.java b/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStopsOnJunctionApproachesAndBetweenJunctions.java index f2303896615..73d31f3c30f 100644 --- a/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStopsOnJunctionApproachesAndBetweenJunctions.java +++ b/contribs/minibus/src/main/java/org/matsim/contrib/minibus/schedule/CreatePStopsOnJunctionApproachesAndBetweenJunctions.java @@ -32,6 +32,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -60,7 +61,6 @@ import org.matsim.pt.transitSchedule.TransitScheduleFactoryImpl; import org.matsim.pt.transitSchedule.api.TransitSchedule; import org.matsim.pt.transitSchedule.api.TransitStopFacility; -import org.opengis.feature.simple.SimpleFeature; /** * Create one TransitStopFacility for each car mode link of the network diff --git a/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContext.java b/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContext.java index e55dd2dd43a..c82ee7010a1 100644 --- a/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContext.java +++ b/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContext.java @@ -1,12 +1,13 @@ package org.matsim.contrib.noise; -import org.opengis.geometry.DirectPosition; + +import org.geotools.api.geometry.Position; public interface DEMContext { /** * Returns the elevation at the given position. */ - float getElevation(DirectPosition position); + float getElevation(Position position); } diff --git a/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContextImpl.java b/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContextImpl.java index 1737c23dc58..9df8c41de65 100644 --- a/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContextImpl.java +++ b/contribs/noise/src/main/java/org/matsim/contrib/noise/DEMContextImpl.java @@ -1,11 +1,12 @@ package org.matsim.contrib.noise; +import org.geotools.api.geometry.Position; import org.geotools.coverage.grid.GridCoverage2D; import org.geotools.gce.geotiff.GeoTiffReader; import org.geotools.util.factory.Hints; +import org.locationtech.jts.geom.Point; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; -import org.opengis.geometry.DirectPosition; import jakarta.inject.Inject; import java.io.File; @@ -33,8 +34,8 @@ public class DEMContextImpl implements DEMContext { } @Override - public float getElevation(DirectPosition position) { - float[] sample = (float[])coverage.evaluate(position); + public float getElevation(Position point) { + float[] sample = (float[])coverage.evaluate(point); return sample[0]; } } diff --git a/contribs/noise/src/main/java/org/matsim/contrib/noise/FeatureNoiseBarriersReader.java b/contribs/noise/src/main/java/org/matsim/contrib/noise/FeatureNoiseBarriersReader.java index 419af93a267..30f56b6f90b 100644 --- a/contribs/noise/src/main/java/org/matsim/contrib/noise/FeatureNoiseBarriersReader.java +++ b/contribs/noise/src/main/java/org/matsim/contrib/noise/FeatureNoiseBarriersReader.java @@ -7,6 +7,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.TransformException; import org.geotools.feature.FeatureCollection; import org.geotools.feature.FeatureIterator; import org.geotools.geojson.GeoJSONUtil; @@ -16,11 +21,6 @@ import org.locationtech.jts.geom.*; import org.matsim.api.core.v01.Id; import org.matsim.core.utils.misc.Counter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.TransformException; /** * @author nkuehnel diff --git a/contribs/noise/src/main/java/org/matsim/contrib/noise/RLS19NoiseEmission.java b/contribs/noise/src/main/java/org/matsim/contrib/noise/RLS19NoiseEmission.java index 296f05273b2..c6074e50226 100644 --- a/contribs/noise/src/main/java/org/matsim/contrib/noise/RLS19NoiseEmission.java +++ b/contribs/noise/src/main/java/org/matsim/contrib/noise/RLS19NoiseEmission.java @@ -2,7 +2,10 @@ import com.google.common.collect.Range; import com.google.inject.Inject; -import org.geotools.geometry.DirectPosition2D; +import org.geotools.api.geometry.Position; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.geometry.Position2D; import org.geotools.referencing.CRS; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Scenario; @@ -10,9 +13,6 @@ import org.matsim.api.core.v01.network.Network; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; -import org.opengis.geometry.DirectPosition; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import static org.matsim.contrib.noise.RLS19VehicleType.*; @@ -164,8 +164,8 @@ public double calculateSingleVehicleLevel(NoiseVehicleType type, NoiseLink noise Coord to = matsimLink.getToNode().getCoord(); //MATSim coord's x/y are inversed to geotools/jts - DirectPosition positionFrom = new DirectPosition2D(crs, from.getY(), from.getX()); - DirectPosition positionTo = new DirectPosition2D(crs, to.getY(), to.getX()); + Position positionFrom = new Position2D(crs, from.getY(), from.getX()); + Position positionTo = new Position2D(crs, to.getY(), to.getX()); float elevationFrom = demContext.getElevation(positionFrom); float elevationTo = demContext.getElevation(positionTo); diff --git a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/opengl/drawer/SimpleBackgroundFeatureDrawer.java b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/opengl/drawer/SimpleBackgroundFeatureDrawer.java index 0fc455c6c04..2423b74db12 100644 --- a/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/opengl/drawer/SimpleBackgroundFeatureDrawer.java +++ b/contribs/otfvis/src/main/java/org/matsim/vis/otfvis/opengl/drawer/SimpleBackgroundFeatureDrawer.java @@ -24,8 +24,9 @@ import java.util.ArrayList; import java.util.List; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -34,7 +35,6 @@ import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Point; import org.locationtech.jts.geom.Polygon; -import org.opengis.feature.simple.SimpleFeature; import com.jogamp.opengl.GL; import com.jogamp.opengl.GL2; diff --git a/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/analysis/RegionModeshareAnalyzer.java b/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/analysis/RegionModeshareAnalyzer.java index e63ad0929ff..aaa3da60ad5 100644 --- a/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/analysis/RegionModeshareAnalyzer.java +++ b/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/analysis/RegionModeshareAnalyzer.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.matsim.api.core.v01.population.Activity; import org.matsim.api.core.v01.population.Leg; @@ -35,7 +36,6 @@ import org.matsim.api.core.v01.population.PlanElement; import org.matsim.core.population.algorithms.AbstractPersonAlgorithm; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.feature.simple.SimpleFeature; import gnu.trove.map.TObjectIntMap; import gnu.trove.map.hash.TObjectIntHashMap; diff --git a/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/run/RunAreaAnalysis.java b/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/run/RunAreaAnalysis.java index 7643b4ea3b4..ed759e9b356 100644 --- a/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/run/RunAreaAnalysis.java +++ b/contribs/parking/src/main/java/org/matsim/contrib/parking/parkingproxy/run/RunAreaAnalysis.java @@ -23,13 +23,13 @@ import java.nio.file.Paths; import java.util.Collection; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.contrib.parking.parkingproxy.analysis.RegionModeshareAnalyzer; import org.matsim.core.config.Config; import org.matsim.core.config.ConfigUtils; import org.matsim.core.population.io.StreamingPopulationReader; import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; public class RunAreaAnalysis { diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java index 2684832db0a..f65f15224ac 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java @@ -41,6 +41,7 @@ import java.util.function.ToDoubleFunction; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.geom.Geometry; @@ -80,7 +81,6 @@ import org.matsim.pt.transitSchedule.api.TransitLine; import org.matsim.pt.transitSchedule.api.TransitRoute; import org.matsim.pt.transitSchedule.api.TransitScheduleReader; -import org.opengis.feature.simple.SimpleFeature; /** * Main class to calculate skim matrices. Provides a main-method to be directly started from the command line, but the main-method also acts as a template for custom code using the skims calculation. diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java index 405cdb0be00..e617db66b0b 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java @@ -27,11 +27,11 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; /** * Creates a huge csv file with the data of all the matrices combined. Zones are identified by their identifier as well as one random coordinate per zone. Given the from-/to-coordinates for each diff --git a/contribs/shared_mobility/src/main/java/org/matsim/contrib/shared_mobility/utils/WriteStationShapefile.java b/contribs/shared_mobility/src/main/java/org/matsim/contrib/shared_mobility/utils/WriteStationShapefile.java index 5edcf65eb29..3f78b4251d4 100644 --- a/contribs/shared_mobility/src/main/java/org/matsim/contrib/shared_mobility/utils/WriteStationShapefile.java +++ b/contribs/shared_mobility/src/main/java/org/matsim/contrib/shared_mobility/utils/WriteStationShapefile.java @@ -3,6 +3,8 @@ import java.util.ArrayList; import java.util.Collection; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.Coordinate; import org.matsim.api.core.v01.network.Link; import org.matsim.api.core.v01.network.Network; @@ -17,8 +19,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.PointFeatureFactory; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class WriteStationShapefile { static public void main(String[] args) throws ConfigurationException { diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/DefaultAnalysis.java b/contribs/vsp/src/main/java/playground/vsp/analysis/DefaultAnalysis.java index 1f4c3b97a44..dd7a01db2db 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/DefaultAnalysis.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/DefaultAnalysis.java @@ -26,13 +26,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.api.core.v01.Scenario; import org.matsim.core.api.experimental.events.EventsManager; import org.matsim.core.events.EventsReaderXMLv1; import org.matsim.core.events.EventsUtils; import org.matsim.core.events.handler.EventHandler; import org.matsim.core.gbl.Gbl; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; import playground.vsp.analysis.modules.legModeDistanceDistribution.LegModeDistanceDistribution; diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/act2mode/ActivityToModeAnalysis.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/act2mode/ActivityToModeAnalysis.java index 12055885daa..43c250265e7 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/act2mode/ActivityToModeAnalysis.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/act2mode/ActivityToModeAnalysis.java @@ -27,6 +27,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.matsim.api.core.v01.Id; @@ -36,7 +37,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.PointFeatureFactory; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/networkAnalysis/NetworkAnalyzer.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/networkAnalysis/NetworkAnalyzer.java index 4e41f3ae95f..ebb01d0b4a2 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/networkAnalysis/NetworkAnalyzer.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/networkAnalysis/NetworkAnalyzer.java @@ -16,6 +16,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -44,7 +45,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; import playground.vsp.analysis.modules.networkAnalysis.utils.AccessibilityCalc; diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccesShapeWriter.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccesShapeWriter.java index f21e092ba84..170eab02e6d 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccesShapeWriter.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccesShapeWriter.java @@ -28,6 +28,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.MultiPolygon; import org.matsim.api.core.v01.Coord; @@ -35,7 +36,6 @@ import org.matsim.core.utils.gis.PointFeatureFactory; import org.matsim.core.utils.gis.PolygonFeatureFactory; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.ptAccessibility.activity.ActivityLocation; import playground.vsp.analysis.modules.ptAccessibility.activity.LocationMap; @@ -59,7 +59,7 @@ public static void writeMultiPolygons(Map mps, String file setName(name). addAttribute("name", String.class). create(); - Collection features = new ArrayList(); + Collection features = new ArrayList<>(); Object[] featureAttribs; for(Entry e: mps.entrySet()){ diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccessMapShapeWriter.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccessMapShapeWriter.java index 615512e0fe6..49f9b6d7449 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccessMapShapeWriter.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptAccessibility/utils/PtAccessMapShapeWriter.java @@ -26,13 +26,13 @@ import java.util.Map.Entry; import java.util.ServiceConfigurationError; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.MultiPolygon; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.ptAccessibility.stops.PtStopMap; @@ -135,7 +135,7 @@ private static void writeGeometries(String outputFolderAndFileName, HashMap> distance2mode2bufferEntry : distance2mode2buffer.entrySet()) { - bufferFeatures = new ArrayList(); + bufferFeatures = new ArrayList<>(); HashMap mode2buffer = distance2mode2bufferEntry.getValue(); for (Entry mode2BufferEntry : mode2buffer.entrySet()) { bufferFeatureAttribs = new Object[2]; diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptPaxVolumes/PtPaxVolumesAnalyzer.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptPaxVolumes/PtPaxVolumesAnalyzer.java index b921fa27a53..c15ca89613d 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptPaxVolumes/PtPaxVolumesAnalyzer.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/ptPaxVolumes/PtPaxVolumesAnalyzer.java @@ -27,6 +27,7 @@ import java.util.Map.Entry; import java.util.ServiceConfigurationError; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -39,7 +40,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.pt.transitSchedule.api.TransitLine; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitSchedule2Shp/TransitSchedule2Shp.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitSchedule2Shp/TransitSchedule2Shp.java index 8423b07bc67..f0b2a77841d 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitSchedule2Shp/TransitSchedule2Shp.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitSchedule2Shp/TransitSchedule2Shp.java @@ -25,6 +25,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -43,7 +44,6 @@ import org.matsim.pt.transitSchedule.api.TransitLine; import org.matsim.pt.transitSchedule.api.TransitRoute; import org.matsim.pt.transitSchedule.api.TransitSchedule; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; @@ -82,7 +82,7 @@ public void postProcessData() { @Override public void writeResults(String outputFolder) { - Collection features = new ArrayList(); + Collection features = new ArrayList<>(); // write a shape per line for(TransitLine transitLine: this.schedule.getTransitLines().values()){ if(transitLine.getRoutes().isEmpty()){ diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitVehicleVolume/TransitVehicleVolumeAnalyzer.java b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitVehicleVolume/TransitVehicleVolumeAnalyzer.java index 22093aa08e6..d279b86c492 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitVehicleVolume/TransitVehicleVolumeAnalyzer.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/modules/transitVehicleVolume/TransitVehicleVolumeAnalyzer.java @@ -29,6 +29,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -44,7 +45,6 @@ import org.matsim.counts.Count; import org.matsim.counts.Counts; import org.matsim.counts.Volume; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.analysis.modules.AbstractAnalysisModule; @@ -127,7 +127,7 @@ private void writeModeShape(String name, Counts counts, Map mo } SimpleFeatureBuilder builder = new SimpleFeatureBuilder(b.buildFeatureType()); - Collection features = new ArrayList(); + Collection features = new ArrayList<>(); Object[] featureAttribs; for(Count c: counts.getCounts().values()){ diff --git a/contribs/vsp/src/main/java/playground/vsp/analysis/utils/heatMap/HeatMap.java b/contribs/vsp/src/main/java/playground/vsp/analysis/utils/heatMap/HeatMap.java index f8441de40be..c35342f7403 100644 --- a/contribs/vsp/src/main/java/playground/vsp/analysis/utils/heatMap/HeatMap.java +++ b/contribs/vsp/src/main/java/playground/vsp/analysis/utils/heatMap/HeatMap.java @@ -25,6 +25,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -36,7 +37,6 @@ import org.matsim.core.utils.collections.Tuple; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; /** * @author droeder @@ -185,7 +185,7 @@ public static void writeHeatMapShape(String name, HeatMap heatmap, String file, b.add("count", Double.class); SimpleFeatureBuilder builder = new SimpleFeatureBuilder(b.buildFeatureType()); - Collection features = new ArrayList(); + Collection features = new ArrayList<>(); Object[] featureAttribs; int i = 0; diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/RouteAllModesAsCar.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/RouteAllModesAsCar.java index 28ddbf7ab00..11baea3d7d3 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/RouteAllModesAsCar.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/RouteAllModesAsCar.java @@ -28,6 +28,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -56,7 +57,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.pt.PtConstants; -import org.opengis.feature.simple.SimpleFeature; /** * Routes all modes of transport (except for transit_walk) as car modes and counts the number of trips per link. @@ -118,7 +118,7 @@ private void writeAsShape(String outputDir, String targetCoordinateSystem) { SimpleFeatureBuilder builder = new SimpleFeatureBuilder(typeBuilder.buildFeatureType()); - Collection features = new ArrayList(); + Collection features = new ArrayList<>(); Object[] featureAttribs; diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinksstatsPolygonBasedFeatureGenerator.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinksstatsPolygonBasedFeatureGenerator.java index 8cc5021b57c..82bda0a2832 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinksstatsPolygonBasedFeatureGenerator.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinksstatsPolygonBasedFeatureGenerator.java @@ -23,14 +23,14 @@ import java.util.HashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.Coordinate; import org.matsim.api.core.v01.network.Link; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.PolygonFeatureFactory; import org.matsim.utils.gis.matsim2esri.network.FeatureGenerator; import org.matsim.utils.gis.matsim2esri.network.WidthCalculator; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class LinksstatsPolygonBasedFeatureGenerator implements FeatureGenerator{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinkstatsStringBasedFeatureGenerator.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinkstatsStringBasedFeatureGenerator.java index f88e52dd9e2..7853077dfa1 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinkstatsStringBasedFeatureGenerator.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/LinkstatsStringBasedFeatureGenerator.java @@ -24,6 +24,8 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.Coordinate; import org.matsim.api.core.v01.network.Link; import org.matsim.core.network.NetworkUtils; @@ -31,8 +33,6 @@ import org.matsim.core.utils.gis.PolylineFeatureFactory; import org.matsim.utils.gis.matsim2esri.network.FeatureGenerator; import org.matsim.utils.gis.matsim2esri.network.WidthCalculator; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class LinkstatsStringBasedFeatureGenerator implements FeatureGenerator{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/NetworkAndMore2ESRI.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/NetworkAndMore2ESRI.java index 06049bc5b48..abb8c3c3c11 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/NetworkAndMore2ESRI.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/compareLinkStats/NetworkAndMore2ESRI.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.core.network.io.MatsimNetworkReader; import org.matsim.core.scenario.MutableScenario; import org.matsim.core.scenario.ScenarioUtils; @@ -31,7 +32,6 @@ import org.matsim.utils.gis.matsim2esri.network.FeatureGeneratorBuilderImpl; import org.matsim.utils.gis.matsim2esri.network.LanesBasedWidthCalculator; import org.matsim.utils.gis.matsim2esri.network.Links2ESRIShape; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class NetworkAndMore2ESRI extends Links2ESRIShape{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksPolygonBasedFeatureGenerator.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksPolygonBasedFeatureGenerator.java index 102634cd53d..5f22adde1f8 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksPolygonBasedFeatureGenerator.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksPolygonBasedFeatureGenerator.java @@ -22,14 +22,14 @@ import java.util.HashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.Coordinate; import org.matsim.api.core.v01.network.Link; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.PolygonFeatureFactory; import org.matsim.utils.gis.matsim2esri.network.FeatureGenerator; import org.matsim.utils.gis.matsim2esri.network.WidthCalculator; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class CountVehOnLinksPolygonBasedFeatureGenerator implements FeatureGenerator{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksStringBasedFeatureGenerator.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksStringBasedFeatureGenerator.java index 3bd65d714a4..c94c9e5db74 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksStringBasedFeatureGenerator.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/CountVehOnLinksStringBasedFeatureGenerator.java @@ -23,6 +23,8 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.Coordinate; import org.matsim.api.core.v01.network.Link; import org.matsim.core.network.NetworkUtils; @@ -30,8 +32,6 @@ import org.matsim.core.utils.gis.PolylineFeatureFactory; import org.matsim.utils.gis.matsim2esri.network.FeatureGenerator; import org.matsim.utils.gis.matsim2esri.network.WidthCalculator; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class CountVehOnLinksStringBasedFeatureGenerator implements FeatureGenerator{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/PackageMain.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/PackageMain.java index ecda8472e30..d49960a9084 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/PackageMain.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/countVehOnLinks/PackageMain.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.api.core.v01.network.Network; import org.matsim.core.config.ConfigUtils; import org.matsim.core.network.io.MatsimNetworkReader; @@ -31,7 +32,6 @@ import org.matsim.utils.gis.matsim2esri.network.FeatureGeneratorBuilderImpl; import org.matsim.utils.gis.matsim2esri.network.LanesBasedWidthCalculator; import org.matsim.utils.gis.matsim2esri.network.Links2ESRIShape; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class PackageMain extends Links2ESRIShape{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/filterActsPerShape/WorkHomeShapeCounter.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/filterActsPerShape/WorkHomeShapeCounter.java index c7489566966..fde71b63868 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/filterActsPerShape/WorkHomeShapeCounter.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/ana/filterActsPerShape/WorkHomeShapeCounter.java @@ -27,8 +27,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygon; import org.matsim.api.core.v01.Coord; @@ -40,7 +41,6 @@ import org.matsim.core.population.algorithms.AbstractPersonAlgorithm; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; public class WorkHomeShapeCounter extends AbstractPersonAlgorithm{ diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pop/FilterPopulationByShape.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pop/FilterPopulationByShape.java index 63fede8cee6..d346fae1a03 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pop/FilterPopulationByShape.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pop/FilterPopulationByShape.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.MultiPolygon; @@ -53,7 +54,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; /** * Filters a given Population by a given shape - includes all routed modes diff --git a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pt/transitSchedule2shape/DaShapeWriter.java b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pt/transitSchedule2shape/DaShapeWriter.java index 600ff620232..7408cde20fb 100644 --- a/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pt/transitSchedule2shape/DaShapeWriter.java +++ b/contribs/vsp/src/main/java/playground/vsp/andreas/utils/pt/transitSchedule2shape/DaShapeWriter.java @@ -30,6 +30,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -49,7 +50,6 @@ import org.matsim.pt.transitSchedule.api.TransitRouteStop; import org.matsim.pt.transitSchedule.api.TransitSchedule; import org.matsim.pt.transitSchedule.api.TransitStopFacility; -import org.opengis.feature.simple.SimpleFeature; /** * diff --git a/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CORINELandCoverCoordsModifier.java b/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CORINELandCoverCoordsModifier.java index d16d17d4ada..99fe02269c7 100644 --- a/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CORINELandCoverCoordsModifier.java +++ b/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CORINELandCoverCoordsModifier.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; @@ -40,7 +41,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.openberlinscenario.cemdap.output.Cemdap2MatsimUtils; import playground.vsp.openberlinscenario.cemdap.output.CemdapOutput2MatsimPlansConverter; diff --git a/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CorineLandCoverData.java b/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CorineLandCoverData.java index d8b0584a210..267ef739180 100644 --- a/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CorineLandCoverData.java +++ b/contribs/vsp/src/main/java/playground/vsp/corineLandcover/CorineLandCoverData.java @@ -27,12 +27,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; import org.matsim.core.gbl.Gbl; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; /** * Created by amit on 31.07.17. diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterDemandWriter.java b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterDemandWriter.java index 10f4c106725..0c931ed13c1 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterDemandWriter.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterDemandWriter.java @@ -29,6 +29,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Coordinate; @@ -52,9 +55,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.misc.Time; import org.matsim.core.utils.timing.TimeInterpretation; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; /** * @author jbischoff diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterGenerator.java b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterGenerator.java index 41c2466c84d..17f4de617b0 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterGenerator.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/CommuterGenerator.java @@ -24,6 +24,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.population.PopulationWriter; import org.matsim.core.config.Config; @@ -34,8 +36,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.geometry.transformations.TransformationFactory; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * @author jbischoff @@ -85,7 +85,7 @@ public static void main(String[] args) throws Exception { //landuse if (useLanduse){ DgLanduseReader landuseReader = new DgLanduseReader(); - Tuple,CoordinateReferenceSystem> homeLanduse = landuseReader.readLanduseDataHome(); + Tuple, CoordinateReferenceSystem> homeLanduse = landuseReader.readLanduseDataHome(); Tuple,CoordinateReferenceSystem> workLanduse = landuseReader.readLanduseDataWork(); cdw.addLanduse("home", homeLanduse); cdw.addLanduse("work", workLanduse); diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgLanduseReader.java b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgLanduseReader.java index 6a7b47969d3..8ee88afb6d4 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgLanduseReader.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgLanduseReader.java @@ -22,10 +22,10 @@ import java.util.Collection; import java.util.HashSet; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.core.utils.collections.Tuple; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** @@ -60,7 +60,7 @@ public class DgLanduseReader { // private static final String[] landuse_files_work = {INDUSTRIE_GEWERBEGEBIETE}; - public Tuple,CoordinateReferenceSystem> readLanduseDataHome(){ + public Tuple, CoordinateReferenceSystem> readLanduseDataHome(){ return this.readLanduseData(landuse_files_home); } diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgPopulation2ShapeWriter.java b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgPopulation2ShapeWriter.java index 943f51c177f..4a3c67112c3 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgPopulation2ShapeWriter.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/commuterDemandCottbus/DgPopulation2ShapeWriter.java @@ -22,6 +22,9 @@ import java.util.ArrayList; import java.util.List; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Coordinate; @@ -33,9 +36,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.PointFeatureFactory; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; /** @@ -67,7 +67,7 @@ public void write(String activityType, String filename, CoordinateReferenceSyste addAttribute("end_time", Double.class). create(); - List features = new ArrayList(); + List features = new ArrayList<>(); SimpleFeature f = null; for (Person p : this.pop.getPersons().values()){ Plan plan = p.getSelectedPlan(); diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/counts/TSBASt2Count.java b/contribs/vsp/src/main/java/playground/vsp/demandde/counts/TSBASt2Count.java index 6796e013723..8c652ff8248 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/counts/TSBASt2Count.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/counts/TSBASt2Count.java @@ -11,12 +11,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.referencing.FactoryException; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.network.Link; import org.matsim.counts.Count; import org.matsim.counts.Counts; import org.matsim.counts.CountsWriter; -import org.opengis.referencing.FactoryException; import playground.vsp.demandde.counts.BastHourlyCountData.Day; diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/GVPlanReader.java b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/GVPlanReader.java index 113c347994a..82d2c4e4026 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/GVPlanReader.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/GVPlanReader.java @@ -21,6 +21,7 @@ import java.util.Collection; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -33,7 +34,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.transformations.TransformationFactory; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.pipeline.PopulationReaderTask; import playground.vsp.pipeline.PopulationWriterTask; diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/PendlerMatrixReader.java b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/PendlerMatrixReader.java index 1d53d1a7aa4..c084f138bc1 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/PendlerMatrixReader.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/PendlerMatrixReader.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; @@ -45,7 +46,6 @@ import org.matsim.facilities.ActivityFacility; import org.matsim.facilities.ActivityOption; import org.matsim.facilities.Facility; -import org.opengis.feature.simple.SimpleFeature; public class PendlerMatrixReader { @@ -81,7 +81,7 @@ public void run() { private void readShape() { Collection landkreise = GeoFileReader.getAllFeatures(this.shapeFile); - ActivityFacilitiesFactory factory = ((MutableScenario)this.sc).getActivityFacilities().getFactory(); + ActivityFacilitiesFactory factory = this.sc.getActivityFacilities().getFactory(); for (SimpleFeature landkreis : landkreise) { Integer gemeindeschluessel = Integer.parseInt((String) landkreis.getAttribute("gemeindesc")); Geometry geo = (Geometry) landkreis.getDefaultGeometry(); diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/Verschmierer.java b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/Verschmierer.java index 4ccba3644f7..d01ca26ce36 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/Verschmierer.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/pendlermatrix/Verschmierer.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Random; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -30,7 +31,6 @@ import org.matsim.api.core.v01.Coord; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; public class Verschmierer { diff --git a/contribs/vsp/src/main/java/playground/vsp/demandde/prognose2025/DemandMatrixReader.java b/contribs/vsp/src/main/java/playground/vsp/demandde/prognose2025/DemandMatrixReader.java index ba6cd54148d..967e7628e1d 100644 --- a/contribs/vsp/src/main/java/playground/vsp/demandde/prognose2025/DemandMatrixReader.java +++ b/contribs/vsp/src/main/java/playground/vsp/demandde/prognose2025/DemandMatrixReader.java @@ -26,6 +26,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Point; @@ -49,7 +50,6 @@ import org.matsim.facilities.ActivityFacility; import org.matsim.facilities.ActivityOption; import org.matsim.facilities.Facility; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.demandde.pendlermatrix.TripFlowSink; @@ -158,7 +158,7 @@ public void startRow(String[] row) { private void readShape() { Collection landkreise = GeoFileReader.getAllFeatures(this.shapeFile); - final ActivityFacilitiesFactory factory = ((MutableScenario)this.sc).getActivityFacilities().getFactory(); + final ActivityFacilitiesFactory factory = this.sc.getActivityFacilities().getFactory(); for (SimpleFeature landkreis : landkreise) { Integer gemeindeschluessel = Integer.parseInt((String) landkreis.getAttribute("gemeindesc")); Geometry geo = (Geometry) landkreis.getDefaultGeometry(); diff --git a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreator.java b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreator.java index 3ec676d187d..d457bb7dec9 100644 --- a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreator.java +++ b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreator.java @@ -30,6 +30,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.population.Person; import org.matsim.api.core.v01.population.Plan; @@ -45,7 +46,6 @@ import org.matsim.households.HouseholdImpl; import org.matsim.utils.objectattributes.ObjectAttributes; import org.matsim.utils.objectattributes.attributable.Attributes; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.openberlinscenario.Gender; import playground.vsp.openberlinscenario.cemdap.LogToOutputSaver; diff --git a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreatorChildren.java b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreatorChildren.java index 71cec77ea8a..5369dd74f6c 100644 --- a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreatorChildren.java +++ b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/SynPopCreatorChildren.java @@ -20,6 +20,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.population.Person; import org.matsim.api.core.v01.population.Plan; @@ -31,7 +32,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.utils.objectattributes.ObjectAttributes; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.openberlinscenario.Gender; import playground.vsp.openberlinscenario.cemdap.LogToOutputSaver; diff --git a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/ZoneAndLOSGeneratorV2.java b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/ZoneAndLOSGeneratorV2.java index c97a9b2cbf6..dde91a38d73 100644 --- a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/ZoneAndLOSGeneratorV2.java +++ b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/input/ZoneAndLOSGeneratorV2.java @@ -33,12 +33,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.matsim.api.core.v01.Coord; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; - import playground.vsp.openberlinscenario.cemdap.LogToOutputSaver; /** diff --git a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/Cemdap2MatsimUtils.java b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/Cemdap2MatsimUtils.java index 6298091c81a..97d160c368d 100644 --- a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/Cemdap2MatsimUtils.java +++ b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/Cemdap2MatsimUtils.java @@ -21,6 +21,7 @@ import java.util.Random; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.geom.Geometry; @@ -28,7 +29,6 @@ import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; import org.matsim.core.gbl.MatsimRandom; -import org.opengis.feature.simple.SimpleFeature; /** * @author dziemke diff --git a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/CemdapOutput2MatsimPlansConverter.java b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/CemdapOutput2MatsimPlansConverter.java index b8be4c3a3a8..5049ac72cb1 100644 --- a/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/CemdapOutput2MatsimPlansConverter.java +++ b/contribs/vsp/src/main/java/playground/vsp/openberlinscenario/cemdap/output/CemdapOutput2MatsimPlansConverter.java @@ -28,6 +28,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; @@ -42,7 +43,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.utils.objectattributes.ObjectAttributes; -import org.opengis.feature.simple.SimpleFeature; import playground.vsp.corineLandcover.CorineLandCoverData; import playground.vsp.corineLandcover.GeometryUtils; diff --git a/contribs/vsp/src/main/java/playground/vsp/pt/transitRouteTrimmer/TransitRouteTrimmerUtils.java b/contribs/vsp/src/main/java/playground/vsp/pt/transitRouteTrimmer/TransitRouteTrimmerUtils.java index f8aadd7ee15..99239b29fd1 100644 --- a/contribs/vsp/src/main/java/playground/vsp/pt/transitRouteTrimmer/TransitRouteTrimmerUtils.java +++ b/contribs/vsp/src/main/java/playground/vsp/pt/transitRouteTrimmer/TransitRouteTrimmerUtils.java @@ -22,15 +22,17 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.data.SimpleFeatureStore; +import org.geotools.api.data.Transaction; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.data.DataUtilities; import org.geotools.data.DefaultTransaction; -import org.geotools.data.Transaction; import org.geotools.data.collection.ListFeatureCollection; import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.ShapefileDataStoreFactory; import org.geotools.data.simple.SimpleFeatureCollection; -import org.geotools.data.simple.SimpleFeatureSource; -import org.geotools.data.simple.SimpleFeatureStore; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; @@ -43,8 +45,6 @@ import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.pt.transitSchedule.api.*; import org.matsim.utils.gis.shp2matsim.ShpGeometryUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; import java.io.File; import java.io.IOException; diff --git a/matsim/src/main/java/org/matsim/analysis/pt/stop2stop/PtStop2StopAnalysis2Shp.java b/matsim/src/main/java/org/matsim/analysis/pt/stop2stop/PtStop2StopAnalysis2Shp.java index 99eeb4c0b20..1599a5ba979 100644 --- a/matsim/src/main/java/org/matsim/analysis/pt/stop2stop/PtStop2StopAnalysis2Shp.java +++ b/matsim/src/main/java/org/matsim/analysis/pt/stop2stop/PtStop2StopAnalysis2Shp.java @@ -23,6 +23,7 @@ import org.apache.commons.csv.CSVPrinter; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -35,7 +36,6 @@ import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.core.utils.io.IOUtils; import org.matsim.pt.transitSchedule.api.TransitLine; -import org.opengis.feature.simple.SimpleFeature; import java.io.IOException; import java.util.*; diff --git a/matsim/src/main/java/org/matsim/core/network/algorithms/NetworkTeleatlasAddManeuverRestrictions.java b/matsim/src/main/java/org/matsim/core/network/algorithms/NetworkTeleatlasAddManeuverRestrictions.java index b88e16c0a2b..f9a20978221 100644 --- a/matsim/src/main/java/org/matsim/core/network/algorithms/NetworkTeleatlasAddManeuverRestrictions.java +++ b/matsim/src/main/java/org/matsim/core/network/algorithms/NetworkTeleatlasAddManeuverRestrictions.java @@ -28,9 +28,10 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.data.shapefile.dbf.DbaseFileReader; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.network.Link; import org.matsim.api.core.v01.network.Network; @@ -41,7 +42,6 @@ import org.matsim.core.utils.collections.Tuple; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; /** * Adds maneuver restrictions to a MATSim {@link Network network} created diff --git a/matsim/src/main/java/org/matsim/core/network/io/NetworkReaderTeleatlas.java b/matsim/src/main/java/org/matsim/core/network/io/NetworkReaderTeleatlas.java index c4416bb5531..4c947ad52fa 100644 --- a/matsim/src/main/java/org/matsim/core/network/io/NetworkReaderTeleatlas.java +++ b/matsim/src/main/java/org/matsim/core/network/io/NetworkReaderTeleatlas.java @@ -24,8 +24,10 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.geometry.BoundingBox; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.network.Link; @@ -34,8 +36,6 @@ import org.matsim.core.api.internal.MatsimSomeReader; import org.matsim.core.network.NetworkUtils; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.geometry.BoundingBox; /** * A reader for TeleAtlas network description files. The reader is based on diff --git a/matsim/src/main/java/org/matsim/core/utils/geometry/GeometryUtils.java b/matsim/src/main/java/org/matsim/core/utils/geometry/GeometryUtils.java index b407c794b2b..1c8fc0ac6e7 100644 --- a/matsim/src/main/java/org/matsim/core/utils/geometry/GeometryUtils.java +++ b/matsim/src/main/java/org/matsim/core/utils/geometry/GeometryUtils.java @@ -28,6 +28,7 @@ import java.util.Map.Entry; import java.util.Random; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.geometry.jts.GeometryBuilder; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; @@ -40,7 +41,6 @@ import org.matsim.api.core.v01.network.Network; import org.matsim.core.gbl.Gbl; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.feature.simple.SimpleFeature; /** * @author kainagel diff --git a/matsim/src/main/java/org/matsim/core/utils/geometry/geotools/MGC.java b/matsim/src/main/java/org/matsim/core/utils/geometry/geotools/MGC.java index cf50c6938c0..3667bf7aa80 100644 --- a/matsim/src/main/java/org/matsim/core/utils/geometry/geotools/MGC.java +++ b/matsim/src/main/java/org/matsim/core/utils/geometry/geotools/MGC.java @@ -25,14 +25,14 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; import org.matsim.core.utils.geometry.transformations.TransformationFactory; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Converter factory for various conversion from Geotools to MATSim and vice versa. diff --git a/matsim/src/main/java/org/matsim/core/utils/geometry/transformations/GeotoolsTransformation.java b/matsim/src/main/java/org/matsim/core/utils/geometry/transformations/GeotoolsTransformation.java index 531383ac9e9..5d6b414394d 100644 --- a/matsim/src/main/java/org/matsim/core/utils/geometry/transformations/GeotoolsTransformation.java +++ b/matsim/src/main/java/org/matsim/core/utils/geometry/transformations/GeotoolsTransformation.java @@ -20,6 +20,10 @@ package org.matsim.core.utils.geometry.transformations; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.TransformException; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Point; @@ -27,10 +31,6 @@ import org.matsim.core.utils.geometry.CoordUtils; import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.TransformException; /** * A transformation factory for various coordinate systems using the GeoTools. diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileReader.java b/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileReader.java index 80fe6650150..c08aa5f79b2 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileReader.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileReader.java @@ -22,24 +22,19 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.geotools.data.DataStore; -import org.geotools.data.DataStoreFinder; -import org.geotools.data.FileDataStore; -import org.geotools.data.FileDataStoreFinder; +import org.geotools.api.data.*; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.feature.type.Name; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.data.simple.SimpleFeatureCollection; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.geometry.jts.ReferencedEnvelope; import org.geotools.geopkg.GeoPkgDataStoreFactory; import org.geotools.jdbc.JDBCDataStore; import org.matsim.core.api.internal.MatsimSomeReader; import org.matsim.core.gbl.Gbl; import org.matsim.core.utils.misc.Counter; -import org.opengis.feature.Feature; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.feature.type.Name; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import java.io.File; import java.io.IOException; diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileWriter.java b/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileWriter.java index 26296281c56..c0bd720f77a 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileWriter.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/GeoFileWriter.java @@ -22,19 +22,19 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.geotools.data.DataStore; -import org.geotools.data.DataStoreFinder; -import org.geotools.data.FileDataStore; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.DataStoreFinder; +import org.geotools.api.data.FileDataStore; +import org.geotools.api.data.SimpleFeatureStore; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.feature.type.Name; import org.geotools.data.shapefile.ShapefileDataStore; -import org.geotools.data.simple.SimpleFeatureStore; import org.geotools.feature.DefaultFeatureCollection; import org.geotools.feature.NameImpl; import org.geotools.geopkg.GeoPkgDataStoreFactory; import org.geotools.jdbc.JDBCDataStoreFactory; import org.matsim.core.api.internal.MatsimSomeWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.feature.type.Name; import java.io.File; import java.io.IOException; diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/PointFeatureFactory.java b/matsim/src/main/java/org/matsim/core/utils/gis/PointFeatureFactory.java index e8b3cd008ef..30844e5e672 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/PointFeatureFactory.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/PointFeatureFactory.java @@ -23,15 +23,15 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * @author mrieser / senozon diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/PolygonFeatureFactory.java b/matsim/src/main/java/org/matsim/core/utils/gis/PolygonFeatureFactory.java index 90138d648da..a6389d0af0f 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/PolygonFeatureFactory.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/PolygonFeatureFactory.java @@ -23,6 +23,9 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -31,9 +34,6 @@ import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Polygon; import org.matsim.api.core.v01.Coord; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * @author mrieser / senozon diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/PolylineFeatureFactory.java b/matsim/src/main/java/org/matsim/core/utils/gis/PolylineFeatureFactory.java index 745b7d4aee0..dac6691065f 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/PolylineFeatureFactory.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/PolylineFeatureFactory.java @@ -23,15 +23,15 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.LineString; import org.locationtech.jts.geom.MultiLineString; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * @author mrieser / senozon diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileReader.java b/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileReader.java index d3ddd7a6c8c..26defd23bbe 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileReader.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileReader.java @@ -20,16 +20,15 @@ package org.matsim.core.utils.gis; -import org.geotools.data.DataStore; -import org.geotools.data.FileDataStore; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FileDataStore; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.data.simple.SimpleFeatureCollection; -import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.geometry.jts.ReferencedEnvelope; import org.matsim.core.api.internal.MatsimSomeReader; -import org.opengis.feature.Feature; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import java.io.IOException; import java.io.UncheckedIOException; diff --git a/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileWriter.java b/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileWriter.java index c0ea83390e9..b789ee0bb10 100644 --- a/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileWriter.java +++ b/matsim/src/main/java/org/matsim/core/utils/gis/ShapeFileWriter.java @@ -20,10 +20,11 @@ package org.matsim.core.utils.gis; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.core.api.internal.MatsimSomeWriter; -import org.opengis.feature.simple.SimpleFeature; import java.util.Collection; + /** * This is a simple utility class that provides methods to write Feature instances * of the geotools framework to an ESRI shape file. diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGenerator.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGenerator.java index 0b2a180eb58..5f06d853f38 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGenerator.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGenerator.java @@ -20,8 +20,8 @@ package org.matsim.utils.gis.matsim2esri.network; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.api.core.v01.network.Link; -import org.opengis.feature.simple.SimpleFeature; public interface FeatureGenerator { diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGeneratorBuilderImpl.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGeneratorBuilderImpl.java index 89351a8efb9..dc1f174ee04 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGeneratorBuilderImpl.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/FeatureGeneratorBuilderImpl.java @@ -23,9 +23,9 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.api.core.v01.network.Network; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Design thoughts:
    diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/LineStringBasedFeatureGenerator.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/LineStringBasedFeatureGenerator.java index e1a58a113a9..155ff94ff71 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/LineStringBasedFeatureGenerator.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/LineStringBasedFeatureGenerator.java @@ -20,6 +20,8 @@ package org.matsim.utils.gis.matsim2esri.network; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -28,8 +30,6 @@ import org.matsim.api.core.v01.network.Link; import org.matsim.core.network.NetworkUtils; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class LineStringBasedFeatureGenerator implements FeatureGenerator{ diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Links2ESRIShape.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Links2ESRIShape.java index d8c8d452eb4..26fc4d30886 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Links2ESRIShape.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Links2ESRIShape.java @@ -25,6 +25,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.matsim.api.core.v01.Scenario; import org.matsim.api.core.v01.network.Link; import org.matsim.api.core.v01.network.Network; @@ -34,8 +36,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Simple class to convert the links of MATSim network files to ESRI shape files. The network can be written either diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Nodes2ESRIShape.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Nodes2ESRIShape.java index 003c08d7a34..ce7b66a6ce2 100644 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Nodes2ESRIShape.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/Nodes2ESRIShape.java @@ -24,6 +24,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Point; @@ -36,8 +38,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Simple class to convert the nodess of MATSim network files to ESRI shape files. The nodes could be written points diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/PolygonFeatureGenerator.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/PolygonFeatureGenerator.java index b4894e5b594..9a6563d8722 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/PolygonFeatureGenerator.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/network/PolygonFeatureGenerator.java @@ -20,6 +20,8 @@ package org.matsim.utils.gis.matsim2esri.network; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -27,8 +29,6 @@ import org.locationtech.jts.geom.Polygon; import org.matsim.api.core.v01.network.Link; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class PolygonFeatureGenerator implements FeatureGenerator{ diff --git a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShape.java b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShape.java index f40dc653e51..1420943145e 100755 --- a/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShape.java +++ b/matsim/src/main/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShape.java @@ -25,6 +25,8 @@ import java.util.ArrayList; import java.util.List; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -52,8 +54,6 @@ import org.matsim.core.scenario.ScenarioUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Simple class to convert MATSim plans to ESRI shape files. Activities will be converted into points and diff --git a/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileReaderTest.java b/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileReaderTest.java index d74ae57c395..b2c368ff6a3 100644 --- a/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileReaderTest.java +++ b/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileReaderTest.java @@ -23,7 +23,7 @@ import java.io.IOException; -import org.geotools.data.FeatureSource; +import org.geotools.api.data.FeatureSource; import org.geotools.feature.NameImpl; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileWriterTest.java b/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileWriterTest.java index 3c4d1de3994..30d0f116dd1 100644 --- a/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileWriterTest.java +++ b/matsim/src/test/java/org/matsim/core/utils/gis/GeoFileWriterTest.java @@ -26,9 +26,11 @@ import java.util.Collection; import java.util.List; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.data.simple.SimpleFeatureCollection; import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.data.simple.SimpleFeatureSource; import org.geotools.feature.NameImpl; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; @@ -43,8 +45,6 @@ import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Polygon; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; public class GeoFileWriterTest { diff --git a/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/network/Network2ESRIShapeTest.java b/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/network/Network2ESRIShapeTest.java index ad21f1e38cd..c1e4fe470bb 100755 --- a/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/network/Network2ESRIShapeTest.java +++ b/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/network/Network2ESRIShapeTest.java @@ -22,6 +22,8 @@ import java.util.Collection; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -33,8 +35,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class Network2ESRIShapeTest { diff --git a/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShapeTest.java b/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShapeTest.java index c619704622b..25046023c6d 100755 --- a/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShapeTest.java +++ b/matsim/src/test/java/org/matsim/utils/gis/matsim2esri/plans/SelectedPlans2ESRIShapeTest.java @@ -24,6 +24,8 @@ import java.util.Collection; import java.util.zip.GZIPInputStream; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -36,8 +38,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; public class SelectedPlans2ESRIShapeTest {