def _tile_perimeter_geom(coord, projection, padded):
 perimeter = _tile_perimeter(coord, projection, padded)
 wkt = ('POLYGON((%s))' % ', '.join([('%.7f %.7f' % xy) for xy in perimeter]))
 geom = ogr.CreateGeometryFromWkt(wkt)
 ref = osr.SpatialReference()
 ref.ImportFromProj4(projection.srs)
 geom.AssignSpatialReference(ref)
 return geom

def _tile_perimeter_geom ( coord , projection , padded ) : perimeter = _tile_perimeter ( coord , projection , padded ) wkt = ( 'POLYGON((%s))' % ', ' . join ( [ ( '%.7f %.7f' % xy ) for xy in perimeter ] ) ) geom = ogr . CreateGeometryFromWkt ( wkt ) ref = osr . SpatialReference ( ) ref . ImportFromProj4 ( projection . srs ) geom . AssignSpatialReference ( ref ) return geom
get an ogr geometry object for a coordinate tile polygon .