[GRASS-user] correcting a series of images for wrong bounding box (extend)

Hello,
I have trouble doing analysis on a couple of satellite images which have been recorded by the landsat sensor at different times in the past.

Some images have wrong or different bounding box coordinates and therefore do not overlay well on the others.

I tried already with the gdal-tools to warp the wrong image into the target extend, but they still ended up differently.
Now, I created a location in GRASS with the target extend and imported the wrong raster as well as the correct raster.
But when being overlayed, they are still shifted.

May someone please suggest me a solution?

The problem is that I cannot re-georeference the files because the current ground control points have disapeard or changed their location during times.

Thanks in advance for any hints and ideas.
Timmie

[1] http://permalink.gmane.org/gmane.comp.gis.gdal.devel/19059

> May someone please suggest me a solution?

[message received by PM]

are all these images supposed to have the same
boundaries?
Because than you can simply use

r.region map=... n=... s=... e=... w=...

or r.region map=... rast=...
where rast stands for the raster to which you want
to align your map.

Hope this is somewhat the answer you're looking for.

Well, not really, I guess.

I have the following thing:
2 images of the very same area both within the same
UTM projection.

1 image is shifted a fair bit to South-West.
In theory, they should perfectly match (overlay) when
loading one ontop of the
other because the depict the same landscape.

If it were a urban environment, I could simple find a
reference point (church tower etc.) and re-reference
the wrong-adjusted image.
But it is a landscape which has been changing
considerable during the last decades.

My current idea is to play with the bounding box
(extend) definitions when
defining the projection of the location and then
import-/reimport.

I was just looking whether someone else has had the
same experience with some satellite images (landsat).

Thanks and regards,
Timmie

My current idea is to play with the bounding box (extend) definitions when
defining the projection of the location and then import-/reimport.

IS there a option in GRASS to shift a raster by a vector (x, y)?

I found such a tool in the ArcMap Toolbox.

Regards,
Timmie

On Wed, Apr 29, 2009 at 10:32 PM, Tim Michelsen
<timmichelsen@gmx-topmail.de> wrote:

My current idea is to play with the bounding box (extend) definitions when
defining the projection of the location and then import-/reimport.

IS there a option in GRASS to shift a raster by a vector (x, y)?

Sure: use r.region with relative coordinates:

# North Carolina data set example

g.region rast=facility
g.copy rast=facility,myfacility
r.region map=myfacility n=n+100 e=e+100 w=w+100 s=s+100
d.mon x0
d.rast facility
d.rast -o myfacility

... and you see that the myfacility map is shifted by 100m.

I found such a tool in the ArcMap Toolbox.

also in GRASS :slight_smile:

Markus

> IS there a option in GRASS to shift a raster by a vector (x, y)?

Sure: use r.region with relative coordinates

Some things are so simple :slight_smile:

Markus Neteler wrote:

  
My current idea is to play with the bounding box (extend) definitions when
defining the projection of the location and then import-/reimport.
      
IS there a option in GRASS to shift a raster by a vector (x, y)?
    

Sure: use r.region with relative coordinates:

# North Carolina data set example

g.region rast=facility
g.copy rast=facility,myfacility
r.region map=myfacility n=n+100 e=e+100 w=w+100 s=s+100
d.mon x0
d.rast facility
d.rast -o myfacility

... and you see that the myfacility map is shifted by 100m.
  

So r.region actually does a kind of affine transformation? I don’t remember seeing this documented anywhere (the manual says “…manage the boundaries…”) , and I must say it’s confusing and unexpected that a module called r.region (similar to g.region) shifts/changes the data, rather than just defining the region and resolution.

So r.region actually does a kind of affine transformation? I don't
remember seeing this documented anywhere (the manual says "...manage
the boundaries...") , and I must say it's confusing and unexpected that
a module called r.region (similar to g.region) shifts/changes the data,
rather than just defining the region and resolution.

Seems that the docs just got updated in this regard:
http://grass.osgeo.org/grass64/manuals/html64_user/r.region.html