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

Add the ability to list individual tiles that should stay in the TOI #178

Merged
merged 2 commits into from
Mar 29, 2017

Conversation

iandees
Copy link
Member

@iandees iandees commented Mar 28, 2017

Follows #176, adds the ability to list individual tiles that should stay in the TOI

@iandees
Copy link
Member Author

iandees commented Mar 28, 2017

Sample config:

toi-prune:
  redshift-uri: postgresql://redacted:redacted@localhost:5439/analytics
  days: 30
  s3:
    bucket: mapzen-tiles-dev-us-east
    date-prefix: 20170123
    path: osm
    layer: all
    format: zip
  always-include:
    conus:
      bbox: -124.8,24.8,-66.1,49.3
      min_zoom: 10
      max_zoom: 13
    world:
      bbox: -180.0,-85.06,180.0,85.06
      min_zoom: 0
      max_zoom: 9
    tests:
      tiles: [5/2/4, 5/7/8]

@zerebubuth
Copy link
Member

Nice!

elif 'tiles' in info:
tiles = map(deserialize_coord, info['tiles'])
tiles = map(coord_marshall_int, tiles)
immortal_tiles.update(tiles)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I make a feature request? :) How about adding something like path or file(s). We would expect that the file contains coordinates, one per line.

I'm expecting that when we add the tests, what we'll do is first run the script that prints them out. And then we can save that to a file and feed it into this. Maybe another option is to read it from stdin to avoid having the temporary file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in e17b902.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@iandees iandees merged commit 76e56a7 into master Mar 29, 2017
@iandees iandees deleted the prune_toi_command branch March 29, 2017 21:30
@iandees iandees removed the in review label Mar 29, 2017
@nvkelso
Copy link
Member

nvkelso commented Mar 29, 2017 via email

@iandees
Copy link
Member Author

iandees commented Mar 29, 2017

Yea, good point. The tiles at this point are dumped straight into the TOI so they are assumed to be 512px.

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

Successfully merging this pull request may close these issues.

4 participants