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

Update default min_zoom, max_zoom values for neighbourhoods #192

Open
nvkelso opened this issue Apr 20, 2017 · 1 comment
Open

Update default min_zoom, max_zoom values for neighbourhoods #192

nvkelso opened this issue Apr 20, 2017 · 1 comment

Comments

@nvkelso
Copy link
Member

nvkelso commented Apr 20, 2017

From the WOF documentation we've refined this a bit from the default 15 min_zoom and 16 max_zoom to defaults per the 4 related "neighbourhood" placetypes.

  • neighbourhood_placetypes_to_int = dict(
    neighbourhood=1,
    microhood=2,
    macrohood=3,
    borough=4,
    )
    neighbourhood_int_to_placetypes = {
    1: 'neighbourhood',
    2: 'microhood',
    3: 'macrohood',
    4: 'borough',
    }
  • tilequeue/tilequeue/wof.py

    Lines 290 to 308 in b0a6bc9

    default_min_zoom = 15
    default_max_zoom = 16
    min_zoom = props.get('mz:min_zoom')
    if min_zoom is None:
    min_zoom = default_min_zoom
    else:
    try:
    min_zoom = float(min_zoom)
    except ValueError:
    return failure('mz:min_zoom not float: %s' % min_zoom)
    max_zoom = props.get('mz:max_zoom')
    if max_zoom is None:
    max_zoom = default_max_zoom
    else:
    try:
    max_zoom = float(max_zoom)
    except ValueError:
    return failure('mz:max_zoom not float: %s' % max_zoom)

For existing features, probably don't modify the existing min_zoom and max_zoom values. But for new features, do the following:

  • borough:
    • Default: min_zoom: 10
    • Default: max_zoom: 13
  • neighbourhood:
    • Default: min_zoom: 15
    • Default: max_zoom: 18
  • macrohood:
    • Default: min_zoom: 13
    • Default: max_zoom: 15
  • microhood:
    • Default: min_zoom: 16
    • Default: max_zoom: 18
@nvkelso
Copy link
Member Author

nvkelso commented Apr 20, 2017

/cc @stepps00

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

1 participant