-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from GIScience/feat/reorganize
feat: reorganize workspace
- Loading branch information
Showing
22 changed files
with
79 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
**/*.tif | ||
**/*.pbf | ||
Dockerfile | ||
.venv* | ||
# Ignore everything | ||
* | ||
|
||
# Allow | ||
!CMakeLists.txt | ||
!src | ||
!test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ gmted*/* | |
gmteddata | ||
cmake-build-debug | ||
/cmake-build-release/ | ||
/tiffs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
FROM ubuntu:jammy as build | ||
# For Mac with amd chip use | ||
#FROM --platform=linux/amd64 ubuntu:jammy | ||
FROM debian:bookworm-slim | ||
|
||
RUN apt-get -qq update && apt-get -y -qq install apt-utils | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && apt-get -qq install \ | ||
g++ \ | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
g++ \ | ||
cmake \ | ||
ninja-build \ | ||
libgdal-dev \ | ||
libproj-dev \ | ||
libosmium-dev \ | ||
libboost-all-dev | ||
|
||
COPY ./test /src/test | ||
COPY *.h *.cpp CMakeLists.txt /src/ | ||
WORKDIR /src | ||
libgdal-dev \ | ||
libproj-dev \ | ||
libosmium-dev \ | ||
libboost-regex-dev \ | ||
libboost-program-options-dev \ | ||
libboost-test-dev \ | ||
; \ | ||
\ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
COPY . /osm-transform/ | ||
|
||
RUN set -eux; \ | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -G Ninja -S /osm-transform -B /osm-transform/cmake-build ; \ | ||
cmake --build /osm-transform/cmake-build --target osm-transform ; \ | ||
cmake --install /osm-transform/cmake-build | ||
|
||
RUN cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -G Ninja -S /src -B /src/cmake-build | ||
RUN cmake --build /src/cmake-build --target osm-transform | ||
|
||
RUN mkdir /osm | ||
WORKDIR /osm | ||
|
||
ENTRYPOINT ["/src/cmake-build/osm-transform"] | ||
ENTRYPOINT ["/usr/local/bin/osm-transform"]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
docker rm -f osm-transform || true | ||
docker build -t osm-transform . | ||
docker run -it -v .:/osm --name osm-transform --user "$(id -u):$(id -g)" osm-transform $@ | ||
docker run --rm -it -v .:/osm --name osm-transform --user "$(id -u):$(id -g)" osm-transform $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
add_executable(${PROJECT_NAME} osm-transform.cpp ${SOURCE_FILES}) | ||
|
||
target_link_libraries(${PROJECT_NAME} PRIVATE z bz2 expat GDAL::GDAL Boost::regex Boost::program_options) | ||
|
||
install(TARGETS ${PROJECT_NAME} DESTINATION bin) | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
find_package(Boost REQUIRED COMPONENTS unit_test_framework regex) | ||
find_package(GDAL REQUIRED) | ||
|
||
add_executable(test-osm-transform test-osm-transform.cpp | ||
../location_area_service.cpp | ||
../location_elevation_service.cpp | ||
../rewrite_handler.cpp | ||
test_utils.cpp | ||
test_location_area.cpp | ||
test_location_elevation.cpp | ||
test_firstpass_handler.cpp | ||
test_rewrite_handler.cpp | ||
) | ||
target_link_libraries(test-osm-transform PRIVATE Boost::unit_test_framework Boost::regex GDAL::GDAL) | ||
include_directories(../src) | ||
|
||
enable_testing() | ||
set(TEST_FILES | ||
test_utils.cpp | ||
test_location_area.cpp | ||
test_location_elevation.cpp | ||
test_firstpass_handler.cpp | ||
test_rewrite_handler.cpp | ||
) | ||
|
||
foreach(file ${SOURCE_FILES}) | ||
list(APPEND TEST_FILES "../src/${file}") | ||
endforeach() | ||
|
||
add_executable(test-osm-transform test-osm-transform.cpp | ||
${TEST_FILES} | ||
) | ||
target_link_libraries(test-osm-transform PRIVATE Boost::unit_test_framework Boost::regex GDAL::GDAL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters