Skip to content

Commit

Permalink
rev: update cmakelists; feature exhaustive case
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- authored and mattw-nws committed Jul 18, 2023
1 parent 57d00df commit 8b6dbc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/geopackage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/geopackage/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ geojson::Feature geopackage::build_feature(
properties,
bounding_box
);
default:
case geojson::FeatureType::GeometryCollection:
return std::make_shared<geojson::CollectionFeature>(
std::vector<geojson::geometry>{geometry},
id,
properties,
bounding_box
);
default:
throw std::runtime_error("invalid WKB feature type. Received: " + std::to_string(geometry.which() + 1));
}
}

0 comments on commit 8b6dbc7

Please sign in to comment.