Ticket #1397 (new defect)

Opened 2 years ago

Last modified 10 months ago

Lat/lon compatibility for r.water.outlet

Reported by: awickert Owned by: grass-dev@…
Priority: major Milestone: 6.4.4
Component: Raster Version: svn-releasebranch64
Keywords: r.water.outlet Cc:
Platform: All CPU: x86-64

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

r.water.outlet_latlon_fix Download (399 bytes) - added by awickert 2 years ago.
Extra line in main.c to solve longitude wraparound problem when building draiange basins with r.water.outlet

Change History

Changed 2 years ago by awickert

Extra line in main.c to solve longitude wraparound problem when building draiange basins with r.water.outlet

Changed 2 years ago by awickert

  • priority changed from normal to major
  • platform changed from Linux to All

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.

Changed 2 years ago by martinl

  • keywords r.water.outlet added

Changed 20 months ago by neteler

Probably the added function needs to be encapsulated into a LatLong? test?

http://grass.osgeo.org/programming6/window__map_8c_source.html#l00149

Changed 20 months ago by 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!

Changed 10 months ago by neteler

  • milestone changed from 6.4.2 to 6.4.4
Note: See TracTickets for help on using tickets.