Opened 13 years ago
Last modified 9 years ago
#1397 new defect
Lat/lon compatibility for r.water.outlet
Reported by: | awickert | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.6 |
Component: | Raster | Version: | svn-releasebranch64 |
Keywords: | r.water.outlet | Cc: | |
CPU: | x86-64 | Platform: | All |
Description
Adding the attached line to r.water.outlet allows it to work across the 180 meridian in lat/lon coordinate systems.
I believe that the GRASS command G_adjust_east_longitude() is flagged to work only in lat/lon coordinate systems, so there should not be backwards-compatibility issues, but I haven't tested it with a projected coordinate system.
It might be good as well to change to documentation to reflect that the Northing and Easting can also be Latitude and Longitude.
Attachments (3)
Change History (12)
by , 13 years ago
Attachment: | r.water.outlet_latlon_fix added |
---|
comment:1 by , 13 years ago
Platform: | Linux → All |
---|---|
Priority: | normal → major |
Just got an email from someone else having problems with this, so I increased the priority and the affected OS (it should be a totally cross-platform problem since it is a computational issue). This is really just an issue of copying and pasting one line of code, so it should be a simple fix.
comment:2 by , 13 years ago
Keywords: | r.water.outlet added |
---|
comment:3 by , 13 years ago
Probably the added function needs to be encapsulated into a LatLong test?
http://grass.osgeo.org/programming6/window__map_8c_source.html#l00149
follow-up: 6 comment:4 by , 13 years ago
Yes - looks like you are correct and that I misread when I used G_adjust_east_longitude and thought it performed the check; I really wanted G_adjust_easting that wraps G_adjust_east_longitude in the lat/lon projection check.
Thanks for looking into this!
comment:5 by , 12 years ago
Milestone: | 6.4.2 → 6.4.4 |
---|
follow-up: 7 comment:6 by , 11 years ago
Replying to awickert:
Yes - looks like you are correct and that I misread when I used G_adjust_east_longitude and thought it performed the check; I really wanted G_adjust_easting that wraps G_adjust_east_longitude in the lat/lon projection check.
Thanks for looking into this!
Any reasons for not applying the proposed patch (but using G_adjust_easting instead of G_adjust_east_longitude) ?
Moritz
comment:7 by , 10 years ago
Milestone: | 6.4.4 → 6.4.5 |
---|
Replying to mlennert:
Replying to awickert:
Yes - looks like you are correct and that I misread when I used G_adjust_east_longitude and thought it performed the check; I really wanted G_adjust_easting that wraps G_adjust_east_longitude in the lat/lon projection check.
Thanks for looking into this!
Any reasons for not applying the proposed patch (but using G_adjust_easting instead of G_adjust_east_longitude) ?
Moritz
In my case, I'm not a GRASS-dev, so write access was what prevented me from doing this! I have now downloaded GRASS 6.4.5svn to incorporate all updates to date and have applied and checked this change. I am now working to incorporate it into GRASS 7.1.0svn and will open a separate ticket on that once I have finished.
Thanks in advance to whomever looks into (and hopefully accepts!) this fix. Files attached.
Andy Wickert
comment:9 by , 9 years ago
Milestone: | → 6.4.6 |
---|
Extra line in main.c to solve longitude wraparound problem when building draiange basins with r.water.outlet