[mapserver-users] How do a GetFeaureInfo on vector layer but showing raster layer ?

Anna Muñoz a.munyoz.b at gmail.com
Wed Jan 9 01:13:41 PST 2019


Thank you very much to Steve Line and Carlos Ruiz for your feddback and
suggestions!

Finally I get the solution using mod_rewrite, and this is the solution that
work in my case:

RewriteEngine on
##LogLevel alert rewrite:trace5
RewriteCond %{QUERY_STRING}
^[A-z0-9,.%/-?&=]+GetFeatureInfo[A-z0-9,.%/-?&=]+
RewriteCond %{QUERY_STRING}  ^(.*)raster_to_display(.*)
RewriteRule ^.*mapserv.exe.*$
http://localhost/cgi-bin/mapserv.exe?%1vector_to_query%2    [PL]

Best regards,
Anna



Missatge de Lime, Steve D (MNIT) <steve.lime at state.mn.us> del dia dj., 27
de des. 2018 a les 21:55:

> Unfortunately you probably have to use mod_rewrite. It is possible to use
> MapServer to use its standard template processing to forward the query for
> a layer to another URL  or to use hidden layers and templates but to do so
> you have to be able to set the info_format to be used for the
> GetInfoRequest and it doesn’t appear that’s possible from QGIS – it always
> sets info_format=text/plain. If that’s not the case let me know and I can
> provide details on the MapServer-only methods.
>
>
>
> --Steve
>
>
>
> *From:* mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] *On
> Behalf Of *Anna Muñoz
> *Sent:* Wednesday, December 26, 2018 11:44 AM
> *To:* mapserver-users at lists.osgeo.org
> *Subject:* [mapserver-users] How do a GetFeaureInfo on vector layer but
> showing raster layer ?
>
>
>
> Hi,
>
> I would like to show with QGIS the attribute of a vector layer when I
> request for information in a raster layer. Raster layer is an image from
> wms service that also provides the vector layer.
>
>
>
> I have tried to solve the problem defining a GROUP layer but QGIS doesn't
> recognize layers in a group as queryable although each of them is
> queryable. This topic is well described here:
> https://lists.osgeo.org/pipermail/mapserver-users/2012-July/072892.html
>
>
>
> I have also test apache rewrite_rules following this link:
>
> https://github.com/mapserver/mapserver/issues/3310
>
>
>
> I have a very little knowledge of mapserver but I guess the solution is
> using rewrite rules. The most examples I have found are about clean url,
> but I am looking for redirection from one map file to another.
>
>
>
> The idea is to get attribute information from vector layer when user
> request for information in a raster image loaded from wms service in QGIS.
>
> Is this possible ? Any help would be appreciated.
>
>
>
> Thank you in advance !
>
> Anne
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190109/d4d6ad1b/attachment.html>


More information about the mapserver-users mailing list