Skip to content

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

Merged
iandees merged 2 commits into
masterfrom
prune_toi_command
Mar 29, 2017
Merged

Add the ability to list individual tiles that should stay in the TOI#178
iandees merged 2 commits into
masterfrom
prune_toi_command

Conversation

@iandees

@iandees iandees commented Mar 28, 2017

Copy link
Copy Markdown
Member

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

@iandees

iandees commented Mar 28, 2017

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member

Nice!

Comment thread tilequeue/command.py
elif 'tiles' in info:
tiles = map(deserialize_coord, info['tiles'])
tiles = map(coord_marshall_int, tiles)
immortal_tiles.update(tiles)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

nvkelso commented Mar 29, 2017 via email

Copy link
Copy Markdown
Member

@iandees

iandees commented Mar 29, 2017

Copy link
Copy Markdown
Member Author

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