How to use the svgis.projection.fake_to_string function in svgis

To help you get started, we’ve selected a few svgis 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 fitnr / svgis / svgis / svgis.py View on Github external
def _reprojector(self, in_crs):
        '''Return a reprojection transform from in_crs to self.out_crs.'''
        if self.out_crs != in_crs:
            self.log.info('set up reprojection')
            self.log.debug('input crs: %s', projection.fake_to_string(in_crs))
            return partial(fiona.transform.transform_geom, in_crs, self.out_crs)

        return None
github fitnr / svgis / svgis / svgis.py View on Github external
def set_out_crs(self, bounds):
        '''Set the output CRS, if not yet set.'''
        if self.out_crs:
            return

        # Determine projection transformation:
        # either use something passed in, a non latlong layer projection,
        # the local UTM, or customize local TM
        self.log.debug('Picking a projection:')
        self.log.debug('    out crs: %s', self._out_crs)
        self.log.debug('    in crs: %s', projection.fake_to_string(self.in_crs))
        self.log.debug('    bounds: %s', bounds)
        self._out_crs = projection.pick(self._out_crs, bounds, self.in_crs)
        self.log.debug('Set output crs to %s', projection.fake_to_string(self.out_crs))
github fitnr / svgis / svgis / svgis.py View on Github external
def set_out_crs(self, bounds):
        '''Set the output CRS, if not yet set.'''
        if self.out_crs:
            return

        # Determine projection transformation:
        # either use something passed in, a non latlong layer projection,
        # the local UTM, or customize local TM
        self.log.debug('Picking a projection:')
        self.log.debug('    out crs: %s', self._out_crs)
        self.log.debug('    in crs: %s', projection.fake_to_string(self.in_crs))
        self.log.debug('    bounds: %s', bounds)
        self._out_crs = projection.pick(self._out_crs, bounds, self.in_crs)
        self.log.debug('Set output crs to %s', projection.fake_to_string(self.out_crs))