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

Is web mercator transform correct? #82

Open
WillieMaddox opened this issue Mar 24, 2017 · 1 comment
Open

Is web mercator transform correct? #82

WillieMaddox opened this issue Mar 24, 2017 · 1 comment

Comments

@WillieMaddox
Copy link

In geo_util.py, this line gives me the correct lat lon in web mercator.

x2, y2 = transform(in_proj, out_proj, ulon, ulat)

But this last line (just before the return) seems to transform it back to lat lon in degrees:

x2, y2 = out_proj(x2, y2, inverse=True)

which I believe is incorrect. Am I missing something here?

@lematt1991
Copy link

I might suggest using the geoio library. It provides a GeoImage class with methods for performing these transformations proj_to_raster and raster_to_proj. It automatically extracts the metadata from the GeoTIFF to figure out how to perform these transformations.

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

2 participants