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

[docs] what does simplify_start do? #264

Open
pnorman opened this issue Oct 22, 2017 · 2 comments
Open

[docs] what does simplify_start do? #264

pnorman opened this issue Oct 22, 2017 · 2 comments

Comments

@pnorman
Copy link
Contributor

pnorman commented Oct 22, 2017

tilequeue/command.py contains the python

https://github.com/tilezen/tilequeue/blob/master/tilequeue/command.py#L494-L507

        layer_datum = dict(
...
            simplify_start=layer_config.get('simplify_start', 0),
...)

I can't find any documentation on what tilequeue/tileserver does with this, or any other references of simplify_start in their code.

@zerebubuth
Copy link
Member

Apologies for the confusion! It's added to the layer datum so that it can be used in vector-datasource to control whether to apply simplification to the geometry at a particular zoom or not.

I agree we should add a comment explaining that. Is there anything else we can do to make that bit of code easier to understand?

@nvkelso nvkelso changed the title simplify_start? [docs] what does simplify_start do? Oct 23, 2017
@pnorman
Copy link
Contributor Author

pnorman commented Oct 23, 2017

I think there's two things

  • Add a comment above the section, explaining that these are being made available to the functions in the transform section of that layer in the query-config file
  • Make the idea of passing arguments to the transform functions more general

Right now the config is

layers:
  water:
    template: water.jinja2
    start_zoom: 0
    geometry_types: [Point, MultiPoint, Polygon, MultiPolygon, LineString, MultiLineString]
    simplify_before_intersect: true
    simplify_start: 9
    transform:
      - function_name
    sort: vectordatasource.sort.water
    area-inclusion-threshold: 1

Instead of simplify_start being a key under the water collection, there could be another one like

layers:
  water:
    template: water.jinja2
    ...
    transform-parameters:
      simplify_start: 9
      ...
    transform:
      - function_name

And then all of transform-parameters could get passed to the functions, instead of hardcoding vector-datasource logic into tilequeue

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

No branches or pull requests

2 participants