Package: tilematrix
Tilematrix handles geographic web tiles and tile pyramids.The module is designed to translate between tile indices (zoom, row, column = ZYX) and
map coordinates (e.g. latitute, longitude).Tilematrix supportsmetatilingandtile buffers. Furthermore it makes
heavy use ofshapelyand it can also generateAffineobjects per tile which
facilitates working withrasteriofor tile based data reading and writing.It is very similar tomercantilebut besides of supporting spherical mercator
tile pyramids, it also supports geodetic (WGS84) tile pyramids.InstallationUsecondato install the latest stable version:condainstall-cconda-forge-ytilematrixUsepipto install the latest stable version:pipinstalltilematrixManually install the latest development versionpipinstall-rrequirements.txtpythonsetup.pyinstallDocumentationAPI documentationexamplesCLIThis package ships with a command line tooltmxwhich provides the following
subcommands:bounds: Print bounds of given Tile.bbox: Print bounding box geometry of given Tile.tile: Print Tile covering given point.tiles: Print Tiles covering given bounds.Geometry outputs can either be formatted asWKTorGeoJSON. For example
the following command will print a validGeoJSONrepresenting all tiles
for zoom level 1 of thegeodeticWMTS grid:$tmx-fGeoJSONtiles--1-180-9018090{"type":"FeatureCollection","features":[{"geometry":{"coordinates":[[[-90.0,0.0],[-90.0,90.0],[-180.0,90.0],[-180.0,0.0],[-90.0,0.0]]],"type":"Polygon"},"properties":{"col":0,"row":0,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[0.0,0.0],[0.0,90.0],[-90.0,90.0],[-90.0,0.0],[0.0,0.0]]],"type":"Polygon"},"properties":{"col":1,"row":0,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[90.0,0.0],[90.0,90.0],[0.0,90.0],[0.0,0.0],[90.0,0.0]]],"type":"Polygon"},"properties":{"col":2,"row":0,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[180.0,0.0],[180.0,90.0],[90.0,90.0],[90.0,0.0],[180.0,0.0]]],"type":"Polygon"},"properties":{"col":3,"row":0,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[-90.0,-90.0],[-90.0,0.0],[-180.0,0.0],[-180.0,-90.0],[-90.0,-90.0]]],"type":"Polygon"},"properties":{"col":0,"row":1,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[0.0,-90.0],[0.0,0.0],[-90.0,0.0],[-90.0,-90.0],[0.0,-90.0]]],"type":"Polygon"},"properties":{"col":1,"row":1,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[90.0,-90.0],[90.0,0.0],[0.0,0.0],[0.0,-90.0],[90.0,-90.0]]],"type":"Polygon"},"properties":{"col":2,"row":1,"zoom":1},"type":"Feature"},{"geometry":{"coordinates":[[[180.0,-90.0],[180.0,0.0],[90.0,0.0],[90.0,-90.0],[180.0,-90.0]]],"type":"Polygon"},"properties":{"col":3,"row":1,"zoom":1},"type":"Feature"}]}PrintWKTrepresentation of tile4 15 23:$tmxbbox41523POLYGON((90-90,90-78.75,78.75-78.75,78.75-90,90-90))Also, tiles can have buffers around calledpixelbuffer:$tmx--pixelbuffer10bbox41523POLYGON((90.439453125-90,90.439453125-78.310546875,78.310546875-78.310546875,78.310546875-90,90.439453125-90))PrintGeoJSONrepresentation of tile4 15 23on amercatortile
pyramid:$tmx-output_formatGeoJSON-gridmercatorbbox41515{"type":"Polygon","coordinates":[[[20037508.342789203,-20037508.3427892],[20037508.342789203,-17532819.799940553],[17532819.799940553,-17532819.799940553],[17532819.799940553,-20037508.3427892],[20037508.342789203,-20037508.3427892]]]}Conda PublishingUse bot pull requests generated with every release attilematrix-feedstockrepository for releasing new versions onconda-forge.LicenseMIT LicenseCopyright (c) 2015-2022EOX IT Services