-
Notifications
You must be signed in to change notification settings - Fork 398
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 importing geojson files on firefox on linux (#9912) #9913
base: master
Are you sure you want to change the base?
Conversation
for some reason mimetype is detected as application/geo+json
something is still wrong nevertheless, because trying various geojson files in the profile tool import line item, i mostly get The provided line is outside the profile coverage error messages - while they are on the DEM coverage, when reprojected. |
Hi @landryb, thank you so much for your contribution. Is it possible for you to check failing unit tests? |
well i've seen the failure and it is in some cesium-related code, and the error message |
for this, cf #9914 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @landryb
i'll report here my findings:
Actually there are some issues even before reaching longitudinal profile.
in particular we do not yet support import of geojson files that are not reprojected to EPSG:4326.
see here, trying to import test2154.json on a map with is already using EPSG:2154
the bbox is assuming to be in 4326 here
MapStore2/web/client/utils/LayersUtils.js
Line 616 in 593c4d5
crs: "EPSG:4326" |
also because here the projection is expected to be in map.projection which something related to mapstore map.json files
in fact the UI shows this warning
Please try to convert the json file to EPSG:4326 and re-test.
Aside from that I have tested using master branch importing a file.geojson or file.json and they both are recognized as application/json so if the geojson is valid (only 4326) I'm able to import it inside the longitudinalProfile tool
i'm using this for testing (remove .txt) in this context
a geosjon line - FC.geojson.txt
i think this PR is not needed tbh
@MV88 did you try with firefox on linux ? i get your comments are about the geojson projection, while this PR/issue isnt about this topic, but about the detected mimetype.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@landryb hi, sorry for being late
I had the time to better review this and indeed .geojson are recognized as geo-json mime type, but in order to better support it you need also to include changes here for the normal map import tool
adding || type === 'application/geo+json'
additionally there are some tests that are failing, do you have time to have a look at that?
i have tested using these
geosol training.zip
keep in mind that for now geojson needs to be projected in 4326 to work fine in longitudinal profile tool for example
for some reason mimetype is detected as application/geo+json
Description
cf #9912
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#9912
What is the new behavior?
importing geojson files in the 'add data' & 'import data' item of profile tool passes mimetype check
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)