Opened 12 years ago

Closed 11 years ago

#1733 closed enhancement (wontfix)

r.out.kml fails close to UTM Zone boundary

Reported by: voncasec Owned by: grass-dev@…
Priority: minor Milestone: 6.5.0
Component: Addons Version: 6.4.2
Keywords: r.out.kml Cc:
CPU: x86-64 Platform: Linux

Description

I have a raster layer on Vancouver Island, British Columbia approaching the boundary between UTM Zone 9/10. When I try and export this layer to kml using the r.out.kml addon from a UTM Zone 9 WGS84 Grass Database, I get the following error message:

Error: Convergence angle to great for undistorted output, reproject first. (2.273756 degrees).

If I reproject the raster layer to UTM Zone 10, WGS84 and try the r.out.kml addon again, the kml file is successfully created.

The problem here is that the layer is in fact fully encompassed within UTM Zone 9, it just happens to be close to Zone 10.

I am not sure what the intended behaviour is when close to a UTM zone boundary, but if this message is correct, it would be nice to have an override option that ignores the convergence angle error and creates the kml regardless.

Change History (3)

comment:1 by hamish, 12 years ago

Type: defectenhancement

Hi, the author here.

The number 1 solution is to reproject into lat/lon. It's KML's native, everything else is a shoe-horn.

The convergence angle check for < 1px per 1280x1024 image size is provided as a convenience for the cases where you can mildly get away with doing the wrong thing without causing too much damage. It is measured at the center of the current computational region.

from the help page:

KML expects data to be in Latitude-Longitude using the WGS84 datum and
EGM96 vertical datum. This script will work for non-geographic map
projections, but only if the projection's local deviation from true-north
(the convergence angle) is small enough to ensure correct output. You can
use the r.proj module from a Latitude-Longitude location to
reproject maps if needed.
At this time vertical datum is not checked by this module as support for
it is relatively new in r.support and r.info.

I'm not in favour of letting the module produce broken and misaligned output. If you wish to bypass the check on your own, edit the script in a text editor and on line 126 comment out the "exit 1" by putting a '#' symbol in front of it.

But it is much better to just reproject to LL and run the module in a lat/lon location, then the alignment will be perfect and the module will be happy.

cheers, Hamish

comment:2 by hamish, 11 years ago

Milestone: 6.4.36.5.0

comment:3 by hamish, 11 years ago

Resolution: wontfix
Status: newclosed

KML fundamentally wants to have Lat/Lon input, we reproject when we can get away with it, not when we can't. See further suggestions in comment:1.

thanks, Hamish

Note: See TracTickets for help on using tickets.