-
Notifications
You must be signed in to change notification settings - Fork 116
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
holes in the map at the hill shadows #337
Comments
Have you forgotten the void filling step ?
https://gdal.org/programs/gdal_fillnodata.html Anyway, even if you did, the result is still varying in quality from places to places. AFAIK, both OTM and my project https://github.com/RefugesInfo/mri are using conflated tiff DEM made and assembled from https://www.opensnowmap.org |
Hey @sletuffe yea i filled the voids. but didnt help. Unfortunately the NASA SRTM files are not possible to download: http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N44E006.hgt.zip that link does not work anymore. |
Can't find it anymore, looks like I deleted the raw one, I only have left the contour lines and hillshaded (multi zoom) versions @yvecai is it ok for you that I give @a14stoner the link you sent me 3 years ago from the raw dem on your servers ? (it still works, but, well, that's a ~400GB dowload, so better ask) |
Alright. This would be nice. |
I'll double check my current bandwidth later this evening and will send the download URL to @a14stoner |
That's OK, @a14stoner, you'll find my email address at the bottom of the 'About' page at opensnowmap.org, I can't put these urls on a public discussion. |
Ill try my best with the data from @yvecai and report back if I managed it ;) |
I identified which step produced the voids: gdaldem hillshade -z 2 -co compress=lzw -co predictor=2 -co bigtiff=yes -compute_edges warp-90.tif hillshade-90.tif && gdal_translate -co compress=JPEG -co bigtiff=yes -co tiled=yes hillshade-90.tif hillshade-90-jpeg.tif Before the second command it looks like this: after it: so i will continue with the not compressed file and check it its better now. P.S.: when compressing with lzw at the last step no holes are there Just an information for @yvecai and @sletuffe : I got ASTER DEMs from 2019 here: https://e4ftl01.cr.usgs.gov/ASTT/ASTGTM.003/2000.03.01/ |
It's been a long time since I've played with gdal tools, but I'm quitte surprised the jpeg compression step could add those holes. Is is possible that you are missing the -compute_edges switch ? The thing is that without jpeg and tiled=yes your hillshaded tiff will be much bigger and also more time consuming to extract tiles from. Anyway, does the ASTER DEMs from 2019 are better in areas like https://opentopomap.org/#marker=13/60.77559/25.65411 ? |
Maybe the artifacts comes from the fact that the hillshade is fully black, but the hillshade information is in the alpha channel. I don't know how the JPEG compression works with an alpha channel. Apparently the holes from #327 are not present in the Opensnowmap's DEM, these area being covered by EU-DEM, though. What's new(ish) in the open DEM family is this one : https://www.eorc.jaxa.jp/ALOS/en/dataset/aw3d30/aw3d30_e.htm |
It seams you are better than us at sweeping it under the carpet by painting it white ;-) This coloring by altitude + holes in white gives a better idea of missing parts in the DEM : That being said, and I apologize in advance to my beloved Finns, Norwegians or Russians (that's where the holes are), but the inconvenience is rather limited to mostly non-hiking areas. The might to solve this issue is therefore rather low... |
Ah yes, most certainly the Aster parts. Needs to find some disk for Opensnowmap's server this summer to try and fix this with ALOS or else, I hope it rains a lot.
Le 31 janvier 2023 18:19:03 GMT+01:00, sly - sylvain letuffe ***@***.***> a écrit :
…> Apparently the holes from #327 are not present in the Opensnowmap's DEM, these area being covered by EU-DEM, though.
It seams you are better than us at sweeping it under the carpet by painting it white ;-)
Here is a more visible place in Norway on opensnowmap :
https://www.opensnowmap.org/#map=13/11.836/63.062&b=snowmap&m=false&h=false
This coloring by altitude + holes in white gives a better idea of missing parts in the DEM :
https://maps.refuges.info/?zoom=5&lat=65.63407&lon=41.15005&layers=B0
That being said, and I apologize in advance to my beloved Finns, Norwegians or Russians (that's where the holes are), but the inconvenience is rather limited to mostly non-hiking areas. The might to solve this issue is therefore rather low...
--
Reply to this email directly or view it on GitHub:
#337 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I was curious and got a shot at it. I'm not interested in filling the nothern holes but I'm a bit disappointed with the current DEM when we look at contour lines where there are vertical cliffs. The result (N45 E6) is just as it was, no progress, the Dent de Crolles summit is still hanging in the middle of the cliff : (This is the tiff tile + contour generation + OSM extract of ftp://ftp.eorc.jaxa.jp/pub/ALOS/ext1/AW3D30/release_v2012_single_format/N045E005/N045E005.zip ) |
At Opensnowmap I added a layer with the French hi-res Dem where you can clearly see the cliff at the Dent de Crolles.
Is it a simple issue of resolution (30m)? A flaw in gdal contour algorithm?
|
This comment was marked as duplicate.
This comment was marked as duplicate.
I dont know if just skip the compress part to JPEG is good enough to close this issue? Can it be that stefan used another source for his DEMs where compressing with jpeg also works? for my other issue i created #338 |
Yes, sorry, I guess you are right : Maybe let it open |
since #338 is done now ill focus again on this one because rendering is slow with the LZW compressed tiffs. I googled a little bit and and came to no result. But is has to do something with how transparency is handled with JPEG compressed TIFF files. Interesting thread here https://gis.stackexchange.com/questions/114370/compression-artifacts-and-gdal "The truth is that transparency can't be handled with transparent pixels with JPEG compression not other lossy compression methods." So I would need a basis with no "nodata" parts. or I just let i be as it is and the seeding of the whole map takes just more time. |
I found something out. When editing the warp file with gdal_edit.py -a_nodata 0 warp-1000.tif we can really see the spots where the tif is transparent: After: The holes are the same. there is no issue with transparency? What i can also see it that there is no alpha channel in the file before and after the gdaldem: Before:
After:
But only the NoData Value is new which is 0 |
"rendering is slow with the LZW compressed tiffs" You seem to focus on rendering speed, but I doubt you will ever be satisfied with lossy Jpeg compression : even if you fix these holes artifacts, you'll probably see others coming from the jpeg compression. |
talking about downsampled tiffs for each zoom layer:
that one is made with
and
When i want to make a tiff for every zoomlevel: 9,10,11,12,13,14,15,16,17 what -tr, and -z values do i have to take? |
Just to show you my setup here: I have these containers running. The server is a VM. it has 24 cores, 64gb ram and a 2 tb disk - the storage is based on NVMe so the speed should be good. I checked the postgres db X times to change configuration and make the performance better. |
Basically you want to have the bigger tiff for the zoom level closest to your Dem resolution, normally zoom 11.
Then another tiff with 1/2 resolution, for z10, 1/4 for z9, 1/8 for z8...
Zoom level 12 and above, keep the full resolution for Mapnik to upsample. This is described in the readme.
Le 3 février 2023 07:50:24 GMT+01:00, a14stoner ***@***.***> a écrit :
…talking about downsampled tiffs for each zoom layer:
Right now at zoom9-17 i have one hillshade tiff:
```
<Style name="hillshade-90">
<Rule>
&maxscale_zoom9;
&minscale_zoom17;
<RasterSymbolizer comp-op="grain-merge" opacity="0.83" scaling="bilinear" />
</Rule>
</Style>
<Layer name="hillshade-90">
<StyleName>hillshade-90</StyleName>
<Datasource>
<Parameter name="type">gdal</Parameter>
<Parameter name="file">dem/hillshade-90.tif</Parameter>
<!--Parameter name="file">dem/hillshade-30m-jpeg.tif</Parameter-->
<Parameter name="format">tiff</Parameter>
</Datasource>
</Layer>
```
that one is made with
```
gdalwarp -co BIGTIFF=YES -co TILED=YES -co COMPRESS=LZW -co PREDICTOR=2 -t_srs "+proj=merc +ellps=sphere +R=6378137 +a=6378137 +units=m" -r bilinear -tr 90 90 raw.tif warp-90.tif
```
and
```
gdaldem hillshade -z 2 -co compress=lzw -co predictor=2 -co bigtiff=yes -compute_edges warp-90.tif hillshade-90.tif
```
When i want to make a tiff for every zoomlevel:
9,10,11,12,13,14,15,16,17 what -tr, and -z values do i have to take?
--
Reply to this email directly or view it on GitHub:
#337 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
i only render above z10 -> z10,11,12,13,14,15,16,17 so the current configuration and tifs should be okay. 👍 |
seeded 151144 tiles (4696 skipped), now at z5 x368 y82 (i started from z10 because i dont need z0-9). So i am at z15 right now. until its finished it will take ages..... when it seeded since 2 weeks. i see at docker stats:
that mapproxy (which includes mapnik) has the most resources. The question is now how to increase the speed of rendering the tiles. |
Hi, I have just finished building my server but when I run my sample set of data I also get these holes? I went through this thread and as I understand my data is bad and that is the reason I get these holes in the shadows? Am I using incorrect data or am I doing something incorrectly? I am pretty stuck at the moment. Any help/advice would be greatly appreciated. Regards, |
Hello,
I made the import the exact way as described here: https://github.com/der-stefan/OpenTopoMap/blob/master/mapnik/README.md
When rendering the map some holes appear at the shadow side of the hills - you can see it in the attached image.
i see the holes come from the hillshade tifs
I tried to recreate the hillshade tifs but no sucess. the holes are always there.
The text was updated successfully, but these errors were encountered: