-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for automatic conversion of surface geometries to linear ones when using use_arrow #307
Comments
Crossref #166
But in our case we need geometry WKB values that can be directly ingested into Shapely / GEOS, which doesn't support nonlinear geometry types. Granted, we could return the original geometries as-is from In short, I think it is OK we are going against the recommendation of GDAL here; we've made a deliberate choice based on the libraries we're using to represent geometries. |
using OGR_G_ForceTo() with OGR_GT_GetLinear() is an alternative to OGRSetNonLinearGeometriesEnabledFlag() |
@rouault what is the approach to use when the arrow API is used to read the data? |
Currently, it would be up to the user to import the WKB a a OGRGeometry, use OGR_G_ForceTo() and export to WKB before doing something else with it. |
As noted in #297, automatic conversion of surface geometries to linear ones doesn't seem to work (is some cases?), as tested by
test_read_multisurface
.For reference, support for this for the automatic conversion
use_arrow=False
path was added in #140.The following steps seem appropriate actions to get this solved in short term:
OGRSetNonLinearGeometriesEnabledFlag
. If it does, solving point 1. will fix the support.On longer term, or in parallel, the following remark in the doc of
OGRSetNonLinearGeometriesEnabledFlag
is "interesting": "Libraries should generally not use that method, since that could interfere with other libraries or applications." So possibly, to be checked with gdal developers, an alternative way to be able to request the conversion via the arrow interface could be considered.The text was updated successfully, but these errors were encountered: