From e9e8ce08ad97b3c56e3db3d7a1afe874e056ab21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nico=20K=C3=BChnel?= Date: Fri, 17 May 2024 10:50:24 +0200 Subject: [PATCH] update to geotools 31 (resolve transitive dependency conflicts) (#3272) * update to geotools 31 * update geotools import statements * remove gt-opengis as it is discontinued --- .../accessibility/AccessibilityUtils.java | 2 +- .../contrib/accessibility/FeatureSHP.java | 8 ++++---- .../contrib/accessibility/GridUtils.java | 1 - .../contrib/accessibility/VoronoiExample.java | 2 +- .../accessibility/VoronoiGeometryUtils.java | 4 ++-- .../contrib/accessibility/gis/CRSUtils.java | 18 +++++++++--------- .../contrib/accessibility/gis/ZoneLayer.java | 6 +++--- .../accessibility/osm/CombinedOsmSink.java | 4 ++-- .../accessibility/osm/LandUseBuildingSink.java | 8 ++++---- .../accessibility/utils/GeoserverUpdater.java | 10 +++++----- .../AccidentsNetworkModification.java | 8 ++++---- .../analysis/christoph/TravelTimesWriter.java | 4 ++-- .../matsim/application/options/ShpOptions.java | 9 +++++---- .../application/prepare/CreateLandUseShp.java | 12 ++++++------ .../prepare/ShapeFileTextLookup.java | 4 ++-- .../prepare/counts/NetworkIndex.java | 4 ++-- .../dataProcessing/GenerateLookupTable.java | 2 +- .../GermanNutsTransformation.java | 2 +- .../DetermineAverageTruckLoad.java | 2 +- .../CarrierReaderFromCSV.java | 2 +- .../DemandReaderFromCSV.java | 2 +- .../application/options/ShpOptionsTest.java | 2 +- .../DemandReaderFromCSVTest.java | 2 +- .../bicycle/network/ElevationDataParser.java | 8 ++++---- .../config/FreefloatingAreasReader.java | 2 +- .../carsharing/qsim/FreefloatingAreas.java | 2 +- .../CarsharingVehicleRelocationContainer.java | 2 +- .../infrastructure/RelocationZone.java | 2 +- .../utils/RelocationZonesReader.java | 2 +- .../contrib/common/zones/ZoneSystemUtils.java | 4 ++-- .../contrib/common/zones/io/ZoneShpReader.java | 2 +- .../contrib/common/zones/io/ZoneShpWriter.java | 4 ++-- .../common/zones/util/SubzoneUtils.java | 2 +- .../constraints/ShapeFileConstraint.java | 8 ++++---- .../dashboards/DrtAnalysisPostProcessing.java | 10 +++++----- contribs/drt/pom.xml | 6 ------ .../zonal/DrtZonalWaitTimesAnalyzer.java | 2 +- .../TestWarmEmissionAnalysisModule.java | 1 - .../discharging/LTHDriveEnergyConsumption.java | 1 - .../contrib/minibus/schedule/CreatePStops.java | 2 +- ...nJunctionApproachesAndBetweenJunctions.java | 2 +- .../org/matsim/contrib/noise/DEMContext.java | 5 +++-- .../matsim/contrib/noise/DEMContextImpl.java | 7 ++++--- .../noise/FeatureNoiseBarriersReader.java | 10 +++++----- .../contrib/noise/RLS19NoiseEmission.java | 12 ++++++------ .../drawer/SimpleBackgroundFeatureDrawer.java | 4 ++-- .../analysis/RegionModeshareAnalyzer.java | 2 +- .../parkingproxy/run/RunAreaAnalysis.java | 2 +- .../analysis/skims/CalculateSkimMatrices.java | 2 +- .../matsim/analysis/skims/MatricesToXY.java | 2 +- .../utils/WriteStationShapefile.java | 4 ++-- ...erateSmallScaleCommercialTrafficDemand.java | 2 +- .../TripDistributionMatrix.java | 2 +- .../CreateDataDistributionOfStructureData.java | 2 +- .../prepare/LanduseBuildingAnalysis.java | 2 +- .../TrafficVolumeGenerationTest.java | 2 +- .../TripDistributionMatrixTest.java | 2 +- .../prepare/LanduseBuildingAnalysisTest.java | 2 +- .../vsp/analysis/DefaultAnalysis.java | 2 +- .../act2mode/ActivityToModeAnalysis.java | 2 +- .../networkAnalysis/NetworkAnalyzer.java | 2 +- .../utils/PtAccesShapeWriter.java | 4 ++-- .../utils/PtAccessMapShapeWriter.java | 4 ++-- .../ptPaxVolumes/PtPaxVolumesAnalyzer.java | 2 +- .../TransitSchedule2Shp.java | 4 ++-- .../TransitVehicleVolumeAnalyzer.java | 4 ++-- .../vsp/analysis/utils/heatMap/HeatMap.java | 4 ++-- .../andreas/utils/ana/RouteAllModesAsCar.java | 4 ++-- ...LinksstatsPolygonBasedFeatureGenerator.java | 4 ++-- .../LinkstatsStringBasedFeatureGenerator.java | 4 ++-- .../compareLinkStats/NetworkAndMore2ESRI.java | 2 +- ...VehOnLinksPolygonBasedFeatureGenerator.java | 4 ++-- ...tVehOnLinksStringBasedFeatureGenerator.java | 4 ++-- .../utils/ana/countVehOnLinks/PackageMain.java | 2 +- .../WorkHomeShapeCounter.java | 4 ++-- .../utils/pop/FilterPopulationByShape.java | 2 +- .../transitSchedule2shape/DaShapeWriter.java | 2 +- .../CORINELandCoverCoordsModifier.java | 2 +- .../corineLandcover/CorineLandCoverData.java | 2 +- .../CommuterDemandWriter.java | 6 +++--- .../CommuterGenerator.java | 6 +++--- .../commuterDemandCottbus/DgLanduseReader.java | 6 +++--- .../DgPopulation2ShapeWriter.java | 8 ++++---- .../vsp/demandde/counts/TSBASt2Count.java | 2 +- .../demandde/pendlermatrix/GVPlanReader.java | 2 +- .../pendlermatrix/PendlerMatrixReader.java | 4 ++-- .../demandde/pendlermatrix/Verschmierer.java | 2 +- .../prognose2025/DemandMatrixReader.java | 4 ++-- .../cemdap/input/SynPopCreator.java | 2 +- .../cemdap/input/SynPopCreatorChildren.java | 2 +- .../cemdap/input/ZoneAndLOSGeneratorV2.java | 3 +-- .../cemdap/output/Cemdap2MatsimUtils.java | 2 +- .../CemdapOutput2MatsimPlansConverter.java | 2 +- .../TransitRouteTrimmerUtils.java | 10 +++++----- .../pt/stop2stop/PtStop2StopAnalysis2Shp.java | 2 +- ...etworkTeleatlasAddManeuverRestrictions.java | 4 ++-- .../network/io/NetworkReaderTeleatlas.java | 6 +++--- .../core/utils/geometry/GeometryUtils.java | 2 +- .../core/utils/geometry/geotools/MGC.java | 4 ++-- .../GeotoolsTransformation.java | 8 ++++---- .../matsim/core/utils/gis/GeoFileReader.java | 15 +++++---------- .../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 ++- .../matsim2esri/network/FeatureGenerator.java | 2 +- .../network/FeatureGeneratorBuilderImpl.java | 2 +- .../LineStringBasedFeatureGenerator.java | 4 ++-- .../matsim2esri/network/Links2ESRIShape.java | 4 ++-- .../matsim2esri/network/Nodes2ESRIShape.java | 4 ++-- .../network/PolygonFeatureGenerator.java | 4 ++-- .../plans/SelectedPlans2ESRIShape.java | 4 ++-- .../core/utils/gis/GeoFileReaderTest.java | 2 +- .../core/utils/gis/GeoFileWriterTest.java | 6 +++--- .../network/Network2ESRIShapeTest.java | 4 ++-- .../plans/SelectedPlans2ESRIShapeTest.java | 4 ++-- pom.xml | 2 +- 119 files changed, 244 insertions(+), 256 deletions(-) diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/AccessibilityUtils.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/AccessibilityUtils.java index 43420197e8e..1ed755c12b6 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/AccessibilityUtils.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/AccessibilityUtils.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.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; @@ -41,7 +42,6 @@ import org.matsim.core.utils.geometry.CoordUtils; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.facilities.*; -import org.opengis.feature.simple.SimpleFeature; import java.util.*; import java.util.concurrent.ConcurrentHashMap; diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/FeatureSHP.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/FeatureSHP.java index 9ff4d3711ed..2e5cee46039 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/FeatureSHP.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/FeatureSHP.java @@ -24,11 +24,11 @@ import java.util.HashSet; import java.util.Set; -import org.geotools.data.DataStore; -import org.geotools.data.FileDataStoreFinder; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FileDataStoreFinder; +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.opengis.feature.simple.SimpleFeature; /** * Utility class for reading shape (.shp) files. diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/GridUtils.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/GridUtils.java index b8cfc04417f..6e5aa187364 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/GridUtils.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/GridUtils.java @@ -20,7 +20,6 @@ import org.matsim.facilities.ActivityFacility; import org.matsim.facilities.FacilitiesUtils; import org.matsim.utils.gis.shp2matsim.ShpGeometryUtils; -import org.opengis.feature.simple.SimpleFeature; public final class GridUtils { // used from outside, e.g. in vsp playgrounds diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiExample.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiExample.java index 382e13b68f7..d1fe1df43d7 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiExample.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiExample.java @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; +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; @@ -29,7 +30,6 @@ import org.locationtech.jts.triangulate.VoronoiDiagramBuilder; import org.matsim.contrib.matrixbasedptrouter.utils.BoundingBox; import org.matsim.core.utils.gis.GeoFileWriter; -import org.opengis.feature.simple.SimpleFeature; /** * @author dziemke diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiGeometryUtils.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiGeometryUtils.java index 76e7273fd87..bcf0edc7b73 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiGeometryUtils.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/VoronoiGeometryUtils.java @@ -27,6 +27,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.locationtech.jts.geom.Coordinate; @@ -40,8 +42,6 @@ import org.matsim.core.utils.geometry.CoordUtils; import org.matsim.facilities.ActivityFacilities; import org.matsim.facilities.ActivityFacility; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; /** * @author dziemke diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/CRSUtils.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/CRSUtils.java index a7171739b6a..92f3d94c5b8 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/CRSUtils.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/CRSUtils.java @@ -24,18 +24,18 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.metadata.Identifier; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.NoSuchAuthorityCodeException; +import org.geotools.api.referencing.crs.CRSAuthorityFactory; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.TransformException; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.Point; -import org.opengis.metadata.Identifier; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.NoSuchAuthorityCodeException; -import org.opengis.referencing.crs.CRSAuthorityFactory; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.TransformException; /** * Utility-class providing functionality related to coordinate reference @@ -94,7 +94,7 @@ public static int getSRID(CoordinateReferenceSystem crs) { /* * Randomly get one identifier. */ - Identifier identifier = (Identifier) (crs.getIdentifiers().iterator().next()); + Identifier identifier = crs.getIdentifiers().iterator().next(); if (identifier == null) { return 0; } else { @@ -118,7 +118,7 @@ public static MathTransform findTransform(Geometry source, Geometry target) { CoordinateReferenceSystem targetCRS = getCRS(target.getSRID()); try { - return CRS.findMathTransform(sourceCRS, targetCRS); + return CRS.findMathTransform(sourceCRS, targetCRS); } catch (FactoryException e) { e.printStackTrace(); return null; diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/ZoneLayer.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/ZoneLayer.java index c39948b714f..28bc2c41059 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/ZoneLayer.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/gis/ZoneLayer.java @@ -24,13 +24,13 @@ import java.util.List; import java.util.Set; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Point; import org.locationtech.jts.index.SpatialIndex; import org.locationtech.jts.index.quadtree.Quadtree; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; /** * Representation of a spatial index containing zones backed by a quadtree. diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/CombinedOsmSink.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/CombinedOsmSink.java index f7e39f4b588..7c5c1bcf2d2 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/CombinedOsmSink.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/CombinedOsmSink.java @@ -22,6 +22,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; @@ -41,7 +42,6 @@ import org.matsim.facilities.ActivityOption; import org.matsim.facilities.FacilitiesUtils; import org.matsim.utils.objectattributes.ObjectAttributes; -import org.opengis.feature.simple.SimpleFeature; import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer; import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer; import org.openstreetmap.osmosis.core.container.v0_6.EntityProcessor; @@ -89,7 +89,7 @@ class CombinedOsmSink implements Sink { private Map typeCount = new HashMap<>(); - private List landUseAreas = new ArrayList (); + private List landUseAreas = new ArrayList<>(); private int featureErrorCounter = 0; private int buildingErrorCounter = 0; diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/LandUseBuildingSink.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/LandUseBuildingSink.java index 0a5989ad5e8..3b55793e0d6 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/LandUseBuildingSink.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/osm/LandUseBuildingSink.java @@ -22,6 +22,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; @@ -40,7 +41,6 @@ import org.matsim.facilities.ActivityOption; import org.matsim.facilities.FacilitiesUtils; import org.matsim.utils.objectattributes.ObjectAttributes; -import org.opengis.feature.simple.SimpleFeature; import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer; import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer; import org.openstreetmap.osmosis.core.container.v0_6.EntityProcessor; @@ -69,11 +69,11 @@ class LandUseBuildingSink implements Sink { private Map relationMap; private ActivityFacilities facilities; private ObjectAttributes facilityAttributes; - private Map landUseTypeMap = new HashMap<>(); - private Map buildingTypeMap = new HashMap<>(); + private final Map landUseTypeMap; + private Map buildingTypeMap; private Map typeCount = new HashMap<>(); - private List features = new ArrayList (); + private List features = new ArrayList<>(); private double buildingTypeFromVicinityRange; private String[] tagsToIgnoreBuildings; diff --git a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/utils/GeoserverUpdater.java b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/utils/GeoserverUpdater.java index a5799e30983..d489d7ca811 100644 --- a/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/utils/GeoserverUpdater.java +++ b/contribs/accessibility/src/main/java/org/matsim/contrib/accessibility/utils/GeoserverUpdater.java @@ -28,9 +28,11 @@ 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.simple.SimpleFeatureStore; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.DataStoreFinder; +import org.geotools.api.data.SimpleFeatureStore; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.feature.DefaultFeatureCollection; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; @@ -49,8 +51,6 @@ import org.matsim.core.utils.geometry.transformations.TransformationFactory; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.facilities.ActivityFacility; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; public class GeoserverUpdater implements FacilityDataExchangeInterface { diff --git a/contribs/accidents/src/main/java/org/matsim/contrib/accidents/runExample/AccidentsNetworkModification.java b/contribs/accidents/src/main/java/org/matsim/contrib/accidents/runExample/AccidentsNetworkModification.java index 7388ce718d5..0cd56b5fd7f 100644 --- a/contribs/accidents/src/main/java/org/matsim/contrib/accidents/runExample/AccidentsNetworkModification.java +++ b/contribs/accidents/src/main/java/org/matsim/contrib/accidents/runExample/AccidentsNetworkModification.java @@ -28,10 +28,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.geotools.data.DataStore; -import org.geotools.data.FileDataStoreFinder; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FileDataStoreFinder; +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; @@ -45,7 +46,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; /** * @author mmayobre, ikaddoura diff --git a/contribs/analysis/src/main/java/org/matsim/contrib/analysis/christoph/TravelTimesWriter.java b/contribs/analysis/src/main/java/org/matsim/contrib/analysis/christoph/TravelTimesWriter.java index c1f1f9ea36e..12b9efdcffb 100644 --- a/contribs/analysis/src/main/java/org/matsim/contrib/analysis/christoph/TravelTimesWriter.java +++ b/contribs/analysis/src/main/java/org/matsim/contrib/analysis/christoph/TravelTimesWriter.java @@ -28,6 +28,8 @@ import java.util.Map; import java.util.Map.Entry; +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.Coord; import org.matsim.api.core.v01.network.Link; @@ -43,8 +45,6 @@ import org.matsim.core.utils.gis.PolylineFeatureFactory; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; /** * Analyzes the average link travel times and writes them to files (absolute and diff --git a/contribs/application/src/main/java/org/matsim/application/options/ShpOptions.java b/contribs/application/src/main/java/org/matsim/application/options/ShpOptions.java index 359eedb0db4..985db84bba7 100644 --- a/contribs/application/src/main/java/org/matsim/application/options/ShpOptions.java +++ b/contribs/application/src/main/java/org/matsim/application/options/ShpOptions.java @@ -3,6 +3,11 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.data.*; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.data.*; import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.ShapefileDataStoreFactory; @@ -21,10 +26,6 @@ import org.matsim.core.utils.geometry.transformations.TransformationFactory; import org.matsim.core.utils.gis.GeoFileReader; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import picocli.CommandLine; import javax.annotation.Nullable; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/CreateLandUseShp.java b/contribs/application/src/main/java/org/matsim/application/prepare/CreateLandUseShp.java index 4f10c61e745..a4cec737419 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/CreateLandUseShp.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/CreateLandUseShp.java @@ -2,12 +2,14 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.geotools.data.DataStore; -import org.geotools.data.FileDataStore; -import org.geotools.data.FileDataStoreFactorySpi; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FileDataStore; +import org.geotools.api.data.FileDataStoreFactorySpi; +import org.geotools.api.data.SimpleFeatureStore; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.data.collection.ListFeatureCollection; import org.geotools.data.shapefile.ShapefileDataStoreFactory; -import org.geotools.data.simple.SimpleFeatureStore; import org.geotools.data.store.ReprojectingFeatureCollection; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.referencing.CRS; @@ -15,8 +17,6 @@ import org.locationtech.jts.index.strtree.STRtree; import org.matsim.application.MATSimAppCommand; import org.matsim.application.options.CrsOptions; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; import picocli.CommandLine; import java.nio.file.FileSystem; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/ShapeFileTextLookup.java b/contribs/application/src/main/java/org/matsim/application/prepare/ShapeFileTextLookup.java index 1be1a71eed1..e6b768e9ae8 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/ShapeFileTextLookup.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/ShapeFileTextLookup.java @@ -6,11 +6,11 @@ import org.apache.commons.text.similarity.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.type.AttributeDescriptor; import org.matsim.application.MATSimAppCommand; import org.matsim.application.options.CsvOptions; import org.matsim.application.options.ShpOptions; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.type.AttributeDescriptor; import picocli.CommandLine; import java.nio.file.Files; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/counts/NetworkIndex.java b/contribs/application/src/main/java/org/matsim/application/prepare/counts/NetworkIndex.java index da00479b097..f44409de03b 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/counts/NetworkIndex.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/counts/NetworkIndex.java @@ -3,6 +3,8 @@ import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.TransformException; import org.geotools.geometry.jts.JTS; import org.locationtech.jts.algorithm.distance.DiscreteHausdorffDistance; import org.locationtech.jts.geom.*; @@ -13,8 +15,6 @@ import org.matsim.api.core.v01.network.Network; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.io.IOUtils; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.TransformException; import javax.annotation.Nullable; import java.io.IOException; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GenerateLookupTable.java b/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GenerateLookupTable.java index b6a8f99d22f..c86a773cc28 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GenerateLookupTable.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GenerateLookupTable.java @@ -4,12 +4,12 @@ import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVPrinter; import org.apache.commons.csv.CSVRecord; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Geometry; import org.matsim.api.core.v01.Coord; import org.matsim.application.MATSimAppCommand; import org.matsim.application.options.ShpOptions; import org.matsim.core.utils.geometry.geotools.MGC; -import org.opengis.feature.simple.SimpleFeature; import picocli.CommandLine; import java.io.FileWriter; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GermanNutsTransformation.java b/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GermanNutsTransformation.java index eabeedb1c89..a659692739d 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GermanNutsTransformation.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/freight/dataProcessing/GermanNutsTransformation.java @@ -1,5 +1,6 @@ package org.matsim.application.prepare.freight.dataProcessing; +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; @@ -7,7 +8,6 @@ import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.geometry.transformations.GeotoolsTransformation; -import org.opengis.feature.simple.SimpleFeature; import java.nio.charset.StandardCharsets; import java.nio.file.Path; diff --git a/contribs/application/src/main/java/org/matsim/application/prepare/freight/optimization/DetermineAverageTruckLoad.java b/contribs/application/src/main/java/org/matsim/application/prepare/freight/optimization/DetermineAverageTruckLoad.java index b89303a23bb..f82c2a885d6 100644 --- a/contribs/application/src/main/java/org/matsim/application/prepare/freight/optimization/DetermineAverageTruckLoad.java +++ b/contribs/application/src/main/java/org/matsim/application/prepare/freight/optimization/DetermineAverageTruckLoad.java @@ -6,6 +6,7 @@ import org.apache.commons.csv.CSVRecord; 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.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Identifiable; @@ -27,7 +28,6 @@ import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.core.utils.geometry.transformations.TransformationFactory; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; import picocli.CommandLine; import java.io.FileWriter; diff --git a/contribs/application/src/main/java/org/matsim/freightDemandGeneration/CarrierReaderFromCSV.java b/contribs/application/src/main/java/org/matsim/freightDemandGeneration/CarrierReaderFromCSV.java index 7939a9dab9a..19dc604a32c 100644 --- a/contribs/application/src/main/java/org/matsim/freightDemandGeneration/CarrierReaderFromCSV.java +++ b/contribs/application/src/main/java/org/matsim/freightDemandGeneration/CarrierReaderFromCSV.java @@ -24,6 +24,7 @@ import org.apache.commons.csv.CSVRecord; 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.Scenario; import org.matsim.api.core.v01.network.Link; @@ -33,7 +34,6 @@ import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.vehicles.Vehicle; import org.matsim.vehicles.VehicleType; -import org.opengis.feature.simple.SimpleFeature; import java.io.IOException; import java.nio.file.Files; diff --git a/contribs/application/src/main/java/org/matsim/freightDemandGeneration/DemandReaderFromCSV.java b/contribs/application/src/main/java/org/matsim/freightDemandGeneration/DemandReaderFromCSV.java index d991eaa9a6f..a301fe8dcf1 100644 --- a/contribs/application/src/main/java/org/matsim/freightDemandGeneration/DemandReaderFromCSV.java +++ b/contribs/application/src/main/java/org/matsim/freightDemandGeneration/DemandReaderFromCSV.java @@ -24,6 +24,7 @@ import org.apache.commons.csv.CSVRecord; 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.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Scenario; @@ -36,7 +37,6 @@ import org.matsim.core.router.TripStructureUtils; import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.freight.carriers.*; -import org.opengis.feature.simple.SimpleFeature; import java.io.IOException; import java.nio.file.Files; diff --git a/contribs/application/src/test/java/org/matsim/application/options/ShpOptionsTest.java b/contribs/application/src/test/java/org/matsim/application/options/ShpOptionsTest.java index bc13baad71f..e28ec92193f 100644 --- a/contribs/application/src/test/java/org/matsim/application/options/ShpOptionsTest.java +++ b/contribs/application/src/test/java/org/matsim/application/options/ShpOptionsTest.java @@ -1,13 +1,13 @@ package org.matsim.application.options; import org.assertj.core.data.Offset; +import org.geotools.api.feature.simple.SimpleFeature; import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.locationtech.jts.geom.Geometry; import org.matsim.api.core.v01.Coord; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; import java.nio.file.Files; import java.nio.file.Path; diff --git a/contribs/application/src/test/java/org/matsim/freightDemandGeneration/DemandReaderFromCSVTest.java b/contribs/application/src/test/java/org/matsim/freightDemandGeneration/DemandReaderFromCSVTest.java index c9133b6b56b..9d672b4a461 100644 --- a/contribs/application/src/test/java/org/matsim/freightDemandGeneration/DemandReaderFromCSVTest.java +++ b/contribs/application/src/test/java/org/matsim/freightDemandGeneration/DemandReaderFromCSVTest.java @@ -8,6 +8,7 @@ import java.util.Map; import java.util.Set; +import org.geotools.api.feature.simple.SimpleFeature; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -27,7 +28,6 @@ import org.matsim.freightDemandGeneration.CarrierReaderFromCSV.CarrierInformationElement; import org.matsim.freightDemandGeneration.DemandReaderFromCSV.DemandInformationElement; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; diff --git a/contribs/bicycle/src/main/java/org/matsim/contrib/bicycle/network/ElevationDataParser.java b/contribs/bicycle/src/main/java/org/matsim/contrib/bicycle/network/ElevationDataParser.java index a1a34d8fb76..73643505aa1 100644 --- a/contribs/bicycle/src/main/java/org/matsim/contrib/bicycle/network/ElevationDataParser.java +++ b/contribs/bicycle/src/main/java/org/matsim/contrib/bicycle/network/ElevationDataParser.java @@ -21,18 +21,18 @@ import java.awt.image.Raster; import java.io.IOException; +import org.geotools.api.data.DataSourceException; +import org.geotools.api.referencing.operation.TransformException; import org.geotools.coverage.grid.GridCoordinates2D; import org.geotools.coverage.grid.GridCoverage2D; import org.geotools.coverage.grid.GridGeometry2D; import org.geotools.coverage.grid.InvalidGridGeometryException; -import org.geotools.data.DataSourceException; import org.geotools.gce.geotiff.GeoTiffReader; -import org.geotools.geometry.DirectPosition2D; +import org.geotools.geometry.Position2D; import org.matsim.api.core.v01.Coord; import org.matsim.core.utils.geometry.CoordUtils; import org.matsim.core.utils.geometry.CoordinateTransformation; import org.matsim.core.utils.geometry.transformations.TransformationFactory; -import org.opengis.referencing.operation.TransformException; /** * @author smetzler, dziemke @@ -101,7 +101,7 @@ public double getElevation(Coord coord) { GridCoordinates2D posGrid = null; try { - posGrid = gg.worldToGrid(new DirectPosition2D(transformedCoord.getX(), transformedCoord.getY())); + posGrid = gg.worldToGrid(new Position2D(transformedCoord.getX(), transformedCoord.getY())); } catch (InvalidGridGeometryException e) { e.printStackTrace(); } catch (TransformException e) { diff --git a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/config/FreefloatingAreasReader.java b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/config/FreefloatingAreasReader.java index 8230aaf2296..3b796eb74d5 100644 --- a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/config/FreefloatingAreasReader.java +++ b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/config/FreefloatingAreasReader.java @@ -5,13 +5,13 @@ import java.util.Map; import java.util.Stack; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.matsim.api.core.v01.Coord; import org.matsim.contrib.carsharing.qsim.FreefloatingAreas; import org.matsim.core.utils.gis.PolygonFeatureFactory; import org.matsim.core.utils.io.MatsimXmlParser; import org.matsim.core.utils.misc.Counter; -import org.opengis.feature.simple.SimpleFeature; import org.xml.sax.Attributes; public class FreefloatingAreasReader extends MatsimXmlParser { diff --git a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/qsim/FreefloatingAreas.java b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/qsim/FreefloatingAreas.java index 6de9769e920..cda26560ab0 100644 --- a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/qsim/FreefloatingAreas.java +++ b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/qsim/FreefloatingAreas.java @@ -2,6 +2,7 @@ import java.util.ArrayList; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.MultiPolygon; @@ -9,7 +10,6 @@ import org.locationtech.jts.operation.distance.DistanceOp; import org.matsim.api.core.v01.Coord; import org.matsim.core.utils.gis.PointFeatureFactory; -import org.opengis.feature.simple.SimpleFeature; public class FreefloatingAreas { private PointFeatureFactory pointFeatureFactory; diff --git a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/demand/CarsharingVehicleRelocationContainer.java b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/demand/CarsharingVehicleRelocationContainer.java index dae3bd0386d..ea102e0f25c 100644 --- a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/demand/CarsharingVehicleRelocationContainer.java +++ b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/demand/CarsharingVehicleRelocationContainer.java @@ -9,6 +9,7 @@ import java.util.Map.Entry; import java.util.TreeMap; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Point; @@ -28,7 +29,6 @@ import org.matsim.contrib.carsharing.relocation.utils.RelocationZonesReader; import org.matsim.core.network.NetworkUtils; import org.matsim.core.utils.gis.PointFeatureFactory; -import org.opengis.feature.simple.SimpleFeature; public class CarsharingVehicleRelocationContainer { private Scenario scenario; diff --git a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/infrastructure/RelocationZone.java b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/infrastructure/RelocationZone.java index 97a7f6f3ddd..6e3e2eed9e5 100644 --- a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/infrastructure/RelocationZone.java +++ b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/infrastructure/RelocationZone.java @@ -7,13 +7,13 @@ import java.util.Map; import java.util.TreeMap; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Point; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Identifiable; import org.matsim.api.core.v01.network.Link; -import org.opengis.feature.simple.SimpleFeature; public class RelocationZone implements Identifiable { diff --git a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/utils/RelocationZonesReader.java b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/utils/RelocationZonesReader.java index 07df9ed165b..d7649f97d62 100644 --- a/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/utils/RelocationZonesReader.java +++ b/contribs/carsharing/src/main/java/org/matsim/contrib/carsharing/relocation/utils/RelocationZonesReader.java @@ -8,6 +8,7 @@ import java.util.Map; import java.util.Stack; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; @@ -15,7 +16,6 @@ import org.matsim.core.utils.gis.PolygonFeatureFactory; import org.matsim.core.utils.io.MatsimXmlParser; import org.matsim.core.utils.misc.Counter; -import org.opengis.feature.simple.SimpleFeature; import org.xml.sax.Attributes; public class RelocationZonesReader extends MatsimXmlParser { diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/zones/ZoneSystemUtils.java b/contribs/common/src/main/java/org/matsim/contrib/common/zones/ZoneSystemUtils.java index 725a9bb3a41..7352cd74278 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/zones/ZoneSystemUtils.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/zones/ZoneSystemUtils.java @@ -4,6 +4,8 @@ import one.util.streamex.EntryStream; import one.util.streamex.StreamEx; import org.apache.commons.lang3.tuple.Pair; +import org.geotools.api.feature.Property; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.Point; import org.locationtech.jts.geom.Polygonal; import org.locationtech.jts.geom.prep.PreparedGeometry; @@ -28,8 +30,6 @@ import org.matsim.core.config.ConfigGroup; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.Property; -import org.opengis.feature.simple.SimpleFeature; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpReader.java b/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpReader.java index 46e6978a184..1aea45726f1 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpReader.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpReader.java @@ -19,13 +19,13 @@ package org.matsim.contrib.common.zones.io; +import org.geotools.api.feature.simple.SimpleFeature; import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.prep.PreparedPolygon; import org.matsim.api.core.v01.Id; import org.matsim.contrib.common.zones.Zone; import org.matsim.contrib.common.zones.ZoneImpl; import org.matsim.core.utils.gis.GeoFileReader; -import org.opengis.feature.simple.SimpleFeature; import java.net.URL; import java.util.Collection; diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpWriter.java b/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpWriter.java index 68ae03a7b6d..7068c2518ac 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpWriter.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/zones/io/ZoneShpWriter.java @@ -19,14 +19,14 @@ package org.matsim.contrib.common.zones.io; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.locationtech.jts.geom.prep.PreparedGeometry; import org.matsim.api.core.v01.Id; import org.matsim.contrib.common.zones.Zone; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.core.utils.gis.PolygonFeatureFactory; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.referencing.crs.CoordinateReferenceSystem; import java.util.ArrayList; import java.util.List; diff --git a/contribs/common/src/main/java/org/matsim/contrib/common/zones/util/SubzoneUtils.java b/contribs/common/src/main/java/org/matsim/contrib/common/zones/util/SubzoneUtils.java index 01b9a80c6ee..d864f49b6ca 100644 --- a/contribs/common/src/main/java/org/matsim/contrib/common/zones/util/SubzoneUtils.java +++ b/contribs/common/src/main/java/org/matsim/contrib/common/zones/util/SubzoneUtils.java @@ -19,6 +19,7 @@ package org.matsim.contrib.common.zones.util; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.geometry.jts.GeometryCollector; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygon; @@ -27,7 +28,6 @@ import org.locationtech.jts.geom.util.PolygonExtracter; import org.matsim.api.core.v01.Id; import org.matsim.contrib.common.zones.Zone; -import org.opengis.feature.simple.SimpleFeature; import java.util.Collection; import java.util.HashMap; diff --git a/contribs/discrete_mode_choice/src/main/java/org/matsim/contribs/discrete_mode_choice/components/constraints/ShapeFileConstraint.java b/contribs/discrete_mode_choice/src/main/java/org/matsim/contribs/discrete_mode_choice/components/constraints/ShapeFileConstraint.java index fff197c1ec2..742b7d930ce 100644 --- a/contribs/discrete_mode_choice/src/main/java/org/matsim/contribs/discrete_mode_choice/components/constraints/ShapeFileConstraint.java +++ b/contribs/discrete_mode_choice/src/main/java/org/matsim/contribs/discrete_mode_choice/components/constraints/ShapeFileConstraint.java @@ -8,11 +8,12 @@ import java.util.List; import java.util.Set; -import org.geotools.data.DataStore; -import org.geotools.data.DataStoreFinder; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.DataStoreFinder; +import org.geotools.api.data.SimpleFeatureSource; +import org.geotools.api.feature.simple.SimpleFeature; import org.geotools.data.simple.SimpleFeatureCollection; 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; @@ -26,7 +27,6 @@ import org.matsim.contribs.discrete_mode_choice.model.trip_based.TripConstraint; import org.matsim.contribs.discrete_mode_choice.model.trip_based.TripConstraintFactory; import org.matsim.contribs.discrete_mode_choice.model.trip_based.candidates.TripCandidate; -import org.opengis.feature.simple.SimpleFeature; /** * This constraint decides whether a mode is allowed for a certain trip by diff --git a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/dashboards/DrtAnalysisPostProcessing.java b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/dashboards/DrtAnalysisPostProcessing.java index 34ce02553dc..a8f9e8eabb0 100644 --- a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/dashboards/DrtAnalysisPostProcessing.java +++ b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/dashboards/DrtAnalysisPostProcessing.java @@ -4,14 +4,16 @@ import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVPrinter; +import org.geotools.api.data.FileDataStoreFactorySpi; +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.FileDataStoreFactorySpi; -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.SimpleFeatureStore; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; @@ -34,8 +36,6 @@ import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.pt.transitSchedule.api.TransitScheduleReader; import org.matsim.pt.transitSchedule.api.TransitStopFacility; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; import picocli.CommandLine; import tech.tablesaw.api.ColumnType; import tech.tablesaw.api.DoubleColumn; diff --git a/contribs/drt/pom.xml b/contribs/drt/pom.xml index 5ae4b7b984c..eda34a832d3 100644 --- a/contribs/drt/pom.xml +++ b/contribs/drt/pom.xml @@ -51,12 +51,6 @@ ${geotools.version} - - org.geotools - gt-opengis - ${geotools.version} - - org.locationtech.jts jts-core diff --git a/contribs/drt/src/main/java/org/matsim/contrib/drt/analysis/zonal/DrtZonalWaitTimesAnalyzer.java b/contribs/drt/src/main/java/org/matsim/contrib/drt/analysis/zonal/DrtZonalWaitTimesAnalyzer.java index f86d7759e37..d16a0cd8e0a 100644 --- a/contribs/drt/src/main/java/org/matsim/contrib/drt/analysis/zonal/DrtZonalWaitTimesAnalyzer.java +++ b/contribs/drt/src/main/java/org/matsim/contrib/drt/analysis/zonal/DrtZonalWaitTimesAnalyzer.java @@ -23,6 +23,7 @@ import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; 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.Geometry; @@ -43,7 +44,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.gis.GeoFileWriter; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.BufferedWriter; import java.io.IOException; 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/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java index 44251e05fd7..026c853a5be 100644 --- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java +++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/GenerateSmallScaleCommercialTrafficDemand.java @@ -30,6 +30,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.config.Configurator; +import org.geotools.api.feature.simple.SimpleFeature; import org.matsim.api.core.v01.Coord; import org.matsim.api.core.v01.Id; import org.matsim.api.core.v01.Scenario; @@ -75,7 +76,6 @@ import org.matsim.vehicles.Vehicle; import org.matsim.vehicles.VehicleType; import org.matsim.vehicles.VehicleUtils; -import org.opengis.feature.simple.SimpleFeature; import picocli.CommandLine; import java.io.File; diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrix.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrix.java index 82be8708c6d..0b10c6a3d95 100644 --- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrix.java +++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrix.java @@ -27,6 +27,7 @@ import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; 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.Id; @@ -39,7 +40,6 @@ import org.matsim.smallScaleCommercialTrafficGeneration.TrafficVolumeGeneration.TrafficVolumeKey; import org.matsim.vehicles.VehicleType; import org.matsim.vehicles.VehicleUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.BufferedWriter; import java.io.IOException; diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/CreateDataDistributionOfStructureData.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/CreateDataDistributionOfStructureData.java index 70352d923dc..477231505c1 100644 --- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/CreateDataDistributionOfStructureData.java +++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/CreateDataDistributionOfStructureData.java @@ -3,6 +3,7 @@ import it.unimi.dsi.fastutil.objects.Object2DoubleMap; 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; @@ -11,7 +12,6 @@ import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.facilities.*; import org.matsim.smallScaleCommercialTrafficGeneration.SmallScaleCommercialTrafficUtils; -import org.opengis.feature.simple.SimpleFeature; import picocli.CommandLine; import java.io.File; diff --git a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysis.java b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysis.java index aad6ad43804..9b917eb006d 100644 --- a/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysis.java +++ b/contribs/small-scale-traffic-generation/src/main/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysis.java @@ -27,13 +27,13 @@ import org.apache.commons.csv.CSVRecord; 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.application.options.ShpOptions.Index; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.core.utils.io.IOUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.BufferedWriter; import java.io.IOException; diff --git a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGenerationTest.java b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGenerationTest.java index 7b843362a20..ce0aeda6610 100644 --- a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGenerationTest.java +++ b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TrafficVolumeGenerationTest.java @@ -20,6 +20,7 @@ package org.matsim.smallScaleCommercialTrafficGeneration; import it.unimi.dsi.fastutil.objects.Object2DoubleMap; +import org.geotools.api.feature.simple.SimpleFeature; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -38,7 +39,6 @@ import org.matsim.smallScaleCommercialTrafficGeneration.prepare.LanduseDataConnectionCreator; import org.matsim.smallScaleCommercialTrafficGeneration.prepare.LanduseDataConnectionCreatorForOSM_Data; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.File; import java.io.IOException; diff --git a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrixTest.java b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrixTest.java index 278e2b06f1b..7109fbbede2 100644 --- a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrixTest.java +++ b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/TripDistributionMatrixTest.java @@ -20,6 +20,7 @@ package org.matsim.smallScaleCommercialTrafficGeneration; import it.unimi.dsi.fastutil.objects.Object2DoubleMap; +import org.geotools.api.feature.simple.SimpleFeature; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -30,7 +31,6 @@ import org.matsim.smallScaleCommercialTrafficGeneration.TrafficVolumeGeneration.TrafficVolumeKey; import org.matsim.smallScaleCommercialTrafficGeneration.prepare.LanduseBuildingAnalysis; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.File; import java.io.IOException; diff --git a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysisTest.java b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysisTest.java index 812d282e5ec..a44b17581e2 100644 --- a/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysisTest.java +++ b/contribs/small-scale-traffic-generation/src/test/java/org/matsim/smallScaleCommercialTrafficGeneration/prepare/LanduseBuildingAnalysisTest.java @@ -20,12 +20,12 @@ package org.matsim.smallScaleCommercialTrafficGeneration.prepare; import it.unimi.dsi.fastutil.objects.Object2DoubleMap; +import org.geotools.api.feature.simple.SimpleFeature; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import org.matsim.smallScaleCommercialTrafficGeneration.SCTUtils; import org.matsim.testcases.MatsimTestUtils; -import org.opengis.feature.simple.SimpleFeature; import java.io.File; import java.io.IOException; 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 { diff --git a/pom.xml b/pom.xml index d79e8231281..236552eff4f 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.23.1 - 29.5 + 31.0 0.49.2 1.19.0 7.0.0