New beta version, 7.2.XbetaX

Started by orux, December 07, 2017, 03:52:18 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

orux

#60
Quote from: Maki post_id=12969 time=1520099568 user_id=100
I came from Beta 10, but I really didn't use it, due to lack of time I just tried a couple of minutes the degree option with measure tool. Anyway I cleared app data and started from scratch, it works now. The multiply option is still broken, it only works when opacity is set to 1.0 which generally has a too strong effect: if you set it to 0.5 you should just weaken the effect but you actually lighten the whole map. Try it in any image editor.



When activating the slope maps you said we have to also set the dem resolution to the highest setting, which isn't the default. Anybody who isn't reading the forums wouldn't know. Automatically doing it (with a warning) as usually would be the best option.



I also noticed that I had to manually refresh the map list to see these special maps.




I am using android Multiply transformation, where the alpha channel result is the product of alpha channels. I am not an expert on this, but I have not found another way to do it.



https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html">https://developer.android.com/reference ... .Mode.html">https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html



I am going to change the default value for dem resolution. It is a low value for new devices.





orux

Maki

#61
I'm not sure what alpha channels have to do with this, they are usually used to manage transparency.

The "multiply" thingy I'm referring to is the one explained here:

https://tilemill-project.github.io/tilemill/docs/guides/comp-op/">//https://tilemill-project.github.io/tilemill/docs/guides/comp-op/

or here:

https://docs.gimp.org/en/gimp-concepts-layer-modes.html">//https://docs.gimp.org/en/gimp-concepts-layer-modes.html



How are you applying opacity?

orux

#62
Quote from: Maki post_id=12972 time=1520105808 user_id=100
I'm not sure what alpha channels have to do with this, they are usually used to manage transparency.

The "multiply" thingy I'm referring to is the one explained here:

https://tilemill-project.github.io/tilemill/docs/guides/comp-op/">//https://tilemill-project.github.io/tilemill/docs/guides/comp-op/

or here:

https://docs.gimp.org/en/gimp-concepts-layer-modes.html">//https://docs.gimp.org/en/gimp-concepts-layer-modes.html



How are you applying opacity?


I apply 'Multiply' blend mode:  

Multiplies the source and destination pixels.

(alpha_{out} = alpha_{src} * alpha_{dst})

(C_{out} = C_{src} * C_{dst})



If one or both images are semitransparent, the resulting image is semitransparent.



If finally I remove the transparency from the result image, I get the same image than if both images wasn't semitransparent.





orux

eartrumpet

#63
Quote from: orux post_id=12927 time=1519400241 user_id=2


That device has a good CPU, strange.



Midium level devices, like huawei p8, takes 8-10 seconds the entire display.

I tested with other DEM files, as I too use the high quality mentioned http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932">here. But still painfully slow with new algorithm, also with different relief map resolution settings. BTW, it would be about time to change the title of nearly all settings here from "relief map" to "DEM based maps" or similar.
Quote
About zoom levels; it is easy, I will add that feature.

Thanks, that's good to have, although I would prefer to have this setting not in the composite maps (also some probably like it there), but in the relief map settings, because then it would be applied also to the "apply hill shadows" setting in the "Mapsforge settings". Having it in composite maps results in two problems: I have to generate composite maps for every mapsforge map, instead of just applying one setting, and also cluttering the available maps menu. The other - mapsforge tiles are not at native device ppi size with composite maps (probably 512px instead of 768px with my device). The results are similar as before this was fixed:

http://www.oruxmaps.com/foro/viewtopic.php?p=10842#p10842">http://www.oruxmaps.com/foro/viewtopic. ... 842#p10842">http://www.oruxmaps.com/foro/viewtopic.php?p=10842#p10842

So I would suggest to zoom other maps to the tile size of mapsforge maps when they are used in composite maps. And also to add a zoom-min/max setting in the relief maps settings.

Best regards,

Tobias

Maki

#64
If I understand correctly you are multiplying alpha channels by themselves. That's not the way to do it. Source alpha should be applied to source image, destination alpha to destination image. Then you multiply the results. In other words if one image is fully opaque the result has to be fully opaque.

Mapper-Alps12

#65
Hello Orux,



as I mentioned here http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932">http://www.oruxmaps.com/foro/viewtopic. ... 932#p12932">http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932 it takes with beta11 too long to show the relief map when I use the high precision DEM. Here a solution would be very welcome.



With beta11 the "Center map dialog" function with all type coordinates (degrees, utm, swiss grid, mgrs,...) doesn't work for me, same problem like I told you here http://www.oruxmaps.com/foro/viewtopic.php?f=4&t=4477&start=100#p12460">http://www.oruxmaps.com/foro/viewtopic. ... 100#p12460">http://www.oruxmaps.com/foro/viewtopic.php?f=4&t=4477&start=100#p12460. I've sent several bug reports.



