[Geomoose-users] Query a Mapserver raster group

James Klassen klassen.js at gmail.com
Fri Feb 3 13:21:10 PST 2017


Looks like the fake template trick doesn't work with raster layers.  So it
seems it needs an empty template file.  The following works for me:

Mapfile:
  LAYER
    NAME "query"
    GROUP "all"
    STATUS ON
    TYPE RASTER
    DATA 'raster-query.tif'
    TEMPLATE "template.html"
    TOLERANCE 0
    OPACITY 0
  END
  LAYER
    NAME "raster"
    GROUP "all"
    STATUS ON
    TYPE RASTER
    DATA 'raster-display.tif'
    TEMPLATE 'dummy.html'
  END

template.html:
<!-- MapServer Template -->
<div>
<b>RGB:</b>[value_list]
</div>

dummy.html:
<!-- MapServer Template -->


On Fri, Feb 3, 2017 at 11:39 AM, andy <aborruso at gmail.com> wrote:

> Hi James,
>
> On 3 February 2017 at 18:05, James Klassen <klassen.js at gmail.com> wrote:
>
>
>> So you need the DEM layer with a valid template and the cosmetic layer
>> with just something like
>>
>> TEMPLATE 'dummy'
>>
> I’m able to load the group and I’m able to query the single DEM file
> (below my settings).
> But if I load the group and the click on the map I have no query output.
> If I look to log file I see that I have msRasterQueryByRect action for
> other raster layer, but not for the loaded group.
>
> Is it normal? Could it be a small bug related to query a raster query
> group?
>
> Thank you
>
>   LAYER
>     DATA "dem.tif"
>     EXTENT 369957.267038251 4124951.49692997 378066.716402869 4133060.94629459
>     GROUP "DEMG"
>     METADATA
>       "coordsys_name"    "WGS 84 / UTM zone 33N"
>       "ows_title"    "dem"
>       "identify_record"    "dem.html"
>       "wms_group_title"    "DEMG"
>     END # METADATA
>     NAME "dem"
>     PROJECTION
>       "proj=utm"
>       "zone=33"
>       "datum=WGS84"
>       "units=m"
>       "no_defs"
>     END # PROJECTION
>     STATUS ON
>     TEMPLATE "dem.html"
>     TILEITEM "location"
>     TOLERANCE 0
>     TYPE RASTER
>     UNITS METERS
>     CLASS
>       NAME "dem"
>     END # CLASS
>   END # LAYER
>
>   LAYER
>     DATA "cosmetic.tif"
>     EXTENT 369957.267038251 4124951.49692997 378066.716402869 4133060.94629459
>     GROUP "DEMG"
>     METADATA
>       "coordsys_name"    "WGS 84 / UTM zone 33N"
>       "ows_title"    "cosmetic"
>       "identify_record"    "dummy"
>       "wms_group_title"    "DEMG"
>     END # METADATA
>     NAME "cosmetic"
>     PROJECTION
>       "proj=utm"
>       "zone=33"
>       "datum=WGS84"
>       "units=m"
>       "no_defs"
>     END # PROJECTION
>     STATUS ON
>     TEMPLATE "dummy"
>     TILEITEM "location"
>     TOLERANCE 0
>     TYPE RASTER
>     UNITS METERS
>     CLASS
>       NAME "cosmetic"
>     END # CLASS
>   END # LAYER
>
> ------------------------------
>
> Andrea Borruso
> website: http://blog.spaziogis.it
> 38° 7’ 48” N, 13° 21’ 9” E, EPSG:4326
> ------------------------------
>
> “cercare e saper riconoscere chi e cosa,
> in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio”
>
> Italo Calvino
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20170203/4e02963a/attachment.html>


More information about the Geomoose-users mailing list