Skip to content
Permalink
Browse files

Mapcache detail (#193)

* Create contrib/mapcache_export_prep

* Initial version of mapcache_export_prep

* Borrow option syntax from mapcache_seed

* Set output format to JSON

* Minor changes

* Minor presentation changes

* First step to add OGR/GEOS support

* Use cJSON to make report

* Add OGR command line options borrowed from mapcache_seed

* Output JSON shows GeoJSON geometry

* Count tiles in arbitrary geometry

* Presentation adjustments in JSON output

* Add copyright

* Handle empty & mono-SQLite caches, prepare for composite caches

* Handle composite caches

* Add --short-output option for not reporting missing files

* Make OGR/GEOS optional

* Fix bug

* Another bug fix

* Remove reference to a cmake variable absent from v2.6

* Exclude maxx and maxy from region bounding box

* Set region to grid extent when no region has been provided

* Make some error messages more explicit

* Take {inv_...} in templates into account

* Rename mapcache_export_prep to mapcache_detail

* mapcache_detail: add report on missing tiles

* Update mapcache_detail.c to match evolution in dimension handling

* Improve handling of mapcache_detail dependencies

* Fix compilation issue on Windows

* Windows fix

* Fix travis wrt. mapcache_detail dependencies

* Windows fix

* Make ezxml functions available from outside DLL

* Make mapcache functions available from outside DLL
  • Loading branch information...
jbo-ads authored and tbonfort committed Mar 27, 2019
1 parent 0e74456 commit ef63fd06dfb7c87f15b4cd4bd4c946aaeeaa3e27
@@ -38,7 +38,7 @@ before_install:
script:
- mkdir build
- cd build
- if test "$BUILD_TYPE" = "maximum"; then cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TIFF=ON -DWITH_GEOTIFF=ON -DWITH_TIFF_WRITE_SUPPORT=ON -DWITH_PCRE=ON -DWITH_SQLITE=ON -DWITH_BERKELEY_DB=ON; else cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TIFF=OFF -DWITH_GEOTIFF=OFF -DWITH_TIFF_WRITE_SUPPORT=OFF -DWITH_PCRE=OFF -DWITH_SQLITE=OFF -DWITH_BERKELEY_DB=OFF -DWITH_GDAL=OFF -DWITH_GEOS=OFF -DWITH_FCGI=OFF -DWITH_CGI=OFF -DWITH_APACHE=OFF -DWITH_OGR=OFF -DWITH_MAPSERVER=OFF; fi
- if test "$BUILD_TYPE" = "maximum"; then cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TIFF=ON -DWITH_GEOTIFF=ON -DWITH_TIFF_WRITE_SUPPORT=ON -DWITH_PCRE=ON -DWITH_SQLITE=ON -DWITH_BERKELEY_DB=ON; else cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TIFF=OFF -DWITH_GEOTIFF=OFF -DWITH_TIFF_WRITE_SUPPORT=OFF -DWITH_PCRE=OFF -DWITH_SQLITE=OFF -DWITH_BERKELEY_DB=OFF -DWITH_GDAL=OFF -DWITH_GEOS=OFF -DWITH_FCGI=OFF -DWITH_CGI=OFF -DWITH_APACHE=OFF -DWITH_OGR=OFF -DWITH_MAPSERVER=OFF -DWITH_MAPCACHE_DETAIL=OFF; fi
- make -j3
- sudo make install
# Only test with Apache 2.4
@@ -96,6 +96,7 @@ option(WITH_PCRE "Use PCRE for regex tests" OFF)
option(WITH_MAPSERVER "Enable (experimental) support for the mapserver library" OFF)
option(WITH_RIAK "Use Riak as a cache backend" OFF)
option(WITH_GDAL "Choose if GDAL raster support should be built in" ON)
option(WITH_MAPCACHE_DETAIL "Build coverage analysis tool for SQLite caches" ON)

find_package(PNG)
if(PNG_FOUND)
@@ -301,7 +302,7 @@ macro(status_optional_component component enabled libpath)
endif()
endmacro()
macro(status_optional_feature feature enabled)
if("${enabled}" EQUAL "1")
if("${enabled}" EQUAL "1" OR "${enabled}" STREQUAL "ON")
message(STATUS " * ${feature}: ENABLED")
else()
message(STATUS " * ${feature}: disabled")
@@ -327,10 +328,16 @@ status_optional_component("PCRE" "${USE_PCRE}" "${PCRE_LIBRARY}")
status_optional_component("Experimental mapserver support" "${USE_MAPSERVER}" "${MAPSERVER_LIBRARY}")
status_optional_component("RIAK" "${USE_RIAK}" "${RIAK_LIBRARY}")
status_optional_component("GDAL" "${USE_GDAL}" "${GDAL_LIBRARY}")
message(STATUS " * Optional features")
status_optional_feature("MAPCACHE_DETAIL" "${WITH_MAPCACHE_DETAIL}")

INSTALL(TARGETS mapcache DESTINATION ${CMAKE_INSTALL_LIBDIR})

add_subdirectory(util)
add_subdirectory(cgi)
add_subdirectory(apache)
add_subdirectory(nginx)

if (WITH_MAPCACHE_DETAIL)
add_subdirectory(contrib/mapcache_detail)
endif (WITH_MAPCACHE_DETAIL)
@@ -0,0 +1,60 @@
option(WITH_GEOS
"Choose if GEOS geometry operations support should be built in" ON)
option(WITH_OGR
"Choose if OGR/GDAL input vector support should be built in" ON)

add_executable(mapcache_detail mapcache_detail.c)
target_link_libraries(mapcache_detail mapcache)

if (WITH_SQLITE)
find_package(SQLITE)
if(SQLITE_FOUND)
include_directories(${SQLITE_INCLUDE_DIR})
target_link_libraries(mapcache_detail ${SQLITE_LIBRARY})
else(SQLITE_FOUND)
report_mandatory_not_found(SQLITE)
endif(SQLITE_FOUND)
else (WITH_SQLITE)
report_dependency_error(MAPCACHE_DETAIL SQLITE)
endif (WITH_SQLITE)

if (WITH_OGR)
find_package(GDAL)
if (GDAL_FOUND)
include_directories(${GDAL_INCLUDE_DIR})
target_link_libraries(mapcache_detail ${GDAL_LIBRARY})
set (USE_OGR 1)
else (GDAL_FOUND)
report_optional_not_found(GDAL)
endif (GDAL_FOUND)
endif (WITH_OGR)

if (WITH_GEOS)
find_package(GEOS)
if (GEOS_FOUND)
include_directories(${GEOS_INCLUDE_DIR})
target_link_libraries(mapcache_detail ${GEOS_LIBRARY})
set (USE_GEOS 1)
else (GEOS_FOUND)
report_optional_not_found(GEOS)
endif (GEOS_FOUND)
endif (WITH_GEOS)


set (CURRENT_BINARY_DIR "${PROJECT_BINARY_DIR}/contrib/mapcache_detail/")
include_directories("${CURRENT_BINARY_DIR}")

configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/mapcache_detail_config.h.in"
"${CURRENT_BINARY_DIR}/mapcache_detail_config.h"
)

message(STATUS "* mapcache_detail Configuration Options:")
message(STATUS " * Mandatory components")
message(STATUS " * SQLite: ${SQLITE_LIBRARY}")
message(STATUS " * Optional components")
status_optional_component("GEOS" "${USE_GEOS}" "${GEOS_LIBRARY}")
status_optional_component("OGR" "${USE_OGR}" "${GDAL_LIBRARY}")

INSTALL(TARGETS mapcache_detail
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit ef63fd0

Please sign in to comment.
You can’t perform that action at this time.