[GRASS5] LatLong E/W problem in southern hemisphere

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 15 12:30:40 EDT 2004


On Fri, 15 Oct 2004, Markus Neteler wrote:

> Hi,
> 
> we have a map in LatLong, located somewhere in Argentina:
> 
> g.region rast=noaa -p
> projection: 3 (Latitude-Longitude)
> zone:       0
> datum:      wgs84
> ellipsoid:  a=6378137 es=0.00669438
> north:      30:24S
> south:      35:42:00.0036S
> west:       58:17:59.9964W
> east:       65:11:59.9892W        <- note this correct value

Just asking: does Southern hemisphere mean we look at things upside down? 
Shouldn't east be (yes) east of west, this east is almost 7 degrees west 
of west, and I think the algorithm is (logically) assuming that you want 
what is asked for, 353 degrees? Or am I missing something (I wouldn't be 
surprised!)? Maybe a warning could be useful when the nsres/ewres ratio is 
so extreme?

Roger

> nsres:      0:03:47.1429
> ewres:      4:42:28.800096
> rows:       84
> cols:       75
>                                                                                                           Mapset <PERMANENT> in Location <santafell>                                                                GRASS 5.7.cvs > g.region -g
> n=-30.4
> s=-35.700001
> w=-58.299999
> e=294.800003          <- note the wrong value
> nsres=0.06309525
> ewres=4.70800003
> 
> The bug seems to be somewhere in libgis, because:
> 
> r.in.bin ~/pub/avhrrpf.ndvi.1ntfsa.840101.11705583 output=noaa bytes=1 north=-30.400000  south=-35.700001  east=-65.199997 west=-58.299999 rows=84 cols=75
> D0/0: E: 294.800003  N:-58.299999
> D0/0: E: 294.800003  N:-58.299999
> D0/0: E: 294.800003  N:-58.299999
> Percent Complete:  100%
> CREATING SUPPORT FILES FOR noaa
> 
> I have added the debug output to
> lib/gis/adj_cellhd.c
> (line 103)
>    G_debug(0,"E: %f  N:%F",cellhd->east,cellhd->west);
> 
> Anyone working in the southern hemisphere and observing similar
> problems?
> 
> Markus
> 
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no





More information about the grass-dev mailing list