[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-users
Subject:    Re: [mapserver-users] How do a GetFeaureInfo on vector layer but showing raster layer ?
From:       Anna_Muñoz <a.munyoz.b () gmail ! com>
Date:       2019-01-09 9:13:41
Message-ID: CAL9bcQ+XwUpr8F-nddo4NY8XCBzDpMEa2PkRzeeFxjXV2mFRNw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@lists.osgeo.org] *On
> Behalf Of *Anna Muñoz
> *Sent:* Wednesday, December 26, 2018 11:44 AM
> *To:* mapserver-users@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
>

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thank \
you very much to Steve Line and Carlos Ruiz for your feddback and \
suggestions!<br></div><div><br></div><div>Finally I get the solution using \
mod_rewrite, and this is the solution that work in my \
case:</div><div><br></div><div><div>RewriteEngine on</div><div>##LogLevel alert \
rewrite:trace5</div><div>RewriteCond %{QUERY_STRING}   \
^[A-z0-9,.%/-?&amp;=]+GetFeatureInfo[A-z0-9,.%/-?&amp;=]+  </div><div>RewriteCond \
%{QUERY_STRING}   ^(.*)raster_to_display(.*)</div><div><div><div>RewriteRule \
^.*mapserv.exe.*$   <a \
href="http://localhost/cgi-bin/mapserv.exe?%1vector_to_query%2">http://localhost/cgi-bin/mapserv.exe?%1vector_to_query%2</a> \
[PL]<br></div></div></div></div><div><br></div><div><div>Best \
regards,<br></div><div>Anna</div><br \
class="gmail-Apple-interchange-newline"></div><div><br></div></div></div></div></div></div><br><div \
class="gmail_quote"><div dir="ltr">Missatge de Lime, Steve D (MNIT) &lt;<a \
href="mailto:steve.lime@state.mn.us">steve.lime@state.mn.us</a>&gt; del dia dj., 27 \
de des. 2018 a les 21:55:<br></div><blockquote class="gmail_quote" style="margin:0px \
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_6515046282372640592WordSection1">
<p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">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.<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>  \
<u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">--Steve<u></u><u></u></span></p>
 <p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>  \
<u></u></span></p> <p class="MsoNormal"><b><span \
style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span \
style="font-size:11pt;font-family:Calibri,sans-serif"> mapserver-users [mailto:<a \
href="mailto:mapserver-users-bounces@lists.osgeo.org" \
target="_blank">mapserver-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Anna \
Muñoz<br> <b>Sent:</b> Wednesday, December 26, 2018 11:44 AM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" \
target="_blank">mapserver-users@lists.osgeo.org</a><br> <b>Subject:</b> \
[mapserver-users] How do a GetFeaureInfo on vector layer but showing raster layer \
?<u></u><u></u></span></p> <p class="MsoNormal"><u></u>  <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">I have tried to solve the problem defining a GROUP layer but \
QGIS doesn&#39;t recognize layers in a group as queryable although each of them is \
queryable. This topic is well described here: <a \
href="https://lists.osgeo.org/pipermail/mapserver-users/2012-July/072892.html" \
target="_blank"> https://lists.osgeo.org/pipermail/mapserver-users/2012-July/072892.html</a><u></u><u></u></p>
 </div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">I have also test apache rewrite_rules following this \
link:<u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><a href="https://github.com/mapserver/mapserver/issues/3310" \
target="_blank">https://github.com/mapserver/mapserver/issues/3310</a><u></u><u></u></p>
 </div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p> \
</div> <div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal">Is this possible ? Any help would be \
appreciated.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal"><u></u>  <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you in advance !<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Anne<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

</blockquote></div>


[Attachment #6 (text/plain)]

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic