Skip to content

Commit 1eeade4

Browse files
authored
Refactor modules and add data stores (#903)
* Break dependencies between data store and data collection packages * Move the data store package in a dedicated module * Move format specific data store in corresponding modules * Add a data table for openstreetmap data * Add a module and data store for csv data * Add a module and data store for rpsl data * Add a module for the shapefile format and data store * Add a module for the postgres data store * Clean dependencies and improve their scopes
1 parent de8f562 commit 1eeade4

File tree

193 files changed

+1799
-901
lines changed

Some content is hidden

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

193 files changed

+1799
-901
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ examples/transformation/*.pbf
5151

5252
# Benchmarking
5353
baremaps-benchmarking/data/
54+
baremaps-benchmarking/dependency-reduced-pom.xml
5455

5556
# Docs
5657
.jekyll-cache/

baremaps-benchmarking/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<dependency>
2323
<groupId>org.apache.baremaps</groupId>
2424
<artifactId>baremaps-testing</artifactId>
25+
<scope>test</scope>
2526
</dependency>
2627
<dependency>
2728
<groupId>org.openjdk.jmh</groupId>

baremaps-cli/pom.xml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,9 @@ limitations under the License.
5353
<artifactId>baremaps-server</artifactId>
5454
</dependency>
5555
<dependency>
56-
<groupId>org.apache.logging.log4j</groupId>
57-
<artifactId>log4j-api</artifactId>
58-
</dependency>
59-
<dependency>
60-
<groupId>org.apache.logging.log4j</groupId>
61-
<artifactId>log4j-core</artifactId>
62-
</dependency>
63-
<dependency>
64-
<groupId>org.apache.logging.log4j</groupId>
65-
<artifactId>log4j-jul</artifactId>
66-
</dependency>
67-
<dependency>
68-
<groupId>org.apache.logging.log4j</groupId>
69-
<artifactId>log4j-slf4j2-impl</artifactId>
56+
<groupId>org.apache.baremaps</groupId>
57+
<artifactId>baremaps-testing</artifactId>
58+
<scope>test</scope>
7059
</dependency>
7160
</dependencies>
7261

baremaps-cli/src/main/java/org/apache/baremaps/cli/database/ExecuteSql.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class ExecuteSql implements Callable<Integer> {
5050

5151
@Override
5252
public Integer call() throws Exception {
53-
new org.apache.baremaps.workflow.tasks.ExecuteSql(database, file.toAbsolutePath(),
53+
new org.apache.baremaps.tasks.ExecuteSql(database, file.toAbsolutePath(),
5454
parallel).execute(new WorkflowContext());
5555
return 0;
5656
}

baremaps-cli/src/main/java/org/apache/baremaps/cli/database/ImportOsm.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.nio.file.Path;
2323
import java.util.concurrent.Callable;
2424
import org.apache.baremaps.cli.Options;
25+
import org.apache.baremaps.tasks.ImportOsmPbf;
2526
import org.apache.baremaps.workflow.WorkflowContext;
2627
import picocli.CommandLine.Command;
2728
import picocli.CommandLine.Mixin;
@@ -50,7 +51,7 @@ public class ImportOsm implements Callable<Integer> {
5051

5152
@Override
5253
public Integer call() throws Exception {
53-
new org.apache.baremaps.workflow.tasks.ImportOsmPbf(
54+
new ImportOsmPbf(
5455
file.toAbsolutePath(),
5556
database,
5657
srid,

baremaps-cli/src/main/java/org/apache/baremaps/cli/database/UpdateOsm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import java.util.concurrent.Callable;
2323
import org.apache.baremaps.cli.Options;
24+
import org.apache.baremaps.tasks.UpdateOsmDatabase;
2425
import org.apache.baremaps.workflow.WorkflowContext;
25-
import org.apache.baremaps.workflow.tasks.UpdateOsmDatabase;
2626
import picocli.CommandLine.Command;
2727
import picocli.CommandLine.Mixin;
2828
import picocli.CommandLine.Option;

baremaps-cli/src/main/java/org/apache/baremaps/cli/dem/VectorTileContours.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import org.apache.baremaps.maplibre.tileset.TilesetLayer;
2727
import org.apache.baremaps.openstreetmap.stream.ProgressLogger;
2828
import org.apache.baremaps.openstreetmap.stream.StreamUtils;
29+
import org.apache.baremaps.tasks.ExportVectorTiles;
2930
import org.apache.baremaps.tilestore.TileCoord;
3031
import org.apache.baremaps.tilestore.TileEntry;
3132
import org.apache.baremaps.tilestore.TileStoreException;
3233
import org.apache.baremaps.tilestore.pmtiles.PMTilesStore;
3334
import org.apache.baremaps.tilestore.raster.*;
3435
import org.apache.baremaps.workflow.WorkflowException;
35-
import org.apache.baremaps.workflow.tasks.ExportVectorTiles;
3636
import org.locationtech.jts.geom.Envelope;
3737
import picocli.CommandLine.Command;
3838
import picocli.CommandLine.Option;

baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Dev.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
import org.apache.baremaps.config.ConfigReader;
3737
import org.apache.baremaps.maplibre.style.Style;
3838
import org.apache.baremaps.maplibre.tileset.Tileset;
39+
import org.apache.baremaps.postgres.utils.PostgresUtils;
3940
import org.apache.baremaps.server.ChangeResource;
4041
import org.apache.baremaps.server.StyleResource;
4142
import org.apache.baremaps.server.TilesetResource;
4243
import org.apache.baremaps.server.VectorTileResource;
4344
import org.apache.baremaps.tilestore.TileStore;
4445
import org.apache.baremaps.tilestore.postgres.PostgresTileStore;
45-
import org.apache.baremaps.utils.PostgresUtils;
4646
import org.slf4j.Logger;
4747
import org.slf4j.LoggerFactory;
4848
import picocli.CommandLine.Command;

baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Export.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import java.nio.file.Path;
2323
import java.util.concurrent.Callable;
2424
import org.apache.baremaps.cli.Options;
25+
import org.apache.baremaps.tasks.ExportVectorTiles;
2526
import org.apache.baremaps.workflow.WorkflowContext;
26-
import org.apache.baremaps.workflow.tasks.ExportVectorTiles;
2727
import org.slf4j.Logger;
2828
import org.slf4j.LoggerFactory;
2929
import picocli.CommandLine.Command;

baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Serve.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@
3737
import org.apache.baremaps.maplibre.style.Style;
3838
import org.apache.baremaps.maplibre.tilejson.TileJSON;
3939
import org.apache.baremaps.maplibre.tileset.Tileset;
40+
import org.apache.baremaps.postgres.utils.PostgresUtils;
4041
import org.apache.baremaps.server.SearchResource;
4142
import org.apache.baremaps.server.StyleResource;
4243
import org.apache.baremaps.server.TileJSONResource;
4344
import org.apache.baremaps.server.VectorTileResource;
4445
import org.apache.baremaps.tilestore.TileStore;
4546
import org.apache.baremaps.tilestore.postgres.PostgresTileStore;
4647
import org.apache.baremaps.tilestore.vector.VectorTileCache;
47-
import org.apache.baremaps.utils.PostgresUtils;
4848
import org.slf4j.Logger;
4949
import org.slf4j.LoggerFactory;
5050
import picocli.CommandLine.Command;

0 commit comments

Comments
 (0)