[mapserver-users] Display of an RGB file

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Apr 14 12:28:34 PDT 2020


Hi Asen,

There seems to be several issues with your mapfile.

I found it easier to create my own small mapfile with your data: 
https://gatewaygeomatics.com/dl/nasa-goddard-space-flight-center.map

Here it is in action: 
https://ms4w.dev/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-nasa-goddard-space-flight-center/test.map&mode=browse&template=openlayers&layers=all

And you can add the WMS service into your local QGIS as a new WMS layer 
using this url: 
https://ms4w.dev/cgi-bin/mapserv.exe?map=/ms4w/apps/ticket-nasa-goddard-space-flight-center/test.map

I'd recommend just starting with that mapfile locally, generate a map 
image with a local 'shp2img' command, then test through the WMS service 
in a client.

Hope that helps.  Cheers from the east coast of Canada,

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/




On 2020-04-14 12:43 p.m., Radov, Asen (GSFC-619.0)[UNIVERSITY OF 
MARYLAND] wrote:
> Hello,
> 
> I am trying to display a RGB file, but with no success.
> 
> I was able to successfully display the RGB file in this 
> example:https://demo.mapserver.org/tutorial/example1-5.html
> 
> At this point, I think there is an issue with the file, maybe it is 
> missing some geo location information, but I am not sure.
> 
> Can someone double check if they can display this file? Any help is 
> appreciated.
> 
> Here is a link to it, since attaching It breaks the size limit:
> 
> LC8_015030_20190727_rgb.tif 
> <https://drive.google.com/file/d/1giMI5OPLU6SJZUhkK0ZxfySKSMP88G6G/view>
> 
> Here is my map file for reference:
> 
> MAP
> 
>    IMAGETYPE PNG
> 
>    EXTENT -180 -90 180 90
> 
>    SIZE           256 256
> 
>    SHAPEPATH      "/tis/stream/data"
> 
>    # The regular expression below will match 1 or more letters followed by
> 
>    # underscore followed by 1 or more numeric characters
> 
>    DATAPATTERN    "[a-z]+|_|[0-9]+"
> 
>    IMAGECOLOR     255 255 255
> 
>    CONFIG "MS_ERRORFILE" "/usr/local/error.log"
> 
>    DEBUG 5
> 
>    SymbolSet "symbols/symbols.sym"
> 
>    OUTPUTFORMAT
> 
>      NAME "png"
> 
>      DRIVER "AGG/PNG"
> 
>      MIMETYPE "image/PNG"
> 
>      IMAGEMODE RGBA
> 
>      TRANSPARENT ON
> 
>      EXTENSION "png"
> 
>      FORMATOPTION "COMPRESSION=1"
> 
>    END
> 
>    PROJECTION
> 
>      "init=epsg:4326"
> 
>    END
> 
>    WEB
> 
>      METADATA
> 
>        "wms_title"     "WMS STREAM Server"  ##required
> 
>        "wms_onlineresource" "http://localhost:8181/cgi-bin/mapserv?"   
> ##required
> 
>        "wms_srs"       "EPSG:4326"  ##recommended
> 
>        "wms_enable_request" "*"   ##necessary
> 
>      END
> 
>    END # Web
> 
>    LAYER
> 
>      NAME "rgb1"
> 
>      DATA ""
> 
>      PROCESSING "BANDS=1,2,3"
> 
>      TYPE RASTER
> 
>      STATUS ON
> 
>      DEBUG 5
> 
>      PROJECTION
> 
>        "init=epsg:4326"
> 
>      END
> 
>      METADATA
> 
>          wms_title "Tss range 0-1 layer"
> 
>          wms_srs "epsg:4326"
> 
>          wms_extent "-180 -90 180 90"
> 
>      END
> 
>    END
> 
> END
> 
> /Thank you, /
> 
> /Asen Radov/
> 
> //
> 
> /NASA Goddard Space Flight Center / Code 619/
> 
> /Phone: 301-614-6517/
> 
> /E-mail: asen.s.radov at nasa.gov <mailto:asen.s.radov at nasa.gov>/
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the MapServer-users mailing list