Лого на OpenStreetMap OpenStreetMap

Python Tile Expiration Class

Објавено од asciipip во 10 Јуни 2012 г. на English.

I have periodically needed a memory-efficient way to track tile expirations, so I wrote something to do it. Here, I make it available in case it can be useful to others.

The code is tileexpire; to use it, you just need to import the module, instantiate an OSMTileExpire object, call its expire() method for each expired tile, and then use its expiredAt() method for each zoom level you want to process.

It should be reasonably memory-efficient because it uses a quad tree that collapses it branches as they fill up, so it can handle a lot of tiles as long as they’re reasonably dense (in my experience, that’s a reasonable assumption for OSM tile expiration data).

It’s under a CC0 waiver, so you’re free to use it for anything you want, but if you make improvements, I’d love to hear about them.

Икона за е-пошта Икона на Bluesky Икона на Фејсбук Икона на LinkedIn Икона на Mastodon Икона на Телеграм Икона на X

Разговор

Најава за да оставите коментар