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

srtm2sdf creates wrong filenames for files in Australia #6

Open
nebukadnezar opened this issue Apr 11, 2018 · 2 comments
Open

srtm2sdf creates wrong filenames for files in Australia #6

nebukadnezar opened this issue Apr 11, 2018 · 2 comments

Comments

@nebukadnezar
Copy link

nebukadnezar commented Apr 11, 2018

running the SDF converter for files in Australia: srtm2sdf S31E113.hgt

creates this output file:

-31:-30:246:247.sdf

The correct filename would be:
-31:-30:113:114.sdf

This behaviour occurs both on OS X and Ubuntu 16.04. I've built from the git source on both platforms, and I've also tried the pre-compiled OS X binary. They all behave the same.

@Cloud-RF
Copy link

It's correct as SDF longitudes are positive westings.
https://github.com/jmcmellen/splat/blob/master/utils/srtm2sdf.c#L550

@nebukadnezar
Copy link
Author

That is a surprising explanation. And I'm not being cynical, I'm genuinely surprised by this, and here's why: Considering plotting a topo map with the filenames changed to the actual longitudes as I suggested above in fact does create the topo map, with the correct orientation. When I leave the filenames the way they were generated, no tiles are found, and, consequently, no topo map is created. However, that, along with the absence of any mention that longitudes are in fact NOT longitudes but eastings, led me down the wrong path.

And it's snake potion units again that are causing grief - and this time in a particularly mischievous way: latitude and longitude are well established terms with globally accepted meaning. If one substitutes one of the coordinates with a different unit, a different name should be used. Call it an easting, not a longitude. If only the world could agree one day on using the same units for the same things all over the place...

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