Also I have the same problem as Maki wrote with Multimaps. In beta10 it worked fine. But in beta11 I'm not able to create any Multimap. Also I can't see the zoom numbers in the map creation dialogue for Multimaps. This worked well in beta10.

orux

#66
Quote from: Maki post_id=12976 time=1520114088 user_id=100
If I understand correctly you are multiplying alpha channels by themselves. That's not the way to do it. Source alpha should be applied to source image, destination alpha to destination image. Then you multiply the results. In other words if one image is fully opaque the result has to be fully opaque.


No, I use android library that does blend 'multiply', and applies that formula. (alpha_{out} = alpha_{src} * alpha_{dst}) (C_{out} = C_{src} * C_{dst})



Correct me if I'm wrong:



OPTION A)

I have two pixels, one of the base layer, one of the top layer, ARGB format

base -> (255, 200, 200, 200)

top ---> (255, 100, 100, 100)

If I multiply both (using android MULTIPLY PorterDuffXfermode, the result is:

res ---> (255, 200x100/255, 200x100/255, 200x100/255) = (255, 78, 78, 78)



OPTION B)

If I first apply transparency to the top pixel (50%), and then I multiply them:

base -> (255, 200, 200, 200)

top ---> (128, 100, 100, 100)

res ---> (128*255/255, 200x100/255, 200x100/255, 200x100/255) = (128, 78, 78, 78)

if then I remove transparency, I get the same pixel than OPTION A): (255, 78, 78, 78)



What am I missing?

orux

#67
Quote from: Mapper-Alps12 post_id=12979 time=1520149492 user_id=5155
Hello Orux,



as I mentioned here http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932">http://www.oruxmaps.com/foro/viewtopic. ... 932#p12932">http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932 it takes with beta11 too long to show the relief map when I use the high precision DEM. Here a solution would be very welcome.



With beta11 the "Center map dialog" function with all type coordinates (degrees, utm, swiss grid, mgrs,...) doesn't work for me, same problem like I told you here http://www.oruxmaps.com/foro/viewtopic.php?f=4&t=4477&start=100#p12460">http://www.oruxmaps.com/foro/viewtopic. ... 100#p12460">http://www.oruxmaps.com/foro/viewtopic.php?f=4&t=4477&start=100#p12460. I've sent several bug reports.



Also I have the same problem as Maki wrote with Multimaps. In beta10 it worked fine. But in beta11 I'm not able to create any Multimap. Also I can't see the zoom numbers in the map creation dialogue for Multimaps. This worked well in beta10.


Are you using 1" DEM files or with more resolution?



I'm afraid there is no solution in the middle of old/new algorithm.



In my 'one plus 5' it takes 100-300 milliseconds to build a 512x512 tile, with the new algorithm, and 1" DEM files.



I found a bug report about 'center map dialog' from a HTC 10 device. Really strange bug, I can not reproduce it. I will try to solve it in next beta version.



What do you mean with you can not create multimaps? which kind of problem? which maps are you trying to composite?





orux

orux

#68
Quote from: eartrumpet post_id=12975 time=1520113973 user_id=518
Quote from: orux post_id=12927 time=1519400241 user_id=2


That device has a good CPU, strange.



Midium level devices, like huawei p8, takes 8-10 seconds the entire display.

I tested with other DEM files, as I too use the high quality mentioned http://www.oruxmaps.com/foro/viewtopic.php?p=12932#p12932">here. But still painfully slow with new algorithm, also with different relief map resolution settings. BTW, it would be about time to change the title of nearly all settings here from "relief map" to "DEM based maps" or similar.
Quote
About zoom levels; it is easy, I will add that feature.

Thanks, that's good to have, although I would prefer to have this setting not in the composite maps (also some probably like it there), but in the relief map settings, because then it would be applied also to the "apply hill shadows" setting in the "Mapsforge settings". Having it in composite maps results in two problems: I have to generate composite maps for every mapsforge map, instead of just applying one setting, and also cluttering the available maps menu. The other - mapsforge tiles are not at native device ppi size with composite maps (probably 512px instead of 768px with my device). The results are similar as before this was fixed:

http://www.oruxmaps.com/foro/viewtopic.php?p=10842#p10842">http://www.oruxmaps.com/foro/viewtopic. ... 842#p10842">http://www.oruxmaps.com/foro/viewtopic.php?p=10842#p10842

So I would suggest to zoom other maps to the tile size of mapsforge maps when they are used in composite maps. And also to add a zoom-min/max setting in the relief maps settings.

Best regards,

Tobias


where can I download high resolution DEM files in HGT format? I only see them in tiff format. I would like to test them.



But I think 1" files are enough for using in oruxmaps.



Yes, I was thinking in a name, but DEM based maps is a good name for that set of settings.



It is possible to add a new setting in DEM based maps to adjust min/max zoom levels.



There are maps that can be used at different tile sizes (not all), but yes shadows/slopes/relief. When a composite map is created, the base map tile size should be used, but you are right it is not working fine if it is using 512px if base map is a mapsforge map.



orux

Mapper-Alps12

#69
Hi,



I use .hgt-files with more Resolution. The format is the same like the 1', but the files are much larger, ca. 25 MB. You can download the high resolution DEM files in .hgt-format for Spain here http://data.opendataportal.at/dataset/dtm-spain">http://data.opendataportal.at/dataset/dtm-spain, just choose the "DTM Spain Mainland,1 sec" then you will find the .hgt-files here https://drive.google.com/drive/folders/0BxphPoRgwhnoRVVwT1N4bzc2RnM">https://drive.google.com/drive/folders/ ... 1N4bzc2RnM">https://drive.google.com/drive/folders/0BxphPoRgwhnoRVVwT1N4bzc2RnM. They're created of LIDAR, more details and a discussion you will find in the OAM-Forums here https://www.openandromaps.org/oam-forums/topic/neues-genaueres-hoehenmodell-fuer-oesterreich">https://www.openandromaps.org/oam-forum ... esterreich">https://www.openandromaps.org/oam-forums/topic/neues-genaueres-hoehenmodell-fuer-oesterreich (in German). The reason why we prefer to get this much better DTM working with your app is that you get these high precision LIDAR files for many European countries, e.g. Austria, Germany, Itlaly, Luxemburg, Slovenia und Spain.



Thanks for trying to find a solution for the Center map dialogue. It worked well up to beta10, it also works fine in the current version 7.2.7 you can download on your Homepage.



The Multimaps I try to create are 2 MBTiles maps. I can add them in the multimaps creation dialogue but after that they're not in the map list, as a user described before me here. This worked well in last beta10 and ever before. I never had any problems, neither to combine a mapsforge-map and a raster map nor 2 raster maps. Everything worked fine.

orux

#70
Quote from: Mapper-Alps12 post_id=12983 time=1520184583 user_id=5155
Hi,



I use .hgt-files with more Resolution. The format is the same like the 1', but the files are much larger, ca. 25 MB. You can download the high resolution DEM files in .hgt-format for Spain here http://data.opendataportal.at/dataset/dtm-spain">http://data.opendataportal.at/dataset/dtm-spain, just choose the "DTM Spain Mainland,1 sec" then you will find the .hgt-files here https://drive.google.com/drive/folders/0BxphPoRgwhnoRVVwT1N4bzc2RnM">https://drive.google.com/drive/folders/ ... 1N4bzc2RnM">https://drive.google.com/drive/folders/0BxphPoRgwhnoRVVwT1N4bzc2RnM. They're created of LIDAR, more details and a discussion you will find in the OAM-Forums here https://www.openandromaps.org/oam-forums/topic/neues-genaueres-hoehenmodell-fuer-oesterreich">https://www.openandromaps.org/oam-forum ... esterreich">https://www.openandromaps.org/oam-forums/topic/neues-genaueres-hoehenmodell-fuer-oesterreich (in German). The reason why we prefer to get this much better DTM working with your app is that you get these high precision LIDAR files for many European countries, e.g. Austria, Germany, Itlaly, Luxemburg, Slovenia und Spain.


Thanks, those files are the same I am using.


Quote from: Mapper-Alps12 post_id=12983 time=1520184583 user_id=5155
Thanks for trying to find a solution for the Center map dialogue. It worked well up to beta10, it also works fine in the current version 7.2.7 you can download on your Homepage.


The strange thing is that there is no changes in that dialog. The bug report is very rare.


Quote from: Mapper-Alps12 post_id=12983 time=1520184583 user_id=5155
The Multimaps I try to create are 2 MBTiles maps. I can add them in the multimaps creation dialogue but after that they're not in the map list, as a user described before me here. This worked well in last beta10 and ever before. I never had any problems, neither to combine a mapsforge-map and a raster map nor 2 raster maps. Everything worked fine.


Thanks;



yes, there were a bug using mbtiles in composite maps, solved,





orux

eartrumpet

#71
Quote from: orux post_id=12982 time=1520176696 user_id=2


where can I download high resolution DEM files in HGT format? I only see them in tiff format. I would like to test them.

They are not higher resolution than usual, but higher quality data, those that Mapper-Alps12 already mentioned.
Quote
It is possible to add a new setting in DEM based maps to adjust min/max zoom levels.

Thanks, that would help a lot! As Maki also said, having only the choice of 9-16 for DEM based maps in composite maps shouldn't be necessary (also I don't think there's really a need for other zoom levels). higher zoom levels could easily be scaled digitally.


QuoteThere are maps that can be used at different tile sizes (not all), but yes shadows/slopes/relief. When a composite map is created, the base map tile size should be used, but you are right it is not working fine if it is using 512px if base map is a mapsforge map.

Indeed, and it makes sense so that mapsforge maps show as they are meant to be.

OpenSlopeMap

#72
Hi Orux,



as a member of the free project "OpenSlopeMap.org" I would like to draw your attention to the WMTS service at http://www.openslopemap.org">www.openslopemap.org:



http://wmts.openslopemap.org/wmts">http://wmts.openslopemap.org/wmts?



We at OpenSlopeMap. org would be happy if it could also be permanently recorded and referenced in Oruxmaps.



Thank you very much,

Peter from OpenSlopeMap.org

Maki

#73
Quote from: orux post_id=12980 time=1520174242 user_id=2
What am I missing?


Uhhhmmm, the goal I guess... :-)



Let's forget the numbers for a moment and start from a qualitative analysis.

When you use "normal" blending with x% opacity in the top layer you actually take x% of information from the top and (100-x)% from the base. This leads to washed out images, or a weak effect. See the picture below, hillshading is on top of a mapsforge map; it starts with full opacity on the left, where you don't even see the map and goes to 0 where you don't see the shading. None of the settings is satisfactory.

https://flic.kr/p/23ybqCk">https://flic.kr/p/23ybqCk">Normal blending by https://www.flickr.com/photos/30914757@N04/">Maki, su Flickr



The common trick to add hillshading while keeping good contrast and colour is to use the multiply blending mode. I'm referring to the Photoshop implementation of the blending mode, which is the same in every graphic software I used, including cartographic apps like QGIS ot Tilemill. Look at the picture:

https://flic.kr/p/FggdkB">https://flic.kr/p/FggdkB">Multiply by https://www.flickr.com/photos/30914757@N04/">Maki, su Flickr

Like above, at left the top layer has full opacity, at the right none. Note that the map with every opacity setting the map retains (or gains) contrast, black is always black. The goal it to have the same behaviour. Currently only opacity 1.0 works in OruxMaps, as soon as you lower the opacity to weaken the effect you wash out the whole map. Try with opacity 0.1 and you get an almost white screen.



If you apply opacity to the top layer against a white background, and then multiply the result with the base you get the correct result.

In your example 50% of the top layer gives RGB(178,178,178). Multiply that for the base and you get RGB(139,139,139), which is what Photoshop would give an what you want.

I suppose there is an elegant method to do it in one pass, how to implement it exactly I don't know, I'm not a coder.

orux

#74
Quote from: Maki post_id=12993 time=1520289187 user_id=100
Quote from: orux post_id=12980 time=1520174242 user_id=2
What am I missing?


Uhhhmmm, the goal I guess... :-)



Let's forget the numbers for a moment and start from a qualitative analysis.

When you use "normal" blending with x% opacity in the top layer you actually take x% of information from the top and (100-x)% from the base. This leads to washed out images, or a weak effect. See the picture below, hillshading is on top of a mapsforge map; it starts with full opacity on the left, where you don't even see the map and goes to 0 where you don't see the shading. None of the settings is satisfactory.



The common trick to add hillshading while keeping good contrast and colour is to use the multiply blending mode. I'm referring to the Photoshop implementation of the blending mode, which is the same in every graphic software I used, including cartographic apps like QGIS ot Tilemill. Look at the picture:



Like above, at left the top layer has full opacity, at the right none. Note that the map with every opacity setting the map retains (or gains) contrast, black is always black. The goal it to have the same behaviour. Currently only opacity 1.0 works in OruxMaps, as soon as you lower the opacity to weaken the effect you wash out the whole map. Try with opacity 0.1 and you get an almost white screen.



If you apply opacity to the top layer against a white background, and then multiply the result with the base you get the correct result.

In your example 50% of the top layer gives RGB(178,178,178). Multiply that for the base and you get RGB(139,139,139), which is what Photoshop would give an what you want.

I suppose there is an elegant method to do it in one pass, how to implement it exactly I don't know, I'm not a coder.




Thanks, Maki;



And I am a coder, not an expert in colors. In fact, I'm a bit colorblind, I've never been good working with colors  :?



The key was in your comment; in painting the top layer, semitransparent, on a white canvas, before multiplying top / bottom layers.



Solved (I think)





orux