[GRASS-user] Bug?: Projecting the same region from location to location and back gives a different result!!!!

Dear friends,

a very strange behaviour indeed:

1) location "A", one region defined TM, datum osgb36, region
s=0,w=0,e=800000,n=1300000

2) location "B", one region defined lat/long, wgs84 180W,180E,60N,60S

in location A, I use v.in.region to draw a vector called "outbox", I load it
in location B with v.proj input=outbox ouput=outbox_fromA, I set the region
in location B to the region of the box with g.region vect=outbox_fromA.

The I go back: in location B, v.in.region to a vector called "back". In
location A I use v.proj input=back ouput=back_fromB to project it and then
set the region with g.region vect=back_fromB.

The region I get in location A is compeltely different from the original
location ....!!!!!!!!!!! But it should not be ..... it should actually be the
same!

Help!

Best,
--
Corrado Topi

Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
University of York, York, YO10 5YW, UK
Phone: + 44 (0) 1904 328645, E-mail: ct529@york.ac.uk

Corrado wrote:

a very strange behaviour indeed:

1) location "A", one region defined TM, datum osgb36, region
s=0,w=0,e=800000,n=1300000

2) location "B", one region defined lat/long, wgs84 180W,180E,60N,60S

in location A, I use v.in.region to draw a vector called "outbox", I load it
in location B with v.proj input=outbox ouput=outbox_fromA, I set the region
in location B to the region of the box with g.region vect=outbox_fromA.

The I go back: in location B, v.in.region to a vector called "back". In
location A I use v.proj input=back ouput=back_fromB to project it and then
set the region with g.region vect=back_fromB.

The region I get in location A is compeltely different from the original
location ....!!!!!!!!!!! But it should not be ..... it should actually be the
same!

No it shouldn't.

The current region (and hence the vector map created by v.in.region)
will always be an axis-aligned rectangle.

The projection step will often introduce rotation and/or other
distortion, so the output of v.proj will be an arbitrary
quadrilateral.

Setting the current region to this map will produce the smallest
rectangle which bounds the quadrilateral.

Reverse-projecting the bounding region back to the original coordinate
system will produce another arbitrary quadrilateral, not the original
rectangle.

--
Glynn Clements <glynn@gclements.plus.com>