[MapProxy] FeatureInfo-Request depending on coverage

Holger Schiebold hschiebold at codematix.de
Wed Jan 11 02:35:25 PST 2017


didn't answered to the list last time - sorry



-------- Weitergeleitete Nachricht --------
Betreff: 	Re: [MapProxy] FeatureInfo-Request depending on coverage
Datum: 	Thu, 22 Dec 2016 16:12:35 +0100
Von: 	Holger Schiebold <hschiebold at codematix.de>
An: 	Andreas Zapke <andreas.zapke at geomap.immo>



Hi,

at the moment it is not implemented i think. But it's open source, so
you can extend the source/wms.py and config/loader.py a little bit.
Maybe like this - but not really tested:

change in config/loader.py in method fi_source

fi_source = WMSInfoSource(fi_client, fi_transformer=fi_transformer)

to

coverage = self.coverage()
fi_source = WMSInfoSource(fi_client, fi_transformer=fi_transformer,
coverage=coverage)

and class WMSInfoSource(InfoSource): in source/wms.py

to

class WMSInfoSource(InfoSource):
     def __init__(self, client, fi_transformer=None, coverage=None):
         self.client = client
         self.fi_transformer = fi_transformer
         self.coverage = coverage

     def get_info(self, query):
         if self.coverage and not self.coverage.contains(query.coord,
query.srs):
             return None
         doc = self.client.get_info(query)
         if self.fi_transformer:
             doc = self.fi_transformer(doc)
         return doc

regards Holger

Am 21.12.2016 um 16:20 schrieb Andreas Zapke:
> Hi,
>
> I have the same question as Andrej asked yesterday:
>
> I would like to reiterate a question I asked before, but I am still
> couldn't find an answer. Its about WMS FeatureInfo in Mapproxy, may be
> a newbee question, but documentation is not really clear for me.
>
> I defined several wms sources, each source with a provided coverage.
> Those sources are combined in a cache, cache is source for a layer,
> image requests are answered depending on the coverage, everything is
> fine. What is a bit confusing to me is how FeatureInfo requests are
> handled, it seems like coverage is ignored here. I do get results from
> all sources, but i would like to get only the result for the source
> that covers the requested bbox. Is there a way to achieve this? Is
> coverage considered at all for FeatureInfo request in mapproxy?
>
> Thanks in advance!
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy


mit freundlichen Grüßen

-- 
Holger Schiebold


____________________
codematix GmbH
Felsbachstrasse 5/7
D-07745 Jena
Tel. +49 (3641) 3038-34
www.codematix.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20170111/917d36b3/attachment.html>


More information about the MapProxy mailing list