0

I have a lot of raster data Sentinel-2, I need to display them on the map with MapServer/WMS.

when I saved the data as images through the QGIS, they were displayed correctly, because as much data I can not save all the files. You need to automate this.

There is a commands of GDAL that saves raster data as an image?

Or is it possible to configure the server so that it correctly displays such data?

now the data is displayed like this enter image description here

In my map file

    LAYER
    NAME ndci2
    TYPE RASTER
    DUMP true
    TEMPLATE fooOnlyForWMSGetFeatureInfo
    DATA '/var/www/html/novndci.tif'
    METADATA
      wms_title 'test'
      wms_abstract 'test'
      "wms_server_version" "1.1.1"
      "wms_srs" "EPSG:4326"
   END
  STATUS ON
    PROCESSING "RESAMPLE=BILINEAR"
    PROCESSING "NODATA=0"
        PROCESSING "SCALE=0,255" 
    TRANSPARENCY 100
    OPACITY 100
   END

update: add gdal info

    Size is 3836, 4638
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (571370.000000000000000,6067940.000000000000000)
Pixel Size = (10.000000000000000,-10.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  571370.000, 6067940.000) (Invalid angle,Invalid angle)
Lower Left  (  571370.000, 6021560.000) (Invalid angle,Invalid angle)
Upper Right (  609730.000, 6067940.000) (Invalid angle,Invalid angle)
Lower Right (  609730.000, 6021560.000) (Invalid angle,Invalid angle)
Center      (  590550.000, 6044750.000) (Invalid angle,Invalid angle)
Band 1 Block=3836x1 Type=UInt16, ColorInterp=Gray
  Min=240.000 Max=7668.000 
  Minimum=240.000, Maximum=7668.000, Mean=635.443, StdDev=321.799
  NoData Value=0
  Metadata:
    STATISTICS_MAXIMUM=7668
    STATISTICS_MEAN=635.442720376
    STATISTICS_MINIMUM=240
    STATISTICS_STDDEV=321.79868425468

Update#2 add example data

Example data

  • 1
    confused writing you do ... – pLumo Aug 24 '18 at 9:17
  • It looks like the nodata areas are not made transparent. You should add gdalinfo report of one image so we can find how the nodata should be handled. OFFSITE is the word to use for defining the nodata of the source data. What you have done sets nodata into 0 for the output. – user30184 Aug 24 '18 at 9:21
  • @user30184, I added gdalinfo report – Rumato Aug 24 '18 at 11:03
  • What kind of data is this? This is not original Sentinel-2 data. Also, the file is declared as WGS84, but these are not WGS84 coordinates. – pLumo Aug 24 '18 at 11:08
  • I agree with @RoVo, gdalinfo shows that there is something wrong with the projection. Also a LAYER section of the mapfile is not enough for finding out what goes wrong. For example, your layer is missing PROJECTION block but it may still work if the projection that is defined at the MAP level is the same and correct. But nobody can know with this information. – user30184 Aug 24 '18 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.