[mapserver-users] Having problems mapcache and WMSGetFeatureInfo

Stephen Woodbridge woodbri at swoodbridge.com
Thu Mar 10 18:19:56 PST 2016


Hi Thomas, et al,

Looks like I'm using: libapache2-mod-mapcache:amd64/trusty 1.2.1-2

I have configured a remote WMS service into mapcache but I can't get 
mapcache to handle a WMS GetFeatureInfo request. Tiles are getting 
cached and served without a problem.

So in my mapcache.xml I have source configured like this:

   <source name="enc_harbour" type="wms">
     <getmap>
       <params>
         <FORMAT>image/png</FORMAT>
 
<LAYERS>1,2,3,4,5,6,7,8,10,11,12,13,24,25,26,27,28,29,30,31,32,33,35,36,
38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,66
,67,68,69,70,71,73,74,75,76,78,80,82,83,84,85,86,88,89,90,91,92,93,94,95,96,97,9
8,99,100,102,104,105,106,107,108,109,111,113,114,116,118,119,120,121,122,123,124
,126,128,129,130,131,132,133,134,136,137,139,140,141,142,144,145,146,147,148,149
,150,151,152,153,155,156,158,160,161,162,164,166,167,168,169,171,172,173,174,175
,176,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,196,197,198
,199,200,201,202,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220
,222,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239</LAYERS>
         <TRANSPARENT>true</TRANSPARENT>
       </params>
     </getmap>
     <http>
 
<url>http://encdirect.noaa.gov/arcgis/services/encdirect/enc_harbour/MapSe
rver/WmsServer?</url>
     </http>
     <getfeatureinfo>
 
<info_formats>text/xml,text/html,text/plain,application/geojson</info_form
ats>
       <params>
 
<QUERY_LAYERS>1,2,3,4,5,6,7,8,10,11,12,13,24,25,26,27,28,29,30,31,32,33,
35,36,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,60,61,62,63,64
,65,66,67,68,69,70,71,73,74,75,76,78,80,82,83,84,85,86,88,89,90,91,92,93,94,95,9
6,97,98,99,100,102,104,105,106,107,108,109,111,113,114,116,118,119,120,121,122,1
23,124,126,128,129,130,131,132,133,134,136,137,139,140,141,142,144,145,146,147,1
48,149,150,151,152,153,155,156,158,160,161,162,164,166,167,168,169,171,172,173,1
74,175,176,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,196,1
97,198,199,200,201,202,204,205,206,207,208,209,211,212,213,214,215,216,217,218,2
19,220,222,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239</QUER
Y_LAYERS>
       </params>
     </getfeatureinfo>
   </source>


Here is a working GetFeatureInfo to the source server:

http://encdirect.noaa.gov/arcgis/services/encdirect/enc_harbour/MapServer/WmsServer?QUERY_LAYERS=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C10%2C11%2C12%2C13%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C31%2C32%2C33%2C35%2C36%2C38%2C39%2C40%2C42%2C43%2C44%2C45%2C46%2C47%2C48%2C49%2C50%2C51%2C52%2C53%2C54%2C56%2C57%2C58%2C59%2C60%2C61%2C62%2C63%2C64%2C65%2C66%2C67%2C68%2C69%2C70%2C71%2C73%2C74%2C75%2C76%2C78%2C80%2C82%2C83%2C84%2C85%2C86%2C88%2C89%2C90%2C91%2C92%2C93%2C94%2C95%2C96%2C97%2C98%2C99%2C100%2C102%2C104%2C105%2C106%2C107%2C108%2C109%2C111%2C113%2C114%2C116%2C118%2C119%2C120%2C121%2C122%2C123%2C124%2C126%2C128%2C129%2C130%2C131%2C132%2C133%2C134%2C136%2C137%2C139%2C140%2C141%2C142%2C144%2C145%2C146%2C147%2C148%2C149%2C150%2C151%2C152%2C153%2C155%2C156%2C158%2C160%2C161%2C162%2C164%2C166%2C167%2C168%2C169%2C171%2C172%2C173%2C174%2C175%2C176%2C178%2C179%2C180%2C181%2C182%2C183%2C184%2C185%2C186%2C187%2C188%2C189%2C190%2C191%2C193%2C194%2C196%2C197%2C198%2C199%2C200%2C201%2C202%2C204%2C205%2C206
%2C207%2C208%2C209%2C211%2C212%2C213%2C214%2C215%2C216%2C217%2C218%2C219%2C220%2C222%2C224%2C225%2C226%2C227%2C228%2C229%2C230%2C231%2C232%2C233%2C234%2C235%2C236%2C237%2C238%2C239&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-94.82912%2C29.267375%2C-94.62862%2C29.414145&FEATURE_COUNT=50&HEIGHT=855&WIDTH=1168&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=811&Y=433

I have tried variations of this request but they all give me a 404 error

http://example.com/mapcache/?LAYERS=enc_harbour&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-94.861734%2C29.253572%2C-94.661234%2C29.400686&FEATURE_COUNT=10&HEIGHT=857&WIDTH=1168&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=1104&Y=437&QUERY_LAYERS=12

If I provide multiple layer names to QUERY_LAYERS= it get an error in 
the error.log "wms getfeatureinfo not implemented for multiple layers"

If I provide just one layer like 3 or 12 or 32 from the working request 
above, I get "received wms getfeatureinfo request with invalid layer 32"

Is mapcache doing anything more than acting as a proxy server for 
getfeatureinfo requests? If it is only a proxy server, why can't we pass 
multiple QUERY_LAYERS= to the the forwarded server? What does the 
<QUERY_LAYERS> tag do in the <source> section of mapcache.xml since I 
have to provide it with the request to mapcache or I get an error:
"received wms getfeatureinfo request with no query layers".

Thanks,
   -Steve

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mapserver-users mailing list