diff --git a/src/geopackage/CMakeLists.txt b/src/geopackage/CMakeLists.txt index 14a8f1324d..acc592bac1 100644 --- a/src/geopackage/CMakeLists.txt +++ b/src/geopackage/CMakeLists.txt @@ -12,13 +12,13 @@ if (NOT _cmp) set_source_files_properties(wkb.cpp PROPERTIES COMPILE_FLAGS -O0) endif() -add_library(geopackage STATIC geometry.cpp - properties.cpp - feature.cpp - read.cpp - wkb.cpp - sqlite/iterator.cpp - sqlite/database.cpp +add_library(geopackage geometry.cpp + properties.cpp + feature.cpp + read.cpp + wkb.cpp + sqlite/iterator.cpp + sqlite/database.cpp ) add_library(NGen::geopackage ALIAS geopackage) target_include_directories(geopackage PUBLIC ${PROJECT_SOURCE_DIR}/include/geopackage) diff --git a/src/geopackage/feature.cpp b/src/geopackage/feature.cpp index 76b95378de..8b51e4d495 100644 --- a/src/geopackage/feature.cpp +++ b/src/geopackage/feature.cpp @@ -67,12 +67,14 @@ geojson::Feature geopackage::build_feature( properties, bounding_box ); - default: + case geojson::FeatureType::GeometryCollection: return std::make_shared( std::vector{geometry}, id, properties, bounding_box ); + default: + throw std::runtime_error("invalid WKB feature type. Received: " + std::to_string(geometry.which() + 1)); } }