Geographic Information Systems Asked on January 6, 2022
I have encoded some metrics in a 4-band geotiff that will be served by MapServer (v7.4), and I want to "decode" them client-side for display using raster operations in OpenLayers (v6.1). (This is something somewhat similar to what is done in this openlayers workshop.)
The problem is that my metrics values range from 1 to 156 (and I used 255 for nodata), and MapServer scale them to 0-254 during rendering for better display, so the client do not have access to the original metrics.
I would need the client to have access to the original values. I have tried adding the following directives to the mapfile layer definition, but to no avail.
‘PROCESSING "LUT=1:1,156:156"’
or ‘PROCESSING "SCALE=0,254"’
Here is the layer definition:
LAYER
NAME tif_source
STATUS ON
TYPE RASTER
DATA "/test.tif"
PROJECTION
"init=epsg:32198"
END
METADATA
wms_enable_request "*"
wms_title "tif_source"
END
# PROCESSING "SCALE_1=0,254" ## does not produce the expected result
# PROCESSING "LUT=1:1,156:156" ## does not work either
PROCESSING "LOAD_FULL_RES_IMAGE=YES"
DEBUG 4
END
How should I prevent MapServer from scaling the raster values during rendering?
If you want to use data from a W*S then you should be using a WCS not a WMS. a WMS returns a picture of the data while a WCS returns the actual raster data.
MapServer supports WCS so it should be easy.
Answered by Ian Turton on January 6, 2022
1 Asked on February 17, 2021 by basile
1 Asked on February 17, 2021 by ashley-lynn-tarver
0 Asked on February 17, 2021 by brian-fisher
1 Asked on February 17, 2021 by iqbalhabibie-habibie
3 Asked on February 17, 2021 by elise
0 Asked on February 17, 2021 by user175279
1 Asked on February 17, 2021 by mrxsquared
0 Asked on February 17, 2021
arcgis desktop attribute table error 999999 raster spatial analyst
1 Asked on February 17, 2021 by jt-cox
coordinate system latitude longitude multi polygon postgis shapefile
1 Asked on February 17, 2021 by nart-barileva
2 Asked on February 17, 2021 by asdqwery
1 Asked on February 17, 2021 by vibin
0 Asked on February 17, 2021 by thunderspark
0 Asked on February 17, 2021 by link-maxwell
1 Asked on February 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP