-
Notifications
You must be signed in to change notification settings - Fork 203
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 for nonlinear geometries #492
Comments
I am currently mentoring a project where we would love to use Fiona instead of the official GDAL Python bindings. Our data has lots of curve geometries though so this is a blocker for us. Is it worth trying to simply uncomment the types in https://github.com/Toblerity/Fiona/blob/master/fiona/_geometry.pyx#L18 and hope for the best? Or are there other places in the code where will is going to fail spectacularly? |
@kannes That is one change that we will need. A big missing piece is that OGR_G_GetLinearGeometry will need to be called before https://github.com/Toblerity/Fiona/blob/master/fiona/_geometry.pyx#L163 in |
I think there is a debate to be had re: returning the curved geometries vs their linear approximation. From my understanding curved geometries are still just a type and some coordinate sequences. The objects returned by Fiona are GeoJSON-like structures only. I would expect we could return structures for these, otherwise round trip operations are not possible. I do think we should make the linear approximations available thought. |
And I just realised that of course we use Shapely for actual geometric stuff. D'oh! Still, looking forward to the day when Fiona supports this :) |
Currently this is breaking things for me as prior to gdal 2.2 curve geometries were automatically approximated, post-2.2 fiona just throws a "UnsupportedGeometryTypeError". While I agree that preserving curves would be awesome for round-trip operations, in the short term I suggest we implement the suggested |
I made a start on full support for curved geometries not long after my last comment. It was going quite well until I realised we need to decide on an exact format for some of the more complicated geometry types. I wasn't aware that Fiona was already interpolating geometries with earlier versions of GDAL. |
Should we maybe create a separate issue for fixing the silent approximation vs actually full supporting curve geometries, especially as it sounds like full support may take more work than originally expected? |
Yes, two issues makes the most sense. Let's let this one continue as the issue about full support, including JSON representations of non-linear geometries. |
Was just looking at RFC 49: Curve geometries and realized that GEOS (and thereby shapely) is specifically mentioned as not supporting non-linear geometries at this time. A quick glance over the GEOS wiki makes it look like curve geometries are not even planned, but I could be wrong. -- Anyone know how to support getting non-linear geometries implemented in GEOS? |
I'm going to close this in favor of #1345. |
GDAL 2.0 introduced support for nonlinear geometries, such as
CIRCULARSTRING
andCURVEPOLYGON
. There are also some functions converting to/from their linear approximations.https://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries
I don't think it would be too difficult to add support for this in Fiona.
The text was updated successfully, but these errors were encountered: