-
Notifications
You must be signed in to change notification settings - Fork 207
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
Support GeometryCollection containing TIN or Triangle geometries #1163
Conversation
@rouault On a feature level there is the possibility of using For a PolyhedralSurface, TIN or Triangle that are not part of a GeoemtryCollection we could just steal the geometry from the feature, but this would need some more refactoring. Thanks for your review, it is much appreciated! |
you can use:
|
I found some time to work on it. But I will need to go over it again to tidy up everything. |
cdef int code | ||
|
||
cogr_geometry = OGR_F_GetGeometryRef(feature) | ||
code = base_geometry_type_code(OGR_G_GetGeometryType(cogr_geometry)) |
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.
Currently, the code of a geometry is determined two times: here and in build(). This could be optimized by passing the code to build. What is the equivalent in Cython of build(..., code: Optional[int] = None)? Passing an int pointer that is NULL when no code was previously computed?
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.
@rbuffat don't worry about optimizing that. Getting the code is practically free compared to other stuff we're doing.
There are currently a bunch of redeclared warnings that are suppressed when the compilation is successful. I will need to have a look at them.
|
@rbuffat the immediate cause of those warnings is that _geometry.pyx imports gdal.pxi and at https://github.com/Toblerity/Fiona/pull/1163/files#diff-71c8a7a6ae4cca6dd2e3e2e0e98232b4c2decc714d27ed6bc972c0ff5cc66608R11 _err.pyx is imported and gdal.pxi is re-imported. We're redeclaring, but since we're not redefining we're okay. No bugs have arisen because of this. We can try to restructure in the future, but it's fine to ignore it for now. I'm going to merge this. (By restructuring, it looks like we need to deprecate including gdal.pxi and start cimport'ing GDAL types and functions, but that can wait until after 1.9b1). |
This PR adds support for GeometryCollections containing RFC64 geometries.
Should fix #1155 and #1130