-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoPackage input support #522
Conversation
This PR is just about ready for review. The last things are adding unit tests for |
There is currently an issue in this PR that occurs when the CMake Build type is set to Release with GCC and Clang. For some reason, the This does not occur when The build type is set to Debug, OR when ICX is used in either Debug or Release. After some investigating, it seems like it might be a clang or boost bug? Compiling
and emitting the .ll file, before optimization, is almost 1M lines... EDIT: this also occurs with clang 14.0.6 so it doesn't seem like a recent regression EDIT: after talking with Donald, working around this by disabling optimizations for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look at this more, but did a cursory pass and don't see any show stoppers. Interested in others' feedback. I did run the software on the test case in data/gauge_01073000
using both the geojson and geopkg inputs, which succeeded and I found no differences in the output, so that's positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks pretty good, but a couple things that might warrant further discussion/testing, and some minor cleanup comments.
Would it make sense to move all of the added SQLite support code over to utilities, since nothing in it is actually specified to GeoPackage? |
changes per review at NOAA-OWP#522 (comment)
Review changes per NOAA-OWP#522 (comment). This commit also reorganizes the WKB implementation by moving inline definitions to a source file, since there is no need to inline those functions.
changes per NOAA-OWP#522 (comment)
@PhilMiller Maybe? Although, GeoPackage is the only portion of NGen that is using SQLite, so in that case it would also make sense to keep it together with the GeoPackage code. I think it would make sense to move it if other portions of NGen made use of SQLite. |
Copy constructor/assignment operator are not used for the `sqlite` class, and should subsequently be deleted. This change is implemented per NOAA-OWP#522 (comment).
changes per NOAA-OWP#522 (comment)
changes per review at #522 (comment)
Review changes per #522 (comment). This commit also reorganizes the WKB implementation by moving inline definitions to a source file, since there is no need to inline those functions.
changes per #522 (comment), and #522 (comment).
Copy constructor/assignment operator are not used for the `sqlite` class, and should subsequently be deleted. This change is implemented per #522 (comment).
changes per #522 (comment) also modifies switch to return instead of assign to `g`.
changes per #522 (comment) and also modifies `std::make_shared` calls within the switch statement to reflect forwarding, instead of construction before passing.
changes per #522 (comment) and #522 (comment) Co-authored-by: Phil Miller - NOAA <[email protected]>
This PR implements support for GeoPackage input via the SQLite3 C library based on the OGC GeoPackage Encoding Standard.
(resolves #295; related: #496)
Additions
include/geopackage/SQLite.hpp
).geopackage
that contains the primary functiongeopackage::read()
, which returns ageojson::GeoJSON
(a.k.a.std::shared_ptr<geojson::FeatureCollection>
) object, likegeojson::read
.geopackage::wkb
). [ref: OGC SFA Part 1, GEOS WKB]Testing
Notes
geojson
for feature classes.boost::property_tree
, and so that this implementation doesn't require linking togeojson
.ngen/src/NGen.cpp
Lines 262 to 266 in 6ab044e
Todos
geopackage::read
geopackage::build_feature
geopackage::build_geometry
geopackage::build_properties
Checklist
Target Environment support