From 8c61445f7b0213222c4aabc000ccda2e6da42790 Mon Sep 17 00:00:00 2001 From: Bertil Chapuis Date: Thu, 7 Nov 2024 22:07:32 +0100 Subject: [PATCH] Refactor the openstreetmap module --- .../baremaps/cli/dem/VectorTileContours.java | 4 ++-- .../apache/baremaps/database/DiffService.java | 14 ++++++------ .../database/function/BlockImporter.java | 4 ++-- .../function/ChangeElementsImporter.java | 4 ++-- .../database/function/CopyChangeImporter.java | 2 +- .../database/function/PutChangeImporter.java | 2 +- .../database/postgres/HeaderRepository.java | 2 +- .../database/postgres/NodeRepository.java | 6 ++--- .../database/postgres/RelationRepository.java | 10 ++++----- .../database/postgres/WayRepository.java | 6 ++--- .../OpenStreetMapDocumentMapper.java | 4 ++-- .../OpenStreetMapEntityConsumer.java | 4 ++-- .../baremaps/iploc/IpLocRepository.java | 2 +- .../storage/postgres/PostgresDataTable.java | 2 +- .../tasks/CreateGeocoderOpenStreetMap.java | 4 ++-- .../workflow/tasks/CreateIplocIndex.java | 2 +- .../workflow/tasks/ExportVectorTiles.java | 4 ++-- .../tasks/ImportDaylightFeatures.java | 2 +- .../tasks/ImportDaylightTranslations.java | 2 +- .../workflow/tasks/ImportGeoPackage.java | 2 +- .../workflow/tasks/ImportGeoParquet.java | 2 +- .../baremaps/workflow/tasks/ImportOsmOsc.java | 6 ++--- .../baremaps/workflow/tasks/ImportOsmPbf.java | 10 ++++----- .../workflow/tasks/ImportShapefile.java | 2 +- .../workflow/tasks/UpdateOsmDatabase.java | 14 ++++++------ .../postgres/HeaderRepositoryTest.java | 2 +- .../database/postgres/NodeRepositoryTest.java | 4 ++-- .../postgres/RelationRepositoryTest.java | 4 ++-- .../database/postgres/WayRepositoryTest.java | 4 ++-- .../repository/BlockImporterTest.java | 2 +- .../database/repository/Constants.java | 14 ++++++------ .../utils/ProjectionTransformerTest.java | 2 +- .../tasks/ImportUpdateSampleTest.java | 4 ++-- baremaps-openstreetmap/pom.xml | 5 +++++ .../{ => format}/OpenStreetMap.java | 12 +++++----- .../function/BlobToBlockMapper.java | 12 +++++----- .../function/BlockEntitiesHandler.java | 12 +++++----- .../function/ChangeEntitiesHandler.java | 6 ++--- .../function/CoordinateMapBuilder.java | 6 ++--- .../function/EntityGeometryBuilder.java | 10 ++++----- .../function/EntityProjectionTransformer.java | 6 ++--- .../function/EntityToGeometryMapper.java | 6 ++--- .../function/GeometryMapBuilder.java | 6 ++--- .../function/NodeGeometryBuilder.java | 6 ++--- .../function/ProjectionTransformer.java | 6 ++--- .../function/ReferenceMapBuilder.java | 6 ++--- .../function/RelationMultiPolygonBuilder.java | 12 +++++----- .../function/WayGeometryBuilder.java | 6 ++--- .../{ => format}/model/Blob.java | 2 +- .../{ => format}/model/Block.java | 2 +- .../{ => format}/model/Bound.java | 2 +- .../{ => format}/model/Change.java | 2 +- .../{ => format}/model/DataBlock.java | 2 +- .../{ => format}/model/Element.java | 2 +- .../{ => format}/model/Entity.java | 2 +- .../{ => format}/model/Header.java | 2 +- .../{ => format}/model/HeaderBlock.java | 2 +- .../{ => format}/model/Info.java | 2 +- .../{ => format}/model/Member.java | 2 +- .../{ => format}/model/Node.java | 2 +- .../{ => format}/model/Relation.java | 2 +- .../{ => format}/model/State.java | 2 +- .../{ => format}/model/User.java | 2 +- .../openstreetmap/{ => format}/model/Way.java | 2 +- .../{ => format}/pbf/BlobIterator.java | 4 ++-- .../{ => format}/pbf/DataBlockReader.java | 20 ++++++++--------- .../{ => format}/pbf/HeaderBlockReader.java | 12 +++++----- .../{ => format}/pbf/PbfBlockReader.java | 10 ++++----- .../{ => format}/pbf/PbfEntityReader.java | 10 ++++----- .../{ => format}/pbf/PbfReader.java | 4 ++-- .../{ => format}/state/StateReader.java | 6 ++--- .../stream/AccumulatingConsumer.java | 2 +- .../stream/BatchedSpliterator.java | 2 +- .../stream/BufferedSpliterator.java | 2 +- .../{ => format}/stream/ConsumerUtils.java | 2 +- .../{ => format}/stream/HoldingConsumer.java | 2 +- .../stream/PartitionedSpliterator.java | 2 +- .../{ => format}/stream/ProgressLogger.java | 2 +- .../{ => format}/stream/StreamException.java | 2 +- .../{ => format}/stream/StreamUtils.java | 8 +++---- .../{ => format}/stream/SupplierUtils.java | 2 +- .../{ => format}/stream/ThrowingFunction.java | 2 +- .../{ => format}/utils/CRSUtils.java | 2 +- .../{ => format}/utils/GeometryUtils.java | 4 ++-- .../{ => format}/xml/XmlChangeReader.java | 6 ++--- .../xml/XmlChangeSpliterator.java | 20 ++++++++--------- .../{ => format}/xml/XmlEntityReader.java | 16 +++++++------- .../xml/XmlEntitySpliterator.java | 20 ++++++++--------- .../store}/OpenStreetMapDataTable.java | 6 ++--- .../{ => format}/OsmDataTest.java | 10 ++++----- .../{ => format}/OsmSampleTest.java | 22 +++++++++---------- .../EntityDataTypeGeometryBuilderTest.java | 18 +++++++-------- .../{ => format}/state/StateReaderTest.java | 2 +- .../stream/BatchedSpliteratorTest.java | 2 +- .../stream/PartitionedSpliteratorTest.java | 2 +- .../{ => format}/stream/StreamUtilsTest.java | 2 +- .../xml/XmlChangeSpliteratorTest.java | 8 +++---- .../xml/XmlEntitySpliteratorTest.java | 8 +++---- .../store}/OpenStreetMapDataTableTest.java | 4 ++-- .../baremaps/server/GeocoderResource.java | 2 +- 100 files changed, 277 insertions(+), 272 deletions(-) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/OpenStreetMap.java (90%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/BlobToBlockMapper.java (78%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/BlockEntitiesHandler.java (82%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/ChangeEntitiesHandler.java (88%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/CoordinateMapBuilder.java (89%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/EntityGeometryBuilder.java (89%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/EntityProjectionTransformer.java (90%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/EntityToGeometryMapper.java (90%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/GeometryMapBuilder.java (90%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/NodeGeometryBuilder.java (88%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/ProjectionTransformer.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/ReferenceMapBuilder.java (89%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/RelationMultiPolygonBuilder.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/function/WayGeometryBuilder.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Blob.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Block.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Bound.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Change.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/DataBlock.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Element.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Entity.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Header.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/HeaderBlock.java (96%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Info.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Member.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Node.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Relation.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/State.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/User.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/model/Way.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/BlobIterator.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/DataBlockReader.java (93%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/HeaderBlockReader.java (89%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/PbfBlockReader.java (91%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/PbfEntityReader.java (91%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/pbf/PbfReader.java (90%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/state/StateReader.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/AccumulatingConsumer.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/BatchedSpliterator.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/BufferedSpliterator.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/ConsumerUtils.java (96%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/HoldingConsumer.java (95%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/PartitionedSpliterator.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/ProgressLogger.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/StreamException.java (96%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/StreamUtils.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/SupplierUtils.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/stream/ThrowingFunction.java (98%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/utils/CRSUtils.java (97%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/utils/GeometryUtils.java (96%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlChangeReader.java (87%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlChangeSpliterator.java (94%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlEntityReader.java (83%) rename baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlEntitySpliterator.java (95%) rename {baremaps-core/src/main/java/org/apache/baremaps/storage/openstreetmap => baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store}/OpenStreetMapDataTable.java (96%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/OsmDataTest.java (96%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/OsmSampleTest.java (84%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/geometry/EntityDataTypeGeometryBuilderTest.java (93%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/state/StateReaderTest.java (95%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/stream/BatchedSpliteratorTest.java (98%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/stream/PartitionedSpliteratorTest.java (98%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/stream/StreamUtilsTest.java (97%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlChangeSpliteratorTest.java (89%) rename baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/{ => format}/xml/XmlEntitySpliteratorTest.java (87%) rename {baremaps-core/src/test/java/org/apache/baremaps/storage/openstreetmap => baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store}/OpenStreetMapDataTableTest.java (93%) diff --git a/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java b/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java index 9328dd796..6def972c4 100644 --- a/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java +++ b/baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java @@ -24,8 +24,8 @@ import java.util.concurrent.Callable; import org.apache.baremaps.maplibre.tileset.Tileset; import org.apache.baremaps.maplibre.tileset.TilesetLayer; -import org.apache.baremaps.openstreetmap.stream.ProgressLogger; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.stream.ProgressLogger; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.apache.baremaps.tilestore.TileCoord; import org.apache.baremaps.tilestore.TileEntry; import org.apache.baremaps.tilestore.TileStoreException; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/DiffService.java b/baremaps-core/src/main/java/org/apache/baremaps/database/DiffService.java index 4a042a2a1..e87ba5fbe 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/DiffService.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/DiffService.java @@ -17,7 +17,7 @@ package org.apache.baremaps.database; -import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; import java.io.BufferedInputStream; import java.net.MalformedURLException; @@ -30,12 +30,12 @@ import java.util.zip.GZIPInputStream; import org.apache.baremaps.database.postgres.HeaderRepository; import org.apache.baremaps.database.postgres.Repository; -import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.function.EntityToGeometryMapper; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; -import org.apache.baremaps.openstreetmap.model.*; -import org.apache.baremaps.openstreetmap.stream.StreamException; -import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.format.function.EntityToGeometryMapper; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; import org.apache.baremaps.tilestore.TileCoord; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.Geometry; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/function/BlockImporter.java b/baremaps-core/src/main/java/org/apache/baremaps/database/function/BlockImporter.java index ece69d65a..1bd73a95a 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/function/BlockImporter.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/function/BlockImporter.java @@ -21,8 +21,8 @@ import java.util.function.Consumer; import org.apache.baremaps.database.postgres.Repository; -import org.apache.baremaps.openstreetmap.model.*; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; /** A consumer for importing OpenStreetMap blocks in a database. */ public class BlockImporter implements Consumer { diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/function/ChangeElementsImporter.java b/baremaps-core/src/main/java/org/apache/baremaps/database/function/ChangeElementsImporter.java index 01cc8af10..ba20a676d 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/function/ChangeElementsImporter.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/function/ChangeElementsImporter.java @@ -20,8 +20,8 @@ import java.util.function.Consumer; import org.apache.baremaps.database.postgres.Repository; import org.apache.baremaps.database.postgres.RepositoryException; -import org.apache.baremaps.openstreetmap.model.Change; -import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Change; +import org.apache.baremaps.openstreetmap.format.model.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/function/CopyChangeImporter.java b/baremaps-core/src/main/java/org/apache/baremaps/database/function/CopyChangeImporter.java index 47586b95e..d064b3ef6 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/function/CopyChangeImporter.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/function/CopyChangeImporter.java @@ -22,7 +22,7 @@ import java.util.function.Consumer; import org.apache.baremaps.database.postgres.Repository; import org.apache.baremaps.database.postgres.RepositoryException; -import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.format.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/function/PutChangeImporter.java b/baremaps-core/src/main/java/org/apache/baremaps/database/function/PutChangeImporter.java index 4d1e24b68..f36c32081 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/function/PutChangeImporter.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/function/PutChangeImporter.java @@ -23,7 +23,7 @@ import java.util.function.Consumer; import org.apache.baremaps.database.postgres.Repository; import org.apache.baremaps.database.postgres.RepositoryException; -import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.format.model.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/HeaderRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/HeaderRepository.java index d2dcfac12..d7bde45cd 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/HeaderRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/HeaderRepository.java @@ -31,7 +31,7 @@ import java.util.Map; import javax.sql.DataSource; import org.apache.baremaps.database.copy.CopyWriter; -import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Header; import org.postgresql.PGConnection; import org.postgresql.copy.PGCopyOutputStream; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/NodeRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/NodeRepository.java index 326ae9d90..6f02c2d3d 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/NodeRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/NodeRepository.java @@ -31,9 +31,9 @@ import java.util.Map; import javax.sql.DataSource; import org.apache.baremaps.database.copy.CopyWriter; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; import org.postgresql.copy.PGCopyOutputStream; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/RelationRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/RelationRepository.java index a37f02b87..bd17b1c82 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/RelationRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/RelationRepository.java @@ -27,11 +27,11 @@ import java.util.*; import javax.sql.DataSource; import org.apache.baremaps.database.copy.CopyWriter; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; import org.postgresql.copy.PGCopyOutputStream; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/WayRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/WayRepository.java index 63fd1426e..54bf3fe3a 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/WayRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/database/postgres/WayRepository.java @@ -34,9 +34,9 @@ import java.util.Map; import javax.sql.DataSource; import org.apache.baremaps.database.copy.CopyWriter; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.locationtech.jts.geom.Geometry; import org.postgresql.PGConnection; import org.postgresql.copy.PGCopyOutputStream; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java index cc478c01f..d60d937fe 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapDocumentMapper.java @@ -20,8 +20,8 @@ import java.util.function.Function; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Node; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.LatLonShape; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java index ab29a2954..52e54fe99 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/geocoder/openstreetmap/OpenStreetMapEntityConsumer.java @@ -18,8 +18,8 @@ package org.apache.baremaps.geocoder.openstreetmap; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Entity; import org.apache.lucene.index.IndexWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java index a98fe058b..b94aea7dd 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/iploc/IpLocRepository.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.stream.Stream; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.locationtech.jts.geom.Coordinate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataTable.java b/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataTable.java index 1ba61fd50..450966805 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataTable.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataTable.java @@ -23,7 +23,7 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; import javax.sql.DataSource; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.apache.baremaps.store.*; import org.locationtech.jts.geom.*; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateGeocoderOpenStreetMap.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateGeocoderOpenStreetMap.java index 62f1a1b7f..2029e0bfb 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateGeocoderOpenStreetMap.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateGeocoderOpenStreetMap.java @@ -25,8 +25,8 @@ import java.util.StringJoiner; import org.apache.baremaps.geocoder.GeocoderConstants; import org.apache.baremaps.geocoder.openstreetmap.OpenStreetMapEntityConsumer; -import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.apache.lucene.index.IndexWriter; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateIplocIndex.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateIplocIndex.java index 7d1d1b6a7..133a0c3b9 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateIplocIndex.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/CreateIplocIndex.java @@ -26,7 +26,7 @@ import java.util.StringJoiner; import org.apache.baremaps.iploc.IpLocReader; import org.apache.baremaps.iploc.IpLocRepository; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.apache.lucene.search.SearcherFactory; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java index 646b15a10..d1d123c55 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java @@ -32,8 +32,8 @@ import org.apache.baremaps.maplibre.style.Style; import org.apache.baremaps.maplibre.tileset.Tileset; import org.apache.baremaps.maplibre.tileset.TilesetQuery; -import org.apache.baremaps.openstreetmap.stream.ProgressLogger; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.stream.ProgressLogger; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.apache.baremaps.tilestore.*; import org.apache.baremaps.tilestore.file.FileTileStore; import org.apache.baremaps.tilestore.mbtiles.MBTilesStore; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightFeatures.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightFeatures.java index 8ff7b3ea1..1481545c6 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightFeatures.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightFeatures.java @@ -25,7 +25,7 @@ import java.util.Map; import java.util.StringJoiner; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Element; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.slf4j.Logger; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java index b99e073d0..bf1d1b046 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportDaylightTranslations.java @@ -24,7 +24,7 @@ import java.util.StringJoiner; import java.util.stream.Collectors; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Element; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.slf4j.Logger; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoPackage.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoPackage.java index e3a94b42a..630feacf6 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoPackage.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoPackage.java @@ -20,7 +20,7 @@ import java.nio.file.Path; import java.util.StringJoiner; import org.apache.baremaps.geopackage.store.GeoPackageDataStore; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; import org.apache.baremaps.storage.postgres.PostgresDataStore; import org.apache.baremaps.store.DataTableGeometryMapper; import org.apache.baremaps.store.DataTableMapper; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoParquet.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoParquet.java index 70fb08b35..ad2959154 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoParquet.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportGeoParquet.java @@ -21,7 +21,7 @@ import java.util.StringJoiner; import org.apache.baremaps.geoparquet.store.GeoParquetDataStore; import org.apache.baremaps.geoparquet.store.GeoParquetDataTable; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; import org.apache.baremaps.storage.postgres.PostgresDataStore; import org.apache.baremaps.store.DataTableGeometryMapper; import org.apache.baremaps.store.DataTableMapper; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmOsc.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmOsc.java index 8a2c3864b..d613125d4 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmOsc.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmOsc.java @@ -17,7 +17,7 @@ package org.apache.baremaps.workflow.tasks; -import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; import java.io.BufferedInputStream; import java.nio.file.Files; @@ -25,8 +25,8 @@ import java.util.StringJoiner; import org.apache.baremaps.database.function.CopyChangeImporter; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.function.*; -import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.format.function.*; +import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; import org.apache.baremaps.utils.Compression; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmPbf.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmPbf.java index 01762d10b..cc49a11d9 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmPbf.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportOsmPbf.java @@ -27,11 +27,11 @@ import java.util.StringJoiner; import org.apache.baremaps.database.function.BlockImporter; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.locationtech.jts.geom.Coordinate; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportShapefile.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportShapefile.java index 4ba8f9c17..ed0d7922a 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportShapefile.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ImportShapefile.java @@ -19,7 +19,7 @@ import java.nio.file.Path; import java.util.StringJoiner; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; import org.apache.baremaps.shapefile.store.ShapefileDataTable; import org.apache.baremaps.storage.postgres.PostgresDataStore; import org.apache.baremaps.store.DataTableGeometryMapper; diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/UpdateOsmDatabase.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/UpdateOsmDatabase.java index 3decfcedb..6954a4406 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/UpdateOsmDatabase.java +++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/UpdateOsmDatabase.java @@ -25,13 +25,13 @@ import java.util.zip.GZIPInputStream; import org.apache.baremaps.database.function.ChangeElementsImporter; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.function.*; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.state.StateReader; -import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.format.function.*; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.state.StateReader; +import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; import org.apache.baremaps.workflow.Task; import org.apache.baremaps.workflow.WorkflowContext; import org.locationtech.jts.geom.Coordinate; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/HeaderRepositoryTest.java b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/HeaderRepositoryTest.java index 7a1b4a4a3..65c4406b9 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/HeaderRepositoryTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/HeaderRepositoryTest.java @@ -26,7 +26,7 @@ import java.util.Arrays; import java.util.List; -import org.apache.baremaps.openstreetmap.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Header; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/NodeRepositoryTest.java b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/NodeRepositoryTest.java index 1c34b3622..e2acaa5bd 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/NodeRepositoryTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/NodeRepositoryTest.java @@ -24,8 +24,8 @@ import java.util.Arrays; import java.util.List; import org.apache.baremaps.database.repository.Constants; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Node; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/RelationRepositoryTest.java b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/RelationRepositoryTest.java index 4c3be761b..17d8c5837 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/RelationRepositoryTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/RelationRepositoryTest.java @@ -24,8 +24,8 @@ import java.util.Arrays; import java.util.List; import org.apache.baremaps.database.repository.Constants; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Relation; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/WayRepositoryTest.java b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/WayRepositoryTest.java index bd996295d..629e4c5bd 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/WayRepositoryTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/postgres/WayRepositoryTest.java @@ -24,8 +24,8 @@ import java.util.Arrays; import java.util.List; import org.apache.baremaps.database.repository.Constants; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Way; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/repository/BlockImporterTest.java b/baremaps-core/src/test/java/org/apache/baremaps/database/repository/BlockImporterTest.java index 0980c4c19..c6b75785f 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/repository/BlockImporterTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/repository/BlockImporterTest.java @@ -29,7 +29,7 @@ import org.apache.baremaps.database.PostgresContainerTest; import org.apache.baremaps.database.function.BlockImporter; import org.apache.baremaps.database.postgres.*; -import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; import org.apache.baremaps.utils.PostgresUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/database/repository/Constants.java b/baremaps-core/src/test/java/org/apache/baremaps/database/repository/Constants.java index f09f57342..54dc5ac30 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/database/repository/Constants.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/database/repository/Constants.java @@ -22,13 +22,13 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.time.LocalDateTime; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.PrecisionModel; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java b/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java index 2f5faba8f..1a955ca45 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/utils/ProjectionTransformerTest.java @@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateSampleTest.java b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateSampleTest.java index d91627d3b..98578a3b9 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateSampleTest.java +++ b/baremaps-core/src/test/java/org/apache/baremaps/workflow/tasks/ImportUpdateSampleTest.java @@ -38,8 +38,8 @@ import org.apache.baremaps.database.postgres.ReferenceMap; import org.apache.baremaps.database.postgres.RelationRepository; import org.apache.baremaps.database.postgres.WayRepository; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.state.StateReader; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.state.StateReader; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/pom.xml b/baremaps-openstreetmap/pom.xml index b6c3830c0..439f144a7 100644 --- a/baremaps-openstreetmap/pom.xml +++ b/baremaps-openstreetmap/pom.xml @@ -13,9 +13,14 @@ com.google.protobuf protobuf-java + + org.apache.baremaps + baremaps-store + org.apache.baremaps baremaps-testing + test org.locationtech.jts diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMap.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMap.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMap.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMap.java index a9c2a3d3a..842133348 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/OpenStreetMap.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/OpenStreetMap.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap; +package org.apache.baremaps.openstreetmap.format; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.pbf.PbfBlockReader; -import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.state.StateReader; -import org.apache.baremaps.openstreetmap.xml.XmlChangeReader; -import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.format.pbf.PbfBlockReader; +import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.format.state.StateReader; +import org.apache.baremaps.openstreetmap.format.xml.XmlChangeReader; +import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; import org.locationtech.jts.geom.Coordinate; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java similarity index 78% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java index d8b82fff9..15ea0da7a 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlobToBlockMapper.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlobToBlockMapper.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.function.Function; -import org.apache.baremaps.openstreetmap.model.Blob; -import org.apache.baremaps.openstreetmap.model.Block; -import org.apache.baremaps.openstreetmap.pbf.DataBlockReader; -import org.apache.baremaps.openstreetmap.pbf.HeaderBlockReader; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Blob; +import org.apache.baremaps.openstreetmap.format.model.Block; +import org.apache.baremaps.openstreetmap.format.pbf.DataBlockReader; +import org.apache.baremaps.openstreetmap.format.pbf.HeaderBlockReader; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; /** * Maps a blob to a block. diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java similarity index 82% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java index ec4f73dd6..5222ea792 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/BlockEntitiesHandler.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/BlockEntitiesHandler.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Block; -import org.apache.baremaps.openstreetmap.model.DataBlock; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Block; +import org.apache.baremaps.openstreetmap.format.model.DataBlock; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; /** Represents an operation on the entities of blocks of different types. */ public class BlockEntitiesHandler implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java similarity index 88% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java index 8b92a1130..3ff4ee641 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ChangeEntitiesHandler.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ChangeEntitiesHandler.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Change; -import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Change; +import org.apache.baremaps.openstreetmap.format.model.Entity; /** Represents an operation on the entities of a change. */ public class ChangeEntitiesHandler implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java index 3686b3ffb..c55b68f10 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/CoordinateMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/CoordinateMapBuilder.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Node; import org.locationtech.jts.geom.Coordinate; /** A consumer that stores openstreetmap coordinates in a map. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java index 7c1080d58..7893fda86 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityGeometryBuilder.java @@ -15,17 +15,17 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; import org.locationtech.jts.geom.*; /** A consumer that builds and sets the geometry of OpenStreetMap entities via side effects. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java index 238fcb8cf..57e35997c 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityProjectionTransformer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityProjectionTransformer.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Entity; /** Changes the projection of the geometry of an entity via side-effects. */ public class EntityProjectionTransformer implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java index 6d6b4453f..e40f75b38 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/EntityToGeometryMapper.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/EntityToGeometryMapper.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.Optional; import java.util.function.Function; -import org.apache.baremaps.openstreetmap.model.*; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.*; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.locationtech.jts.geom.Geometry; /** A function that maps an {@code Entity} to its {@code Geometry}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java index 52e189e0b..34ef1de33 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/GeometryMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/GeometryMapBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.Map; import java.util.function.Consumer; import java.util.function.Predicate; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Entity; import org.locationtech.jts.geom.Geometry; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java similarity index 88% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java index 7c10eddda..a8397385d 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/NodeGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/NodeGeometryBuilder.java @@ -15,12 +15,12 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Node; import org.locationtech.jts.geom.*; /** diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java index b7b82d0b7..4c2bf8a37 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ProjectionTransformer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ProjectionTransformer.java @@ -15,14 +15,14 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.Objects; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.utils.CRSUtils; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.utils.CRSUtils; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.impl.CoordinateArraySequence; import org.locationtech.jts.geom.util.GeometryTransformer; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java index b0d042a33..efc179c78 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/ReferenceMapBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/ReferenceMapBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Way; /** A consumer that stores openstreetmap references in a map. */ public class ReferenceMapBuilder implements Consumer { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java index e406d5924..ebf411cf0 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/RelationMultiPolygonBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/RelationMultiPolygonBuilder.java @@ -15,18 +15,18 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.utils.GeometryUtils; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.utils.GeometryUtils; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.prep.PreparedGeometryFactory; import org.locationtech.jts.geom.util.GeometryFixer; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java index 1df439ac6..f2b4756e2 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/function/WayGeometryBuilder.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/function/WayGeometryBuilder.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.function; +package org.apache.baremaps.openstreetmap.format.function; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Way; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Way; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.util.GeometryFixer; import org.slf4j.Logger; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java index 337c8b35d..7b6ba1697 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Blob.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Blob.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java index 815c93ed6..53e36e63b 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Block.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Block.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; /** Represents a block of data in an OpenStreetMap dataset. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java index fc798f521..976402683 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Bound.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Bound.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; /** Represents the bounds of an OpenStreetMap dataset. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java index 868df68e6..6870bf361 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Change.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Change.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java index f28d6bbc8..13862f291 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/DataBlock.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/DataBlock.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java index 676b7666f..4f0a0910f 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Element.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Element.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java index e2476df80..90dfbf560 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Entity.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Entity.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java index cf692df38..c33983c6b 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Header.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Header.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java index b683db8a2..f0684663d 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/HeaderBlock.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/HeaderBlock.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java index 284d10faa..ad2923db5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Info.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Info.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java index 1f73d4d2e..2944f5bde 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Member.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Member.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java index 4b340cca6..6abe4ca4b 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Node.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Node.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java index 03496cc31..bb8c04ac3 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Relation.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Relation.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java index 3795825f4..f6bf49f68 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/State.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/State.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java index 734af1af5..9e95ba1c8 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/User.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/User.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java index c9bb9b558..f2209a967 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/model/Way.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/model/Way.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.model; +package org.apache.baremaps.openstreetmap.format.model; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java index c5c437c15..f59c4918d 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/BlobIterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/BlobIterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; @@ -24,7 +24,7 @@ import java.io.InputStream; import java.util.Iterator; import java.util.NoSuchElementException; -import org.apache.baremaps.openstreetmap.model.Blob; +import org.apache.baremaps.openstreetmap.format.model.Blob; import org.apache.baremaps.osm.binary.Fileformat; /** An iterator over the blobs of an OpenStreetMap PBF {@code InputStream}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java similarity index 93% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java index 3ceaadb4e..875b5377c 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/DataBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/DataBlockReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; @@ -29,15 +29,15 @@ import java.util.TimeZone; import java.util.function.Consumer; import java.util.zip.DataFormatException; -import org.apache.baremaps.openstreetmap.model.Blob; -import org.apache.baremaps.openstreetmap.model.DataBlock; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Blob; +import org.apache.baremaps.openstreetmap.format.model.DataBlock; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.apache.baremaps.osm.binary.Osmformat; import org.apache.baremaps.osm.binary.Osmformat.DenseNodes; import org.apache.baremaps.osm.binary.Osmformat.PrimitiveGroup; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java similarity index 89% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java index e0f873bcc..bdd8bfd15 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/HeaderBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/HeaderBlockReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; @@ -24,11 +24,11 @@ import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.zip.DataFormatException; -import org.apache.baremaps.openstreetmap.model.Blob; -import org.apache.baremaps.openstreetmap.model.Bound; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Blob; +import org.apache.baremaps.openstreetmap.format.model.Bound; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.apache.baremaps.osm.binary.Osmformat; import org.apache.baremaps.osm.binary.Osmformat.HeaderBBox; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java similarity index 91% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java index 52e5e26a9..c15a6cb47 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfBlockReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfBlockReader.java @@ -15,16 +15,16 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.function.*; -import org.apache.baremaps.openstreetmap.model.Block; -import org.apache.baremaps.openstreetmap.stream.ConsumerUtils; -import org.apache.baremaps.openstreetmap.stream.StreamUtils; +import org.apache.baremaps.openstreetmap.format.function.*; +import org.apache.baremaps.openstreetmap.format.model.Block; +import org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils; +import org.apache.baremaps.openstreetmap.format.stream.StreamUtils; import org.locationtech.jts.geom.Coordinate; /** A utility class for reading an OpenStreetMap pbf file. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java similarity index 91% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java index 0f5abc7b3..016f41346 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfEntityReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfEntityReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; @@ -23,10 +23,10 @@ import java.util.List; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.model.DataBlock; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.HeaderBlock; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.DataBlock; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.HeaderBlock; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.locationtech.jts.geom.Coordinate; /** A utility class for flattening the blocks streamed by a {@link PbfBlockReader}. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java similarity index 90% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java index 7df0b4b26..928f22c89 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/pbf/PbfReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/pbf/PbfReader.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.pbf; +package org.apache.baremaps.openstreetmap.format.pbf; -import org.apache.baremaps.openstreetmap.OpenStreetMap.EntityReader; +import org.apache.baremaps.openstreetmap.format.OpenStreetMap.EntityReader; public interface PbfReader extends EntityReader { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java index 25f0a3cd1..bf38057d7 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/state/StateReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/state/StateReader.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.state; +package org.apache.baremaps.openstreetmap.format.state; import com.google.common.io.CharStreams; @@ -32,8 +32,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Optional; -import org.apache.baremaps.openstreetmap.OpenStreetMap.Reader; -import org.apache.baremaps.openstreetmap.model.State; +import org.apache.baremaps.openstreetmap.format.OpenStreetMap.Reader; +import org.apache.baremaps.openstreetmap.format.model.State; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java index e9ffb95ee..87faf1648 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/AccumulatingConsumer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/AccumulatingConsumer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java index 5736c6dd2..7867de759 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java index cfde53df6..66c1b6751 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/BufferedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/BufferedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java index f36733ce4..1dbf0b28b 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ConsumerUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ConsumerUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java index 8cdf22b58..e05532cdf 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/HoldingConsumer.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/HoldingConsumer.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java index 68285143e..d9efd9666 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java index 168f487b2..cdca1ace5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ProgressLogger.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ProgressLogger.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java index bc3d162b7..30cd70c50 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamException.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; /** * When a checked exception occurs in a stream, it is a good practice to wrap that exception in an diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java index 5b633f857..782ade920 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/StreamUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; @@ -28,9 +28,9 @@ import java.util.function.Function; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.CompletionOrder; -import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.InCompletionOrder; -import org.apache.baremaps.openstreetmap.stream.BufferedSpliterator.InSourceOrder; +import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.CompletionOrder; +import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.InCompletionOrder; +import org.apache.baremaps.openstreetmap.format.stream.BufferedSpliterator.InSourceOrder; /** Utility methods for creating parallel, buffered and batched streams of unknown size. */ public class StreamUtils { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java index eef97e8e0..3fd77d634 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/SupplierUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/SupplierUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java similarity index 98% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java index 5a59c3f5c..9d5d1fd7a 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/stream/ThrowingFunction.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/stream/ThrowingFunction.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; import static java.util.Objects.requireNonNull; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java similarity index 97% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java index cb20f8b06..a64057210 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/CRSUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/CRSUtils.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.utils; +package org.apache.baremaps.openstreetmap.format.utils; import org.locationtech.proj4j.CRSFactory; import org.locationtech.proj4j.CoordinateReferenceSystem; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java similarity index 96% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java index d58944096..b4f101e8a 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/utils/GeometryUtils.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/utils/GeometryUtils.java @@ -15,11 +15,11 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.utils; +package org.apache.baremaps.openstreetmap.format.utils; import static org.locationtech.jts.io.WKBConstants.wkbNDR; -import org.apache.baremaps.openstreetmap.function.ProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ProjectionTransformer; import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.util.AffineTransformation; import org.locationtech.jts.io.ParseException; diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java similarity index 87% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java index 879d14f8a..8bb493936 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeReader.java @@ -15,15 +15,15 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; import java.io.InputStream; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.OpenStreetMap.Reader; -import org.apache.baremaps.openstreetmap.model.Change; +import org.apache.baremaps.openstreetmap.format.OpenStreetMap.Reader; +import org.apache.baremaps.openstreetmap.format.model.Change; /** A utility class for parsing an OpenStreetMap change file. */ public class XmlChangeReader implements Reader> { diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java similarity index 94% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java index e52e9531f..cd6ee95bf 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; import static javax.xml.stream.XMLInputFactory.IS_COALESCING; import static javax.xml.stream.XMLInputFactory.IS_NAMESPACE_AWARE; @@ -38,15 +38,15 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.baremaps.openstreetmap.model.Change; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Change; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; /** * An object for traversing an OpenStreetMap XML file describing changes (osc.xml) and creating a diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java similarity index 83% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java index 2fa297122..f5cec80c5 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntityReader.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntityReader.java @@ -15,23 +15,23 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; -import static org.apache.baremaps.openstreetmap.stream.ConsumerUtils.consumeThenReturn; +import static org.apache.baremaps.openstreetmap.format.stream.ConsumerUtils.consumeThenReturn; import java.io.InputStream; import java.util.List; import java.util.Map; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import org.apache.baremaps.openstreetmap.OpenStreetMap.EntityReader; -import org.apache.baremaps.openstreetmap.function.CoordinateMapBuilder; -import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.function.EntityProjectionTransformer; -import org.apache.baremaps.openstreetmap.function.ReferenceMapBuilder; -import org.apache.baremaps.openstreetmap.model.Entity; +import org.apache.baremaps.openstreetmap.format.OpenStreetMap.EntityReader; +import org.apache.baremaps.openstreetmap.format.function.CoordinateMapBuilder; +import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.format.function.EntityProjectionTransformer; +import org.apache.baremaps.openstreetmap.format.function.ReferenceMapBuilder; +import org.apache.baremaps.openstreetmap.format.model.Entity; import org.locationtech.jts.geom.Coordinate; /** A utility class for parsing an OpenStreetMap XML file. */ diff --git a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java similarity index 95% rename from baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java index b94346ad5..2f7a6e608 100644 --- a/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliterator.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliterator.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; import static javax.xml.stream.XMLInputFactory.IS_COALESCING; import static javax.xml.stream.XMLInputFactory.IS_NAMESPACE_AWARE; @@ -40,15 +40,15 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.baremaps.openstreetmap.model.Bound; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.model.Bound; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; /** * An object for traversing an OpenStreetMap XML file describing entities (osm.xml) and creating a diff --git a/baremaps-core/src/main/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTable.java b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java similarity index 96% rename from baremaps-core/src/main/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTable.java rename to baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java index 80d55d6d6..20bd0964e 100644 --- a/baremaps-core/src/main/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTable.java +++ b/baremaps-openstreetmap/src/main/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTable.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.storage.openstreetmap; +package org.apache.baremaps.openstreetmap.store; import java.io.InputStream; import java.util.*; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.OpenStreetMap.EntityReader; -import org.apache.baremaps.openstreetmap.model.*; +import org.apache.baremaps.openstreetmap.format.OpenStreetMap.EntityReader; +import org.apache.baremaps.openstreetmap.format.model.*; import org.apache.baremaps.store.*; /** diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java similarity index 96% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java index b6921e1ad..07668062f 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmDataTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmDataTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap; +package org.apache.baremaps.openstreetmap.format; import static org.apache.baremaps.testing.TestFiles.resolve; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -26,10 +26,10 @@ import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.model.Element; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.format.model.Element; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; import org.jetbrains.annotations.NotNull; import org.junit.Assert; import org.junit.jupiter.api.DynamicTest; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java similarity index 84% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java index 4236377c5..164b8a7ee 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/OsmSampleTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/OsmSampleTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap; +package org.apache.baremaps.openstreetmap.format; import java.io.IOException; @@ -24,16 +24,16 @@ import java.time.LocalDateTime; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Stream; -import org.apache.baremaps.openstreetmap.model.Bound; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.model.Header; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.State; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; -import org.apache.baremaps.openstreetmap.state.StateReader; -import org.apache.baremaps.openstreetmap.xml.XmlEntityReader; +import org.apache.baremaps.openstreetmap.format.model.Bound; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.model.Header; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.State; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.format.state.StateReader; +import org.apache.baremaps.openstreetmap.format.xml.XmlEntityReader; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java similarity index 93% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java index 5e15daebe..968ac7bab 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/geometry/EntityDataTypeGeometryBuilderTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/geometry/EntityDataTypeGeometryBuilderTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.geometry; +package org.apache.baremaps.openstreetmap.format.geometry; import static org.junit.jupiter.api.Assertions.*; @@ -27,14 +27,14 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import org.apache.baremaps.openstreetmap.function.EntityGeometryBuilder; -import org.apache.baremaps.openstreetmap.model.Info; -import org.apache.baremaps.openstreetmap.model.Member; -import org.apache.baremaps.openstreetmap.model.Member.MemberType; -import org.apache.baremaps.openstreetmap.model.Node; -import org.apache.baremaps.openstreetmap.model.Relation; -import org.apache.baremaps.openstreetmap.model.Way; -import org.apache.baremaps.openstreetmap.utils.CRSUtils; +import org.apache.baremaps.openstreetmap.format.function.EntityGeometryBuilder; +import org.apache.baremaps.openstreetmap.format.model.Info; +import org.apache.baremaps.openstreetmap.format.model.Member; +import org.apache.baremaps.openstreetmap.format.model.Member.MemberType; +import org.apache.baremaps.openstreetmap.format.model.Node; +import org.apache.baremaps.openstreetmap.format.model.Relation; +import org.apache.baremaps.openstreetmap.format.model.Way; +import org.apache.baremaps.openstreetmap.format.utils.CRSUtils; import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java similarity index 95% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java index b06de0f1d..1fef8c1f0 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/state/StateReaderTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/state/StateReaderTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.state; +package org.apache.baremaps.openstreetmap.format.state; import static org.junit.jupiter.api.Assertions.*; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java similarity index 98% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java index f09d051e1..f36a205bd 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/BatchedSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/BatchedSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java similarity index 98% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java index 14bb58958..36465ed35 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/PartitionedSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/PartitionedSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java similarity index 97% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java index ee0c3889b..2dd663bf1 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/stream/StreamUtilsTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/stream/StreamUtilsTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.stream; +package org.apache.baremaps.openstreetmap.format.stream; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java similarity index 89% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java index c7b23d2dc..8e03a9f75 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlChangeSpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlChangeSpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -25,9 +25,9 @@ import java.nio.file.Files; import java.util.Spliterator; import java.util.zip.GZIPInputStream; -import org.apache.baremaps.openstreetmap.model.Change; -import org.apache.baremaps.openstreetmap.stream.AccumulatingConsumer; -import org.apache.baremaps.openstreetmap.stream.HoldingConsumer; +import org.apache.baremaps.openstreetmap.format.model.Change; +import org.apache.baremaps.openstreetmap.format.stream.AccumulatingConsumer; +import org.apache.baremaps.openstreetmap.format.stream.HoldingConsumer; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java similarity index 87% rename from baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java index 50fe0d16c..d13171eb0 100644 --- a/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/xml/XmlEntitySpliteratorTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/format/xml/XmlEntitySpliteratorTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.baremaps.openstreetmap.xml; +package org.apache.baremaps.openstreetmap.format.xml; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -24,9 +24,9 @@ import java.io.InputStream; import java.nio.file.Files; import java.util.Spliterator; -import org.apache.baremaps.openstreetmap.model.Entity; -import org.apache.baremaps.openstreetmap.stream.AccumulatingConsumer; -import org.apache.baremaps.openstreetmap.stream.HoldingConsumer; +import org.apache.baremaps.openstreetmap.format.model.Entity; +import org.apache.baremaps.openstreetmap.format.stream.AccumulatingConsumer; +import org.apache.baremaps.openstreetmap.format.stream.HoldingConsumer; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/baremaps-core/src/test/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTableTest.java b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java similarity index 93% rename from baremaps-core/src/test/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTableTest.java rename to baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java index 4bf3adcbe..bb0d11636 100644 --- a/baremaps-core/src/test/java/org/apache/baremaps/storage/openstreetmap/OpenStreetMapDataTableTest.java +++ b/baremaps-openstreetmap/src/test/java/org/apache/baremaps/openstreetmap/store/OpenStreetMapDataTableTest.java @@ -15,13 +15,13 @@ * limitations under the License. */ -package org.apache.baremaps.storage.openstreetmap; +package org.apache.baremaps.openstreetmap.store; import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.nio.file.Files; -import org.apache.baremaps.openstreetmap.pbf.PbfEntityReader; +import org.apache.baremaps.openstreetmap.format.pbf.PbfEntityReader; import org.apache.baremaps.testing.TestFiles; import org.junit.jupiter.api.Test; diff --git a/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java b/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java index 071e6521e..ee7b7a0b2 100644 --- a/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java +++ b/baremaps-server/src/main/java/org/apache/baremaps/server/GeocoderResource.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.Map; import org.apache.baremaps.geocoder.geonames.GeonamesQueryBuilder; -import org.apache.baremaps.openstreetmap.stream.StreamException; +import org.apache.baremaps.openstreetmap.format.stream.StreamException; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.SearcherManager;