[GRASSLIST:3038] Re: Projection conversion help
rgrmill at rt66.com
Tue Jan 29 22:20:34 EST 2002
On Tuesday 29 January 2002 14:40, H. Fernandez wrote:
> Hi Roger:
> Thanks for your quick answer. In fact, the procedure you suggested me is
> the same I'm testing, but the error "iNPUT MAP IS OUTSIDE CURRENT REGION"
> continues on. I've tried all definitions I can image of output region,
> without success.. I've some problem, and I don't konw what!!!
r.proj produces that error statement when the input map projects to an area
entirely outside the current region in the mapset you're trying to import the
map into. The problem could be caused by an error in you input map location,
in your output map location or in your current region settings.
> I did a deep review of the map I've imported on. I imported the map from a
> .ppm and the count of rows/columns and colors used (my elevation levels)
> are correct. I note that the header info is not correct, it didn't locate
> the map into the input region I've defined,but I tried to change the header
> file, run the g.region and check than region fit exactly with my
> coordinates... but r.proj continues whit the same error.
The man page for r.in.ppm is specific that you have to manually set the
correct region after the map is imported. It doesn't do that itself because
the ppm file doesn't contain that information.
I hope that you know that the map you imported contains no actual elevation
data. It is just a georeferenced image. That will make some difference to
what you can do with the map.
> Then, I'm bloqued... I'm not sure too if i'm choose the correct output
> projection. Can anyone confirm me if a mercator projection give points with
> longitud and latitude values constans in the same row/column of my map?? Or
> the correct conversion is a ll projeciton (longitude/latitude)???
Maps in the mercator projection have latitude and longitude parallel to their
x and y coordinates. There are a number of other projections that provide
the same feature. In addition to knowing what projection is being used you
also need to place the map's central meridian and a few other details. Once
you have those values set then you also have to be sure that the boundaries
of the region are defined to encompass the area that your original map is
going to cover when it is reprojected into the new location. That can be a
> Any help or test you can suggest me will be really apreciatted. I re-post
> the info of my original map-greyescale image:
> File: Asturias (4887x2131)
> NO 156650 7: 16' 01.419"
> 4855250 43: 46' 06.070"
> SE 400750 4: 12' 57.653"
> 4748800 42: 53: 07.247"
> Thank you very much in advance.
I set up a mercator projection with the latitude of true scale at 43 d 14 '
north and the central meridian at 5 d 45' W -- roughly centered on your area.
I didn't know where the map would fall in the new region so I defined the
default location to extend from +500000N to -500000S and from -500000W to
Then I defined a location for utm zone 30 and built a raster map with the
location and size that you specify above. I used r.proj to copy the map from
the UTM location to the mercator location.
I got the same error that has been bothering you. Then I increased all of
the location boundaries by a factor of 10, to +5000000N to -5000000S, and
-5000000W to 5000000E. That worked. The map projected to the region defined
by 3947900N and 3833450S, -123100W to 124600E.
The map will project to different coordinates, depending on your exact choice
for the central meridian, latitude of true scale, the scale factor and the
resolution of your map.
Maybe all you need to do is make the boundaries of your mercator location
Lee Wilson and Associates
More information about the grass-user