[GRASS5] what projection is lat-long displayed in ?

Glynn Clements glynn.clements at virgin.net
Sat Mar 23 12:30:05 EST 2002


M Lennert wrote:

> > > When using lat-long data and displaying it on the screen or printing
> > > it with ps.map, in what projection is this data actually displayed
> > > on these 2D media ? Is this hardcoded into Grass ?
> > 
> > There isn't any "projection" as such. Actually, GRASS in general
> > doesn't really have much to do with projections; most operations work
> > on abstract coordinates, without regard to whether they are degrees,
> > metres etc.
> > 
> > When it comes to displaying data, GRASS maps coordinates to pixels
> > such that the current region just fits within the active display frame
> > while preserving the aspect ratio.
> 
> But it has to do so using some formula between lat-long coordinates and x-y 
> pixels, no ?

Yes, the obvious one:

	map_x = map_x0 + screen_x * scale
	map_y = map_y0 + screen_y * scale

with inverse:

	screen_x = (map_x - map_x0) / scale
	screen_y = (map_y - map_y0) / scale

where:

+ <screen_x,screen_y> is the pixel coordinates (<0,0> is top-left),

+ <map_x,map_y> is the corresponding map coordinates (whether degrees,
metres, feet or whatever),

+ <map_x0,map_y0> is the top-left (North-West) corner of the region

and "scale" is chosen such that the region just fits into the display
frame.

If you meant to ask what kind of projection would you have to apply to
a lat-lon map to get the same "shape" on screen, the answer is Plate
Carée (aka Equidistant Cylindrical), with the latitude of true scale
being the equator.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list