Skip to content

Update default min_zoom, max_zoom values for neighbourhoods #192

Open
@nvkelso

Description

@nvkelso

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions