Hillshading #922

Closed
wants to merge 28 commits into
from

Conversation

Projects
None yet
2 participants
@usrusr
Contributor

usrusr commented Feb 11, 2017

Open todos:

  1. Alignment is sometimes off
  2. unfiltered upscaling is on Android
  3. the conversion from height values is just placeholder quality
  4. The decision between AwtLuminanceShadingComposite and AlphaComposite should either be properly exposed to client applications (or themes) or it should go (properly hardcoded, without pretensions of flexibility). Without a consistent implementation on the Android side I would suggest staying with alpha blending on both sides (I would personally prefer luminance blending, since I expect it to work better with existing themes)

usrusr added some commits Jan 24, 2017

reverted shading mono bitmaps because vanilla android offers even les…
…s in terms of image blending modes than AWT (colors can be mangled freely with a colormatrix, but blending will use the alpha from before the mangling)
revert pointless and off-topic refactor fix #753 (done under the wron…
…g assumption that ways are pushed into PolyLineContainers more often than they are read)
make AWT shading compatible with simple alpha blend (with raw bitmap …
…values corresponding to the mapping required by the Android implementation)
Merge remote-tracking branch 'usrusr/hills' into hills
Conflicts:
	mapsforge-map-android/src/main/java/org/mapsforge/map/android/graphics/AndroidCanvas.java
	mapsforge-map-android/src/main/java/org/mapsforge/map/android/graphics/AndroidGraphicFactory.java

usrusr added some commits Feb 12, 2017

hillshading rendering based on shading tile/map tile intersection tha…
…t improves alignment and enables filtered upscaling on android,

unfinished renderscript alternative not removed yet (includes a nice workaround to enable rendersript kernels on rbg565)
@usrusr

This comment has been minimized.

Show comment
Hide comment
@usrusr

usrusr Feb 12, 2017

Contributor

alignment and unfiltered upscaling on android are fixed with latest commit (by switching from matrix-contolled scaling to src-rect/dest-rect controlled scaling), sorry for being a moving target

Contributor

usrusr commented Feb 12, 2017

alignment and unfiltered upscaling on android are fixed with latest commit (by switching from matrix-contolled scaling to src-rect/dest-rect controlled scaling), sorry for being a moving target

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Feb 12, 2017

Collaborator

Thanks!

I'd like to parse the PR for some improvements like code formatting, methods order and rebase / squash in a new branch to be able to continue there.
Have you other immediate work to push or PR will be quiet for some time?

Collaborator

devemux86 commented Feb 12, 2017

Thanks!

I'd like to parse the PR for some improvements like code formatting, methods order and rebase / squash in a new branch to be able to continue there.
Have you other immediate work to push or PR will be quiet for some time?

@devemux86 devemux86 referenced this pull request Feb 12, 2017

Open

Hillshading #923

@usrusr

This comment has been minimized.

Show comment
Hide comment
@usrusr

usrusr Feb 12, 2017

Contributor

I expect work on todo.3 (better hgt to shading) to be pretty much self-contained in a new implementation of o.mf.m.layer.hills.ShadingAlgorithm so it will smoothly merge with any changes you make to the stuff in the current PR. I'll just do it in a new branch so that I can keep the merging effort with your changes to the current PR on my side.

Contributor

usrusr commented Feb 12, 2017

I expect work on todo.3 (better hgt to shading) to be pretty much self-contained in a new implementation of o.mf.m.layer.hills.ShadingAlgorithm so it will smoothly merge with any changes you make to the stuff in the current PR. I'll just do it in a new branch so that I can keep the merging effort with your changes to the current PR on my side.

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Feb 12, 2017

Collaborator

I'll merge this PR and any improvements in a new hillshading branch for users to start playing with it.
Then you can fetch it and post any new changes in that branch as new future PR, in order to update that.

BTW you can use GitHub markdown task lists in your first comment to indicate the completed tasks.

Collaborator

devemux86 commented Feb 12, 2017

I'll merge this PR and any improvements in a new hillshading branch for users to start playing with it.
Then you can fetch it and post any new changes in that branch as new future PR, in order to update that.

BTW you can use GitHub markdown task lists in your first comment to indicate the completed tasks.

devemux86 added a commit that referenced this pull request Feb 12, 2017

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Feb 12, 2017

Collaborator

Rebased, squashed and merged in hillshading branch via f66021f, with minor improvements via 16be706.

Can you post any future PR work on that branch?

Collaborator

devemux86 commented Feb 12, 2017

Rebased, squashed and merged in hillshading branch via f66021f, with minor improvements via 16be706.

Can you post any future PR work on that branch?

@devemux86 devemux86 added this to the 0.8.0 milestone Feb 26, 2017

devemux86 added a commit that referenced this pull request Feb 26, 2017

@devemux86 devemux86 changed the title from Hillshading WIP to Hillshading Feb 26, 2017

@devemux86

This comment has been minimized.

Show comment
Hide comment
@devemux86

devemux86 Feb 26, 2017

Collaborator

Since regular Mapsforge API can continue as usual and for broader user visibility..
I rebased, squashed and merged via 7dd483c, with minor improvements via 1928ec9.

I included the hillshading rules in new renderTheme-v6 XML schema definition.
Also on Desktop Samples the 1st argument can be used as dem folder.

Collaborator

devemux86 commented Feb 26, 2017

Since regular Mapsforge API can continue as usual and for broader user visibility..
I rebased, squashed and merged via 7dd483c, with minor improvements via 1928ec9.

I included the hillshading rules in new renderTheme-v6 XML schema definition.
Also on Desktop Samples the 1st argument can be used as dem folder.

@devemux86 devemux86 closed this Feb 26, 2017

@usrusr usrusr deleted the usrusr:hills branch Oct 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment