How to use the pytileproj.base.TiledProjectionSystem 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 / equi7grid.py View on Github external
equi7data : dict
        dictionary containing for each subgrid...
            a) the multipolygon 'zone_extent'
            b) the WKT-string 'projection'
            c) the sets for T6/T3/T1-tiles covering land 'coverland'
            d) the Equi7Grid version 'version'

    """
    equi7_data = None
    fname = os.path.join(os.path.dirname(module_path), "data", "equi7grid.dat")
    with open(fname, "rb") as f:
        equi7_data = pickle.load(f)
    return equi7_data


class Equi7Grid(TiledProjectionSystem):

    """
    Equi7Grid class object, inheriting TiledProjectionSystem() from pytileproj.

    Attributes
    ----------
    _static_data  : dict
        dictionary containing for each subgrid...
            a) the multipolygon 'zone_extent'
            b) the WKT-string 'projection'
            c) the sets for T6/T3/T1-tiles covering land 'coverland'
            d) the Equi7Grid version 'version'
    _static_subgrid_ids : list of strings
        lists the acronyms of the 7 (continental) subgrids
    _static_tilecodes : list of strings
        lists the 3 tile acronyms
github TUW-GEO / Equi7Grid / equi7grid / copernicusgrid.py View on Github external
import copy
import itertools

import numpy as np

from pytileproj.base import TiledProjectionSystem
from pytileproj.base import TiledProjection
from pytileproj.base import TPSProjection
from pytileproj.base import TilingSystem
from pytileproj.base import Tile

from pytileproj.geometry import bbox2polygon



class CopernicusGrid(TiledProjectionSystem):
    """
    Equi7 Grid

    Parameters
    ----------
    res : float
        The tile resolution
    """

    # sub grid IDs
    _static_subgrid_ids = ["GLOBAL"]
    # supported tile widths(resolution)
    _static_tilecodes = ["T10", "GLOBAL"]
    # supported grid spacing (resolution)
    _static_res = [1.0/112]
    # set True if one single global tile is needed