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
Terrain under sea level is painted all blue #1142
Comments
you think right ! all LKM file without "cost_area.*" need to be rebuild ... |
…er than 4095m land surface elevation range of earth are [-428m , 8848m], range of color ramp are [0, 255] currently we clip surface elevation to [0 - 4096], so all elevation bellow 0 are draw like sea (if topology doesn't include coast_area shape) and all elevation higher than 4096 are draw like invalid terrain (LCD Green). for fix this problem : 1 - calculate span of visible elevation 2 - shift elevation by min of this range ( result range is [0 - 9276] ) 3 - scale result to range [0 - 255] for speed reason, scaling is made using bit shift, ( power of 2 scaling factor). of course same algorithm are used for build color ramp.
…er than 4095m land surface elevation range of earth are [-428m , 8848m], range of color ramp are [0, 255] currently we clip surface elevation to [0 - 4096], so all elevation bellow 0 are draw like sea (if topology doesn't include coast_area shape) and all elevation higher than 4096 are draw like invalid terrain (LCD Green). for fix this problem : 1 - calculate span of visible elevation 2 - shift elevation by min of this range ( result range is [0 - 9276] ) 3 - scale result to range [0 - 255] for speed reason, scaling is made using bit shift, ( power of 2 scaling factor). of course same algorithm are used for build color ramp.
…er than 4095m land surface elevation range of earth are [-428m , 8848m], range of color ramp are [0, 255] currently we clip surface elevation to [0 - 4096], so all elevation bellow 0 are draw like sea (if topology doesn't include coast_area shape) and all elevation higher than 4096 are draw like invalid terrain (LCD Green). for fix this problem : 1 - calculate span of visible elevation 2 - shift elevation by min of this range ( result range is [0 - 9276] ) 3 - scale result to range [0 - 255] for speed reason, scaling is made using bit shift, ( power of 2 scaling factor). of course same algorithm are used for build color ramp.
thanks for feedback ! |
This is not a solution. See OpenCloseTopology lines 106 .. LKWaterThreshold is my solution. Working perfectly since years, no need to change. Israel need fix on topology, nothing else. |
if you have time for check all LKM files, it's your choice, i don't want to do that ( in fact i can't because i don't have tools for generate maps ). in all case may fix work for general case and also fix few other bug .... |
Isachar says: Thats not how it works. because otherwise we would have netherlands in blue, for example. It is exactly the opposite: without coast lines you dont get the blue of the sea, because there is no "sea" in DEM. It is only terrain altitude, and we dont paint blue for terrain unless it is under a parameter called LKWaterThreshold, set by OpenCloseTopology when we load topology. |
okk let me see why Israel has no coasts , first!
In data 4 Novembre 2017 2:27:24 PM Bruno de Lacheisserie
<notifications@github.com> ha scritto:
… if you have time for check all LKM files, it's your choice, i don't want to
do that ( in fact i can't because i don't have tools for generate maps ).
in all case may fix work for general case and also fix few other bug ....
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#1142 (comment)
|
he say right, that explain why your fix work for Netherland but not for Israel. |
…n 4095m land surface elevation range of earth are [-428m , 8848m], range of color ramp are [0, 255] currently we clip surface elevation to [0 - 4096], so all elevation bellow 0 are draw like sea (if topology doesn't include coast_area shape) and all elevation higher than 4096 are draw like invalid terrain (LCD Green). for fix this problem : 1 - calculate span of visible elevation 2 - shift elevation by min of this range ( result range is [0 - 9276] ) 3 - scale result to range [0 - 255] for speed reason, scaling is made using bit shift, ( power of 2 scaling factor). of course same algorithm are used for build color ramp.
I live in Israel and we fly in many areas that are below sea level. unfortunately they are all painted blue, either by using lk8000's israel online maps , or by making a custom map with LKMaps_Desktop.(!)
This has been discussed by ryszard_lewandowski here (making his own maps, not for Israel - problem does not only relate to Israel maps) and by me here (either my maps or the online maps)
how it appears in lk8000:
True water areas in Israel:
The problem is already visible from the mapset area image :
(The entire area inland is blue)
I think that the problem is, the LKM file (for Israel) does not contain coast_area.* files! so, since it is unknown to lk8000 where the sea ends and land begins - everything below 0 altitude is painted in blue.
(Netherland's LKM map, for instance, contains three coast_area files: .dbf, .shp, .shx)
Unfortunately LK8000_Desktop Only creates .LKM file rarely for me, (It usually only creates .DEM files) So I can't find a way to create the coast_area files properly, and prove my assumption correct.
a bit more info:
Here is a screenshot from QGIS Browser of the water_area.shp inside the topological file LK ISR_ISRAEL.LKM :
I translated the terrain ISR_N_ISRAEL_250.DEM file to an .asc file using GIS2LKMAP which I found out about here, and it also looks fine:
The text was updated successfully, but these errors were encountered: