[GRASSLIST:2425] Re: g.region output in decimal degrees
Markus Neteler
neteler at itc.it
Sun Feb 1 04:23:06 EST 2004
On Sun, Feb 01, 2004 at 12:16:02AM -0500, Jason Horn wrote:
> Small but perplexing question:
>
> g.region outputs the coordinates of a lat-lon locaion in dd:mm:ss
> format. How can I get it into decimal degrees? (I can't just convert
> it manually - I'll loose accuracy.) I need to know the exact
> boundaries of the region in decimal degrees. In the manual page for
> g.region, it shows output for g.region -l in decimal degrees. But I
> get dd:mm:ss when I invoke it.
In a latlog location:
GRASS 5.7.-cvs:~ > g.region -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: a=6378137 es=0.00669438
north: 47:39:27.3456N
south: 47:27:03.6432N
west: 10:56:05.2476E
east: 11:04:23.0484E
nsres: 0:00:02.9988
ewres: 0:00:02.9988
rows: 248
cols: 166
GRASS 5.7.-cvs:~ > g.region -g
n=47.657596
s=47.451012
w=10.934791
e=11.073069
nsres=0.000833
ewres=0.000833
In a Gauss-Krueger (Transverse Mercator) location:
GRASS 5.7.-cvs:~ > g.region -p
projection: 99 (Transverse Mercator)
zone: 0
datum: potsdam
ellipsoid: bessel
north: 5956600
south: 5953200
west: 3380000
east: 3382000
nsres: 0.32
ewres: 0.32
rows: 10625
cols: 6250
GRASS 5.7.-cvs:~ > g.region -l
long: 7.18156 lat: 53.72834 (north/west corner)
long: 7.21185 lat: 53.72880 (north/east corner)
long: 7.21314 lat: 53.69826 (south/east corner)
long: 7.18288 lat: 53.69780 (south/west corner)
rows: 10625
cols: 6250
Center Longitude: 7:11:50.484819E [7.19736]
Center latitude: 53:42:47.876333N [53.71330]
To be disussed is which datum 'g.region -l' should use. Maybe the
code should be updated to work as 'd.where' does:
-d Output lat/long in decimal degree
-l Output lat/long referenced to current ellipsoid
-w Output lat/long referenced to WGS84 ellipsoid using datum
Markus Neteler
More information about the grass-user
mailing list