[GRASS-user] Re: GRASS-user] Help with reprojection

Hamish hamish_b at yahoo.com
Sat Jan 3 16:19:30 EST 2009


Alex Bernstein:
> > The input data set is Natural Earth II map of the world
> > <http://www.nacis.org/data/NE2/NE2_WDB1.jpg> 16200x8100 JPG in plate
> > carrée projection. I need to reproject it into Lambert azimuthal
> > equal-area projection centered on N0 E15.

this data needs a lat/lon location.
perhaps with wgs84 datum or no datum with a spherical ellipsoid?
(at this scale maybe it doesn't matter much; for reprojection a datum
will be needed)

> > rows:       8100
> > cols:       16200

north-south:
 8100/(90+90) = 45 pixels per degree, ie a resultion of 1'20".

east-west gives the same answer. (180W to 180E is 360deg)

> > I then imported the JPG map, which got split into color channels and
> > composed the channels together into single map.

I think you will either need to make a "world file" for the .jpg before
importing with r.in.gdal into the lat/lon location, OR:

- create a simple xy location
    (lat/lon location will not allow north > 90, and you image while
     still not geo-referenced will go to 8100)
- run r.region to set n,s,e,w bounds to 90,-90,180,-180
- run g.setproj to rejig the location into a lat/lon one.
- check resolution is correct (nicely "0:01:20") with r.info.
- zoom to area of interest. you probably do not want to reproject
  entire planet. after zooming check resolution is preserved,
  (g.region -p, maybe with "g.region res=0:01:20 -a" after zoom to fix)
  and run "r.mapcalc cropmap=fullmap" to perform the crop.

then from the lambert location run r.proj to pull the cropped image
across.

there are some examples of this process in the GRASS wiki, look at the
"Global datasets" page.


Michael:
> Looking at the jpg, it has no latlon or other geographic
> markers. This will make it difficult to georectify
> accurately.

with some guesswork you can figure it out: extent is full planet and
rows/cols of map are exact multiples of deg-min-sec.


happy new year,
Hamish

(now back to the beach ;)



      



More information about the grass-user mailing list