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

[GeoNode] Projection issue in the layers #395

Closed
gubuntu opened this issue Jan 11, 2018 · 20 comments
Closed

[GeoNode] Projection issue in the layers #395

gubuntu opened this issue Jan 11, 2018 · 20 comments
Assignees
Labels
Milestone

Comments

@gubuntu
Copy link

gubuntu commented Jan 11, 2018

From @felix-yew on January 11, 2018 9:33

Problem

When we finish upload some layers that have projection in geographical (EPSG:4326), ie jakarta_flood_18113_wgs_no_kw's layer, we can see that the layers can show in list of layer, especially in the thumbnail view that can directly show the type of layer. Then, it will different if we upload some layer with the differerent projection (in addition to EPSG:4326), ie UTM zone 49s, we find a problem to see the thumbnail view. In the list of layer, we can see that the Jalan_Sleman_49s's layer do not have a thumbnail view in the fixed view. See the image below:
image

Let see the different layer with the different projection, in the image below:
image

When we check it in the metadata details, there have a different between them.
image
In this case, in the left side, maybe it is same explanation like map view. I think the layer shown but in the very small size. And when we see the layer extent look strange because the Projection System indicate that the layer in EPSG:4326 but why the layer extent show the different format (metres). This case also appear in the list of layer thumbnail preview.
In the right side, the extent layer show accordance with the Projection System. So the layer can directly show in the map view.

I assume that:

  1. Maybe the layer in the map view not shown because have the different extent layer. The layer maybe appear, but because of extent layer have a wide coverage so the layer look very small and it as if no image in the thumbnail view.
  2. We can see in the metadata details that the extent layer in the left side like in metres UTM's format but the projection system is in EPSG:4326.
    The question is:
    Do uploading layer into the geonode will change or transform coordinate to EPSG:4326? If yes, maybe the coordinate transformation also included the extent layer (ie. from metres/UTM to geographic coordinate)

Expected Behaviour

If the CRS of layer need to transform into the WGS84 projection, it will better if the extent of layer also transform into the geographical coordinate.

Environment

geonode.inasafe.org

Proposed Solution

Make it happy.

@samnawi @adissadis @lucernae @gubuntu

Copied from original issue: inasafe/inasafe#4856

depends on #437
child of #457

@gubuntu
Copy link
Author

gubuntu commented Jan 11, 2018

  • one should be able to upload a layer in any CRS that QGIS can handle
  • the layer should stay in that CRS in its backend storage and be described with the correct CRS in its metadata
  • QGIS will then correctly serve the layer in whatever CRS is requested (e.g. 3857 for web maps)
  • Thumbnail requests should work correctly if the CRS is properly defined in the metadata. Consider thumbnails on testing are squashed #374 at the same time.

@gubuntu
Copy link
Author

gubuntu commented Jan 11, 2018

@felix-yew for the layers that are not in 4326, where are they getting 4326 in their metadata? Is the QGIS user (you?) doing that or is the system applying the wrong CRS in the metadata during upload?

@lucernae
Copy link

mas @felix-yew did you upload the layer with metadata? The metadata needs to be consistent with the actual CRS (and also the extent inside the layer).

@adisadit
Copy link

This problem appear when we tried to upload layer in UTM format. The layer originally have CRS UTM 49S. As shown in this image:

image

Where we get the CRS?
By using right click on the layer -> Save as -> Create new layer with CRS: UTM 49S (EPSG: 32749)

@adisadit
Copy link

Me and @felix-yew just tried with the data that already stored in Geonode InaSAFE (Jakarta_District_WGS84):
http://geonode.inasafe.org/layers/geonode:jakarta_district_boundary_wgs84

Download it -> Open in QGIS -> Save as new layer with new CRS (UTM 49S) -> Upload to geonode

And i got same problem with the other layers. the thumbnail is missing and it become WGS84 in metadata:
image

I already check the metadata in qgis and it originally in UTM 48S:
image

So i think Geonode tried to change the projection to EPSG 4326 where the data itself in EPSG 32748 (UTM 49S)

@felix-yew
Copy link

Hi @gubuntu - thank you for response this issue. Actually this issue find by mas @adissadis when upload some material training to geonode. And, then he asked me about this issue, so I try it by download the layer then check it in QGIS for the actual projection, (and I am sure that the file is in UTM).

@felix-yew for the layers that are not in 4326, where are they getting 4326 in their metadata? Is the QGIS user (you?) doing that or is the system applying the wrong CRS in the metadata during upload?

Like mas Adis said, we only upload the original layer (with UTM projection). So, I guess the geonode change only the projection system without the extent layer to EPSG:4326.

mas @felix-yew did you upload the layer with metadata? The metadata needs to be consistent with the actual CRS (and also the extent inside the layer).

yes mas @lucernae - we also upload the xml file with the original file.

@gubuntu
Copy link
Author

gubuntu commented Jan 12, 2018

Sounds like a bug

@lucernae
Copy link

lucernae commented Jan 12, 2018 via email

@felix-yew
Copy link

felix-yew commented Jan 15, 2018

mas @lucernae you can try by download one of the layers with other EPSG:4326, ie. http://geonode.inasafe.org/layers/geonode:krb3_49s (this layer in UTM projection).

Or, maybe mas @adissadis can share the original data to mas @lucernae ?

@adisadit
Copy link

Here's some example:
Jalan_Sleman_49S.zip

@gubuntu
Copy link
Author

gubuntu commented Feb 1, 2018

confirmed as a bug with that sample data set.

GeoNode or QGIS is not respecting the CRS of the layer and assumes it is 4326.

@gubuntu
Copy link
Author

gubuntu commented Feb 3, 2018

possibly related: GeoNode#3593

@capooti
Copy link

capooti commented Feb 10, 2018

This is known bug, yes GeoNode#3482

@NyakudyaA
Copy link

@gubuntu from my investigation yesterday I noticed the following:

  • The qgis project that is generated on the fly by otf-plugin has the layer with a projection properly defined. I could open the project in QGIS.
  • The otf-plugin generates a project that does not have any layer extent information in it so I assume some function is doing this. (When you open the project in QGIS you actually have to zoom to layer extent to render the layer in canvas)
  • When QGIS server makes a request what projection does it request for a layer and the extent. We cannot assume the projection for a layer is always 4326. When the layer's projection is metres it needs to be handled properly.
  • I assume all tiles are being generated as 4326 and thus having the wrong extent.

@gubuntu
Copy link
Author

gubuntu commented May 9, 2018

#411 related

@gubuntu
Copy link
Author

gubuntu commented Jun 25, 2018

fix this while fixing #289

@boney-bun
Copy link

i think this problem has been solved.
Jalan Sleman (EPSG:32749) can now be loaded properly into testing server.

@gubuntu
Copy link
Author

gubuntu commented Aug 20, 2018

maybe, but there's no thumbnail

@gubuntu gubuntu added ready and removed testing labels Aug 20, 2018
@boney-bun
Copy link

the missing thumbnail is because i was testing #426
i'll do the testing by created another one so it doesn't mix up.

for testing purpose, i've just uploaded the new one: http://testing.geonode.kartoza.com/layers/geonode:jalan_sleman_49s

@boney-bun boney-bun added testing and removed ready labels Aug 21, 2018
@NyakudyaA
Copy link

the layers can be loaded even with different CRS geographic or meters
crs.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants