Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harvest and use scale dependency information for services #241

Open
blewis opened this issue Nov 29, 2016 · 6 comments
Open

Harvest and use scale dependency information for services #241

blewis opened this issue Nov 29, 2016 · 6 comments

Comments

@blewis
Copy link
Contributor

blewis commented Nov 29, 2016

Use in determination of validity (map might not display at global scale but will display at zoomed-in scale) and to message user regarding view scale.

@capooti
Copy link
Contributor

capooti commented May 23, 2017

@bglewis do OGC service metadata in GetCapabilities provide such an information? /cc @tomkralidis

@capooti capooti added this to the 0.4 milestone May 23, 2017
@blewis
Copy link
Contributor Author

blewis commented May 23, 2017

I think scale dependency info is optional in WMS. If it is present we should use it. For service registries there is a need to handle this address the situation when neither valid default map extent nor scale dependency information is not provided. This is a huge unsolved problem for service sharing. Automated approaches are difficult but an admin tool / crowd-source tool that lets users set both scale dependencies and default map extent for remote services would be very useful.

@tomkralidis
Copy link
Contributor

WMS 1.3.0 provides optional Layer MinScaleDenominator and MinScaleDenominator elements; the WMS 1.1.1 equivalent being ScaleHint@min/@max. This should be supported in OWSLib proper which you can use to satisfy this use case.

@capooti
Copy link
Contributor

capooti commented May 23, 2017

It would be interesting to figure out how many services/layers expose this before adding this to django models

@tomkralidis
Copy link
Contributor

tomkralidis commented May 24, 2017

@capooti: something like the below may help in the analysis:

from hypermap.aggregator.utils import get_wms_version_negotiate

num_services = 0
num_services_with_scale = 0
num_layers = 0
num_layers_with_scale = 0

wms_urls = ['http://geo.woudc.org/ows']

for wms_url in wms_urls:
    scalehint_found = False
    wms = get_wms_version_negotiate(wms_url)
    num_services += 1
    num_layers += len(wms.contents.keys())

    for layer in wms.contents:
        if wms.contents[layer].scaleHint is not None:
            scalehint_found = True
            num_layers_with_scale += 1
    if scalehint_found:
        num_services_with_scale += 1

print('Number of services: {}'.format(num_services))
print('Number of layers: {}'.format(num_layers))
print('Number of services implementing scale hint: {}'.format(
    num_services_with_scale))
print('Number of layers implementing scale hint: {}'.format(
    num_layers_with_scale))

@capooti
Copy link
Contributor

capooti commented May 24, 2017

Thanks, I was exactly thinking to something like this.
Let me try this on our WMS list to figure out what is the % of services which are exposing scales /cc @bglewis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants