diff --git a/quadkey/__init__.py b/quadkey/__init__.py index 34312c8..3bb4fb5 100644 --- a/quadkey/__init__.py +++ b/quadkey/__init__.py @@ -94,20 +94,21 @@ def __str__(self): def __repr__(self): return self.key - @staticmethod - def from_geo(geo, level): - """ - Constucts a quadkey representation from geo and level - geo => (lat, lon) - If lat or lon are outside of bounds, they will be clipped - If level is outside of bounds, an AssertionError is raised - - """ - pixel = TileSystem.geo_to_pixel(geo, level) - tile = TileSystem.pixel_to_tile(pixel) - key = TileSystem.tile_to_quadkey(tile, level) - return QuadKey(key) - - @staticmethod - def from_tile(tile, level): - return QuadKey(TileSystem.tile_to_quadkey(tile, level)) +def from_geo(geo, level): + """ + Constucts a quadkey representation from geo and level + geo => (lat, lon) + If lat or lon are outside of bounds, they will be clipped + If level is outside of bounds, an AssertionError is raised + + """ + pixel = TileSystem.geo_to_pixel(geo, level) + tile = TileSystem.pixel_to_tile(pixel) + key = TileSystem.tile_to_quadkey(tile, level) + return QuadKey(key) + +def from_tile(tile, level): + return QuadKey(TileSystem.tile_to_quadkey(tile, level)) + +def from_str(qk_str): + return QuadKey(qk_str) diff --git a/setup.py b/setup.py index 016f954..0106ea6 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name="quadkey", - version="0.0.4", + version="0.0.5", description="Python Implementation for Geospatial Quadkeys", author="Buck Heroux", url="https://github.com/buckheroux/QuadKey",