Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement function to easily reproject geometries #4

Open
chbrandt opened this issue Jun 4, 2021 · 0 comments
Open

implement function to easily reproject geometries #4

chbrandt opened this issue Jun 4, 2021 · 0 comments
Assignees

Comments

@chbrandt
Copy link
Owner

chbrandt commented Jun 4, 2021

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"
@chbrandt chbrandt self-assigned this Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant