-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Geonode -> Django 2.2 x GDAL 3 #8502
Comments
@cmotadev currently only As far as I remember we used this checks in order to deal with the GDAL 3 coordinate flipping issue https://github.com/GeoNode/geonode/blob/3.2.x/geonode/utils.py#L398 Maybe this one could work for you too? |
@afabiani I checked your suggestion and doesn't work for me, but your implementation gived me an idea: The main problem is because the GeoDjango implementation doesn't use pyGDAL. The bindings are done directly on the library. I solved my problem subclassing the GeometryField to flip coordinates before saving into DB and after retrieve on it. I used Shapely to make the things easier.
|
Hi @afabiani and other colleagues
We are developing a plugin for GeoNode, running on Docker, that uses geonode-project and we are experiencing some issues. We have a django model that uses a GeometryField and the model saves geometry with flipped coordinates.
I checked that Geonode uses Django 2.2.x, which GDAL requirements are up to 2.3.x, and in the dockerfile it brings GDAL 3. I think it's a Django behavior than Geonode itself, but I think that it's crucial for setting the geonode requierements - GDAL 3 changed the default behavior of coordinate transformation
There is a ticket into the Django Project that issues this problem.
My suggestion is to put GDAL 2.X as default, or adopt Django 3.1.x as default, which one is easier :)
Thanks for appreciate.
Expected Behavior
GeoDjango saves the geometry as is
Actual Behavior
GeoDjango is flipping the geometry's coordinates
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: