How to use the pytileproj.base.TilingSystem function in pytileproj

To help you get started, we’ve selected a few pytileproj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TUW-GEO / Equi7Grid / equi7grid / copernicusgrid.py View on Github external
_core = copy.copy(core)
        _core.tag = continent
        _core.projection = TPSProjection(epsg=4326)

        self.core = _core
        self.polygon_geog = bbox2polygon([(-179.9999999, -90.0), (179.9999999, 90.0)],
                                         self.core.projection.osr_spref)
        self.tilesys = CopernicusTilingSystem(self.core, self.polygon_geog)

        super(CopernicusSubgrid, self).__init__(self.core, self.polygon_geog, self.tilesys)


    def get_polygon(self):
        pass

class CopernicusTilingSystem(TilingSystem):
    """
    Equi7 tiling system class, providing methods for queries and handling.

    A tile in the Equi7 core system.
    """



    def __init__(self, core, polygon):

        super(CopernicusTilingSystem, self).__init__(core, polygon, 0, 0)


    def create_tile(self, name='GLOBAL', x=None, y=None):
        return CopernicusTile(self.core, name)
github TUW-GEO / Equi7Grid / equi7grid / equi7grid.py View on Github external
# holds core parameters of the (sub-) grid
        self.core = _core

        # holds name of the subgrid
        self.name = ''.join(('EQUI7_', continent, Equi7Grid.encode_sampling(core.sampling), 'M'))

        # holds the extent of the subgrid in the lonlat-space
        self.polygon_geog = create_geometry_from_wkt(data['zone_extent'], epsg=4326)

        # defines the tilingsystem of the subgrid
        self.tilesys = Equi7TilingSystem(self.core, self.polygon_geog)

        super(Equi7Subgrid, self).__init__(self.core, self.polygon_geog, self.tilesys)


class Equi7TilingSystem(TilingSystem):

    """
    Equi7TilingSystem class, inheriting TilingSystem() from pytileproj.
    provides methods for queries and handling.
    """

    def __init__(self, core, polygon_geog):
        """
        Initialises an Equi7TilingSystem class for a specified continent.

        Parameters
        ----------
        core : TPSCoreProperty
            defines core parameters of the (sub-) grid
        polygon_geog : OGRGeometry
            geometry defining the extent/outline of the subgrid