I Have a problem with novalue datas in my DEM… This is the workflow I did:
- my DEM datas are in multiple Arcgis ASCII grids… Each .asc files have a header containing "NODATA_value -99999.00". I opened the in QGIS 3.0.3 and merged them in QGIS
- I save my new layer in GeoTiff format, close QGIS and reopen my new GeoTIFF. All the "nodata" values have a value of -99999.
- I process my nodata values with
gdal_translate -co TILED=YES -of GTiff -a_nodata "-99999" input.tif outputNaN.tif
- On QGIS the outputNaN.tif has a correct behaviour, nodata are "no data"
- I created a Mapserver 7.0.7 map file:
MAP OUTPUTFORMAT NAME "GTiff" DRIVER GDAL/GTiff MIMETYPE "image/tiff" IMAGEMODE INT16 EXTENSION "tif" END NAME "Modèle numérique de terrain" EXTENT -6.0001389 39.9998611 10.0001389 52.0001389 MAXSIZE 4096 PROJECTION "init=epsg:2154" END WEB METADATA "wcs_label" "WCS Server" "wcs_onlineresource" "http://localhost/cgi-bin/mapserv?map=/tmp/testNaN.map&" "wcs_enable_request" "*" "wcs_fees" "none" "wcs_accessconstraints" "none" "wcs_keywordlist" "wcs,dem" "wcs_metadatalink_type" "TC211" "wcs_metadatalink_format" "text/plain" "wcs_metadatalink_href" "http://localhost" "wcs_address" "" "wcs_city" "Paris" "wcs_stateorprovince" "IDF" "wcs_postcode" "75000" "wcs_country" "France" "wcs_contactelectronicmailaddress" "[email protected]" "wcs_contactperson" "me" "wcs_contactorganization" "unemployed" "wcs_contactposition" "manager" "wcs_contactvoicetelephone" "" "wcs_contactfacimiletelephone" "" "wms_title" "WMS Server" "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=/tmp/testNaN.map&" "wms_srs" "EPSG:2154" "wms_enable_request" "*" "wfs_title" "WFS Server" "wfs_onlineresource" "http://localhost/cgi-bin/mapserv?map=/tmp/testNaN.map&" ## Recommended "wfs_srs" "EPSG:2154 EPSG:4326 EPSG:5698" ## Recommended "wfs_abstract" "WFS Server" "wfs_enable_request" "*" END END LAYER NAME TESTNAN DATA "/tmp/outputNaN.tif" STATUS ON TYPE RASTER PROCESSING "SCALE=AUTO" PROJECTION "init=epsg:2154" END METADATA "wms_title" "DEM 75m" "wcs_description" "Modèle numérique de terrain" "wcs_name" "DEM 75m" "wcs_label" "DEM (rés: 75m)" "wcs_srs" "EPSG:2154" "wcs_enable_request" "*" "wcs_bandcount" "1" "wcs_band_names" "Altitude" "Altitude_band_description" "Altitude en mètres" END END END
- But this layer has now -32768 value where a "nodata" must be found. I tried to play with
PROCESSING "NODATA=OFF"
orPROCESSING "NODATA=-32768"
but without success.
I know how to set in the layer properties in QGIS a transparency of 100% where pixel=-32768 . But I'd prefer to find a better solution. How can achieve this?