Skip to content
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

Fix qgis server bound projection #464

Merged

Conversation

lucernae
Copy link
Collaborator

@lucernae lucernae commented Aug 2, 2018

Fix bbox projection for leaflet in QGIS Server

  • Let GeoServer and QGIS Server handle misprojection issues if GeoNode can't handle it
  • QGIS Server will always transform bbox to EPSG 4326 to work consistently with leaflet
  • QGIS Server thumbnail request will try to maintain aspect ratios of the
    requested extent to avoid squashed image

Notes

  • Most of the problem is because main geonode docker image uses GDAL 1. It can't detect most EPSG. This is fixed in: kartoza/geonode-docker@db60cae
  • Even if using GDAL 2, sometimes it can't detect correct EPSG code (which is needed to draw correct bbox in leaflet). GeoServer can detect it correctly. In our case (QGIS Server) we transform the bbox to EPSG:4326 by default. The actual CRS is preserved in the file and handled by QGIS. Example layer is in gisdata package Air_Runways.shp

Issue links

- Let GeoServer and QGIS Server handle misprojection issues if GeoNode can't handle it
- QGIS Server will always transform bbox to EPSG 4326 to work consistently with leaflet
- QGIS Server thumbnail request will try to maintain aspect ratios of the
  requested extent to avoid squashed image
@codecov
Copy link

codecov bot commented Aug 2, 2018

Codecov Report

Merging #464 into 2.8.x-qgis_server will increase coverage by 0.29%.
The diff coverage is 85.84%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           2.8.x-qgis_server     #464      +/-   ##
=====================================================
+ Coverage              41.12%   41.41%   +0.29%     
=====================================================
  Files                    403      403              
  Lines                  28743    28811      +68     
  Branches                3653     3659       +6     
=====================================================
+ Hits                   11821    11933     +112     
+ Misses                 16195    16130      -65     
- Partials                 727      748      +21
Impacted Files Coverage Δ
geonode/tests/integration.py 0% <ø> (ø) ⬆️
geonode/qgis_server/helpers.py 67.04% <100%> (+0.96%) ⬆️
geonode/qgis_server/tests/test_views.py 99.14% <100%> (+0.13%) ⬆️
geonode/qgis_server/tasks/update.py 75% <100%> (+16.93%) ⬆️
geonode/layers/utils.py 57.27% <38.46%> (+0.61%) ⬆️
geonode/qgis_server/signals.py 87.93% <73.33%> (+1.77%) ⬆️
geonode/base/models.py 74.92% <0%> (-0.29%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71f72dc...bba77a9. Read the comment docs.

@lucernae lucernae force-pushed the fix_qgis_server_bound_projection branch 3 times, most recently from df55807 to 70831ab Compare August 2, 2018 17:48
- Check thumbnail aspect ratios
- Check thumbnail projection from different CRS
@lucernae lucernae force-pushed the fix_qgis_server_bound_projection branch from 70831ab to bba77a9 Compare August 2, 2018 17:53
@lucernae lucernae merged commit 79961c3 into kartoza:2.8.x-qgis_server Aug 2, 2018
@lucernae lucernae deleted the fix_qgis_server_bound_projection branch August 2, 2018 19:11
@lucernae lucernae mentioned this pull request Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants