-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bounding box: calculation of MinMax values and add clamping options #1993
Conversation
68f82fc
to
67debc5
Compare
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.
Thanks for this PR! Except from my comments, don't forget to rename your commit with the angular convention :)
c8b6678
to
67fcdfe
Compare
examples/view_3d_mns_map.html
Outdated
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNS_HIGHRES.json').then(addElevationLayerFromConfig); | ||
// itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT.json').then(addElevationLayerFromConfig); |
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.
Shouldn't be commented out ?
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.
There is a probleme with the dataset linked with this configuration file or with the configuration file (IGN_MNT.json), that appear with the new changes. As it is only used in this example and the extra Elevation layer doesn't really seems to be important. I prefered to removed it and it can be eluded when the issue #2000 will be studied.
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.
Ok, could you describe this problem in #2000 please so we don't forget about it ?
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig); | ||
itowns.Fetcher.json('./layers/JSONLayers/IGN_MNT_HIGHRES.json').then(addElevationLayerFromConfig); | ||
itowns.Fetcher.json('./layers/JSONLayers/WORLD_DTM.json').then(addElevationLayerFromConfig); |
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.
it's issue #2000 ?
* @param {number} [config.clampValues.min] The minimum value to clamp the elevation | ||
* @param {number} [config.clampValues.max] The maximum value to clamp the elevation |
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.
you rename to make the parameters more understandable?
you keep zmin
and zmax
name for the layer properties?
* @param {number} [options.zmin] The minimum elevation value after which it will be clamped | ||
* @param {number} [options.zmax] The maximum elevation value after which it will be clamped |
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.
could you homogenize with clampValues
name?
if (d < layer.zmin) d = layer.zmin; | ||
if (d > layer.zmax) d = layer.zmax; | ||
if (d == layer.noDataValue) d = 0.; |
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.
there's a clamp
method in glsl
it seems to me that d
is an interpolated value, the filter nodatavalue
will not work here
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.
I changed it with the clamp method.
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.
I still want the nodata value to be interpreted as an elevation of zero in the texture. Can we check that together ?
…the elevation dataset
a3dc15d
to
a4989ff
Compare
Description
I changed the way the NodataValue is taken into account for the computation of the MinMax for the bounding box and also added an option to add clamping min and max value when creating a new layer.
Motivation and Context
There was a probleme with the segmentation of tile in relation with abnormal values in particular on see area.
issue #1945
It should also solve the problem seen on the issue #1981
Screenshots (if appropriate)