Skip to content

implement function to easily reproject geometries #4

Description

@chbrandt

Suppose I have this bounding-box at hand (that I copied from QGIS layer props/extent), in some CRS "x_crs":

-10669675.1973205450922251,-5334837.5986602725461125 : 10669675.1973205450922251,5334837.5986602725461125

CRS is (copy-n-paste too):

PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",3396190,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]

I just want that in WGS84:

>>> bbox = Bbox(
    """-10669675.1973205450922251,-5334837.5986602725461125 : 10669675.1973205450922251,5334837.5986602725461125""", 
    crs="""PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",3396190,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]"""
)
>>> bbox.to_crs('wgs84')
"[minx, miny, maxx, maxy] in wgs84"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions