diff --git a/CHANGELOG.md b/CHANGELOG.md index 81cf5368..26ee2444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr ## [Unreleased] +### Changed + +- Correction de conversions au format API OGC (format et bbox) + ## [3.0.0] - 2026-03-12 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index ec967c4a..203254c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CEPH_ENABLED 0 CACHE BOOL "Build with ceph storage") set(KDU_ENABLED 0 CACHE BOOL "Build with kakadu") set(UNITTEST_ENABLED 1 CACHE BOOL "Unit tests compilation") set(DOC_ENABLED 1 CACHE BOOL "Documentation compilation") -set(CPACK_SYSTEM_NAME "ubuntu-20.04" CACHE STRING "Building OS, to deduce package format to generate") +set(CPACK_SYSTEM_NAME "ubuntu-22.04" CACHE STRING "Building OS, to deduce package format to generate") set(CPACK_PACKAGE_NAME "librok4-dev" CACHE STRING "Package's name") set(VERSION ${BUILD_VERSION}) diff --git a/include/rok4/enums/Format.h b/include/rok4/enums/Format.h index e1f5f91a..0938b079 100644 --- a/include/rok4/enums/Format.h +++ b/include/rok4/enums/Format.h @@ -374,14 +374,14 @@ std::string to_string ( eFormat format ); std::string to_mime_type ( eFormat format ); /** - * \~french \brief Conversion d'un format vers une chaîne de caractère (format OGC API Tiles) + * \~french \brief Conversion d'un format vers une chaîne de caractère (format OGC API) * \param[in] format format à convertir - * \return format OGC API Tiles du format - * \~english \brief Convert a format to a string (format OGC API Tiles) + * \return format OGC API du format + * \~english \brief Convert a format to a string (format OGC API) * \param[in] format format to convert - * \return format OGC API Tiles of the format + * \return format OGC API of the format */ -std::string to_tiles_format ( eFormat format ); +std::string to_ogcapi_format ( eFormat format ); /** * \~french \brief Conversion d'un format vers une chaîne de caractère (extension) diff --git a/include/rok4/utils/BoundingBox.h b/include/rok4/utils/BoundingBox.h index 435900ec..00a1d6ee 100644 --- a/include/rok4/utils/BoundingBox.h +++ b/include/rok4/utils/BoundingBox.h @@ -432,12 +432,12 @@ class BoundingBox { } /** - * \~french \brief Exporte la bbox en JSON conformément à OGC API Tiles + * \~french \brief Exporte la bbox en JSON conformément à OGC API * \details La bbox est considérée comme étant en CRS84 - * \~english \brief Get the bbox as JSON, OGC API Tiles compliant + * \~english \brief Get the bbox as JSON, OGC API compliant * \details Bbox is considered as CRS84 one */ - json11::Json to_json_tiles() const { + json11::Json to_json_ogcapi() const { return json11::Json::object { { "spatial", json11::Json::object { { "crs", "http://www.opengis.net/def/crs/OGC/1.3/CRS84" }, diff --git a/src/enums/Format.cpp b/src/enums/Format.cpp index 4d8cd2c9..d473257d 100644 --- a/src/enums/Format.cpp +++ b/src/enums/Format.cpp @@ -258,7 +258,7 @@ const char *eformat_mime[] = { "application/x-protobuf" }; -const char *eformat_tiles[] = { +const char *eformat_ogcapi[] = { "UNKNOWN", "tiff", @@ -269,9 +269,9 @@ const char *eformat_tiles[] = { "tiff", "tiff", + "bil", "tiff", - "tiff", - "tiff", + "bil", "tiff", "mvt" @@ -407,8 +407,8 @@ std::string to_mime_type ( eFormat format ) { return std::string ( eformat_mime[format] ); } -std::string to_tiles_format ( eFormat format ) { - return std::string ( eformat_tiles[format] ); +std::string to_ogcapi_format ( eFormat format ) { + return std::string ( eformat_ogcapi[format] ); } std::string to_extension ( eFormat format ) { diff --git a/src/image/file/LibtiffImage.cpp b/src/image/file/LibtiffImage.cpp index 19fb2547..bee1aba4 100644 --- a/src/image/file/LibtiffImage.cpp +++ b/src/image/file/LibtiffImage.cpp @@ -562,7 +562,7 @@ int LibtiffImage::_getline ( T* buffer, int line ) { // Si l'image a une photometrie Palette ou bien YCBCR --> TIFFReadRGBATile if (palette || photometric == Photometric::YCBCR) { - uint32* palette_buffer = new uint32[width * rowsperstrip]; + uint32_t* palette_buffer = new uint32_t[width * rowsperstrip]; size = TIFFReadRGBATile(tif, t * tile_width, current_strip * tile_height, palette_buffer ); if ( size == 0 ) { @@ -608,7 +608,7 @@ int LibtiffImage::_getline ( T* buffer, int line ) { } else { // Si l'image a une photometrie Palette ou bien YCBCR --> TIFFReadRGBAStrip if (palette || photometric == Photometric::YCBCR) { - uint32* palette_buffer = new uint32[width * rowsperstrip]; + uint32_t* palette_buffer = new uint32_t[width * rowsperstrip]; size = TIFFReadRGBAStrip ( tif, line, palette_buffer); if ( size == 0 ) { BOOST_LOG_TRIVIAL(error) << "Cannot read strip number " << current_strip << " of image with color map " << filename ;