[GRASSLIST:10138] Problems with r.proj - grass 6.01

Dear grass-friends

I have created two locations with different projections:

Location (1) Projection
PROJCS["MGI_M31",GEOGCS["GCS_MGI",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",450000.0],PARAMETER["False_Northing",-5000000.0],PARAMETER["Central_Meridian",13.33333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Location (2) Projection
PROJCS["Germany_Zone_4",GEOGCS["GCS_Deutsches_Hauptdreiecksnetz",DATUM["D_Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",4500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",12.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

In location (1) i´ve imported with r.in.gdal a orthofoto and created with r.composite a colour-orthofoto. For both i set the resolution to 1. Both steps were o.k.

Then i started location (2) and wanted to re-project the orthofoto from location (1) with r.proj into the current location. I set the resolution to 1 in the location and in the input of r.proj and the option „Do not perform region cropping optimization“.

in the output of r.proj there was written resolution in N-S 1,01... and in W-E 0,99.....
then the re-projection started and finished. A raster-map was created in location (2), but if i zoom to this raster, i can´t see nothing there.

With thanks in advance and greetings from austria
helli

grass 6.01

______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193

Helmut,

I gues your problem is that you need to set up the region in BOTH inout
and output location so it covered the extent of raster data you need to
reproject. This can be easily achieved like this:

IN INPUT LOACTION
1 set up the region
2 v.in.region type=line output=the_region

IN OUTPUT LOCATION
3 v.proj the "the_region" you created in step 2
4 g.region vect=the_region
5 r.proj

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/

Quoting Helmut Kudrnovsky <hellik@web.de>:

Then i started location (2) and wanted to re-project the orthofoto from location (1) with r.proj into the current location. I set the resolution to 1 in the location and in the input of r.proj and the option „Do not perform region cropping optimization“.

Unless you are working with global maps you should let r.proj do region cropping for you. Otherwise, if input and output are not overlapping, you will end up with an empty map. r.proj will normally warn you that the input map is outside the currrent region, but not so if you disable region cropping.

There is no need to set a current region of the input location - r.proj will only look at the map's extent, NOT at the WIND file that contains the last active region settings for the input location. On the output side r.proj will honor current region settings and create a map that is, at most, the size of the current region.

What result do you get do not disable region cropping?

rgds
Morten

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

morten@untamo.net wrote:

> Then i started location (2) and wanted to re-project the orthofoto
> from location (1) with r.proj into the current location. I set the
> resolution to 1 in the location and in the input of r.proj and the
> option „Do not perform region cropping optimization“.

Unless you are working with global maps you should let r.proj do region
cropping for you. Otherwise, if input and output are not overlapping,
you will end up with an empty map. r.proj will normally warn you that
the input map is outside the currrent region, but not so if you disable
region cropping.

Disabling region cropping (the -n switch) is the safest option. The
only disadvantages are that it may be slower, and it won't warn you in
advance if you are going to end up with an empty map.

It will never result in data being lost.

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