Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have two raster layers, A and B, which have information about the same location but have different projections and datums.

How can I reproject layer A to match the projection and datum of layer B?

Trying to use r.proj yields:

ERROR: Input raster map is outside current region

When I use g.region to set the region to layer B, I get the same error.

When I use g.region to set the region to layer A, then the input and output projections are the same.

Layer A has a projection of:

Projection: Lambert Conformal Conic                                 
N: 5786515.18365295    S: 5349685.18365295   Res:    30         
E: -13519426.48582491    W: -13806586.48582491   Res:    30 

Layer B has a projection of

Projection: Lambert Conformal Conic                                 
N:    5087310    S:    4800360   Res:    30                     
E:     606210    W:     440460   Res:    30 

The Lambert Conformal Conic is because this is the projection I selected for the Location. Presumably the specific values of the LCC occurred when the raster layers were imported.

share|improve this question
    
1st, you can reproject raster map files outside of GRASS, simply by using gdal utilities. 2nd, if the maps are referenced in different projection systems, it is not possible to have them imported inside the same GRASS Location. You should have created an independent Location for each of your raster maps (since they are projected in different systems). Then, as markusN "answered" reproject from one Location to another. –  Nikos Alexandris May 17 '13 at 12:55
add comment

2 Answers

Using r.proj, You can either reproject map B into the location of map A (or vice verse), or create a third location with a yet different projection and reproject both maps into it. More precise info about the situation (which projections do you have?) would be helpful, though.

share|improve this answer
    
Thanks, @markusN. I'm afraid this yielded a few problems for me, which I have appended to the question. –  Richard Mar 27 '13 at 20:12
add comment

It would be very helpful if you could give us the region information for each location. You can get the details from each location by executing :

 g.region -p

I think you haven't set the default region from the start for both regions. The default region spawns to n=1 s=1 e=1 w=1 which it is very generic probably invalid and it doesn't make any sense at all, especially if it's a projected CRS.

What you can do, is for each location to set g.region to something valid using the command :

g.region rast=<name_of_rast>

And then retry.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.