[GRASS-user] r.proj: fixing a failure
Rich Shepard
rshepard at appl-ecosys.com
Tue Dec 22 12:59:32 EST 2009
On Tue, 22 Dec 2009, Daniel Victoria wrote:
> So, in order to know where you projected raster will fall, you can use
> the v.in.region trick. The command will create a bounding box in your
> map and you can project the vector (using v.proj), and not wory about
> the current region. Then you set your region to the recently projected
> vector (g.region vect=box) and fix your resolution. Now you are ready
> to project your raster and you know the current region matches the
> region where your raster is coming from.
Daniel,
Despite my reading the r.proj man page I missed the critical point that
you and Hamish tried pointing out: that v.in.region is run on the raster
location, not the target location.
Working my way through the r.proj man page note (as you summarize above),
I end with screwy region results.
v.in.region worked; I call the output area (it should be area and not
line, correct?) 'dembox.' Exiting grass and restarting to reset the location
to that of the project, I ran 'v.proj input=dembox
location=dem10m_northwest' without error. However, running 'g.region
vect=dembox' followed by 'g.region -p' shows:
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: grs80
north: 1735231.4372465
south: 1120657.13248051
west: -768668.81031769
east: 40643.22944943
nsres: 32.8315778
ewres: 32.83479551
rows: 18719
cols: 24648
cells: 461385912
Before running 'g.region vect=dembox' 'g.region -p' showed:
proj: 99
zone: 0
north: 1326000
south: 1278000
east: 817000
west: 766500
cols: 1538
rows: 1462
e-w resol: 32.83485046
n-s resol: 32.83173735
top: 1
bottom: 0
cols3: 50500
rows3: 48000
depths: 1
e-w resol3: 1
n-s resol3: 1
t-b resol: 1
Both north and south were extended, but the east-west bounds seem totally
unrealistic.
What might I have missed here? To what should I change the e-w and n-s
resolutions after fixing the first issue?
Thanks,
Rich
More information about the grass-user
mailing list