How to use the pytileproj.base.TPSProjection 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
Initialises an Equi7Subgrid class for a specified continent.

        Parameters
        ----------
        core : TPSCoreProperty
            defines core parameters of the (sub-) grid
        continent : str
            acronym of the continent, e.g. 'EU' or 'SA'.
        """

        # load WKT string and extent shape
        data = Equi7Grid._static_data[continent]

        _core = copy.copy(core)
        _core.tag = continent
        _core.projection = TPSProjection(wkt=data['wkt'])

        # 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)
github TUW-GEO / Equi7Grid / equi7grid / copernicusgrid.py View on Github external
def __init__(self, core, continent):

        _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)