[MS4W-Users] Geotif - WMS using MS4W Zoo
TC Haddad
tchaddad at gmail.com
Tue Jun 2 12:23:34 EDT 2020
Hi Morten
Can you report the version of gdal that you used to generate the tif?
Only asking because last week I had a similar problem with a single band
tif that I created using gdal_translate and I was using (I believe) v.2.4.2
at the command line (MS4W 4.0.1).
The person that I passed the tif to could not access the pixel values using
Mapserver, which I found strange because the image displayed correctly. In
that case they solved it by using another program to open and re-save a new
tif. After that I stopped thinking about it (I thought it was my error),
but maybe there is something else going on?
Tanya
On Tue, Jun 2, 2020 at 5:47 AM Morten Aronsen via MS4W-Users <
ms4w-users at lists.ms4w.com> wrote:
>
> I’m strugling…
>
> With GeoTif output from a Zoo-service using useMapserver = true
>
>
>
> My python-service is reading a NETCDF-file, calculating climatology data
> and returning a geotif file made by gdal (in code python). My zcfg-file
> output is:
>
>
>
> <DataOutputs>
>
> [Result]
>
> Title = Impact map climatology
>
> Abstract = Geotif file containing the values from 1.25
> Green to 3.75 Red through yellow. image/png will give wms output.
>
> <MetaData>
>
> title = ImpactClimatology
>
> </MetaData>
>
> <ComplexData>
>
> <Default>
>
> mimeType = image/tiff
>
> useMapserver = true
>
> </Default>
>
> <Supported>
>
> mimeType = image/png
>
> useMapserver = true
>
> asReference = true
>
> msInclude =
> /ms4w/impact/impact.map
>
> msLayer = imp
>
> </Supported>
>
> <Supported>
>
> mimeType = image/tiff
>
> </Supported>
>
> </ComplexData>
>
> </DataOutputs>
>
>
>
> My impact map is (this is just test style expressions):
>
> MAP
> LAYER
> NAME "imp" # Corresponding to the msLayer defined
> TYPE RASTER
> CONNECTION "Result"
> STATUS on
> CLASSITEM "[pixel]"
> # class using an EXPRESSION using only [pixel].
> CLASS
> EXPRESSION ([pixel] = 1.25)
> STYLE
> COLOR 0 255 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 1.5)
> STYLE
> COLOR 64 255 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 1.75)
> STYLE
> COLOR 128 255 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 2.25)
> STYLE
> COLOR 192 255 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 2.5)
> STYLE
> COLOR 255 255 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 2.75)
> STYLE
> COLOR 255 192 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 3.25)
> STYLE
> COLOR 255 128 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 3.5)
> STYLE
> COLOR 255 64 0
> END
> END
> CLASS
> EXPRESSION ([pixel] = 3.75)
> STYLE
> COLOR 255 0 0
> END
> END
> END # LAYER
> END
>
>
>
> First of all, not using the impact.map-file and include a msStyle in the
> zcfg is not working. It is not picked up in the map-file created by zoo.
>
> With the impact.map included the style is picked up but image is blank.
> The map-file is attached.
> [image: image.jpeg]
>
>
>
> Not using any style what so ever presents the wanted image output from:
>
>
>
>
> http://localhost/cgi-bin/zoo_loader.cgi?SERVICE=WPS&VERSION=1.0.0&REQUEST=Execute&Identifier=Impact_M_ASW&ResponseDocument=Result@asReference=true@mimeType=image/png
>
>
> [image: image.jpeg]
>
>
>
> But I want to style the pixel values (a step gradient of 0.25 where 1.25 =
> green, 2.5 = yellow and 3.75 = red)
>
>
>
>
>
> (PS using RawDataOutput does not work as a direkt link to mapserver for
> some reason.)
>
>
>
> Is the problem connected to the fact that the output from the service is a
> geotif 1-band with pixel values and not vector data?
>
> Geotif attached. (similar to the netcdf output problem, which do not work
> for useMapserver output).
>
>
>
>
>
> Here is an example made in QGIS with the same tif-file:
> [image: image.jpeg]
>
>
>
> Regards
>
> *Morten*
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> https://lists.ms4w.com/mailman/listinfo/ms4w-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20200602/208be85e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpeg
Type: image/jpeg
Size: 2529 bytes
Desc: not available
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20200602/208be85e/attachment-0003.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpeg
Type: image/jpeg
Size: 16432 bytes
Desc: not available
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20200602/208be85e/attachment-0004.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpeg
Type: image/jpeg
Size: 7057 bytes
Desc: not available
URL: <https://lists.ms4w.com/pipermail/ms4w-users/attachments/20200602/208be85e/attachment-0005.jpeg>
More information about the MS4W-Users
mailing list