[GRASS5] Projection question: Goode homolosine / m.proj2

Hi,

I need a bit of help for Goode Homolosine projection (AVHRR data).
From http://daac.gsfc.nasa.gov/data/dataset/AVHRR/ I downloaded
a AVHRR data set which I want to store in a Goode Homolosine LOCATION.

The lat/long boundaries are (stored into file 'latlong'):
-9.1 47.3
-9.1 -45.1
12.9 47.3
12.9 -45.1

RESOLUTION: 8000m

To get the boundaries in Goode projection, I used m.proj2 (enter in one
line):

m.proj2 inproj="proj=ll" outproj="proj=goode,name=goode,
ellps=wgs84,lat_0=0.0,lon_0=20.0,unfact=1.0"
input=latlong output=goode

Result:
-2289443.208536 5251097.248241
-2347834.155174 -5014324.412190
-558592.672873 5251097.248241
-572839.261228 -5014324.412190

Accordingly I selected:
N: 5251097.248 -> 5251100
S: -5014324.412 -> -5014300
W: -2347834.155 -> -2347800
E: -558592.672 -> -558600
East-West: 8000
North-South: 8000

  north: 5251100
  south: -5014300
  east: -558600
  west: -2347800

  e-w res: 7987.5 (Changed to conform to grid)
  n-s res: 8001.09119252 (Changed to conform to grid)

  total rows: 1283
  total cols: 224
  total cells: 287,392

Now the test:
g.region -l
long: -9.84175 lat: 47.30003 (north/west corner)
long: 12.89990 lat: 47.30003 (north/east corner)
long: 13.07650 lat: -45.09977 (south/east corner)
long: -9.09950 lat: -45.09977 (south/west corner)
rows: 1283
cols: 224
Center Longitude: 1:45:31.635386E [1.75879]
Center latitude: 1:06:00.451679N [1.10013]

This is very strange, as the result must be within
N: 47.3, S: -45.1, E: 12.9, W: -9.1

Perhaps someone has a hint for me what's wrong above.

Thanks

Markus

Markus Neteler wrote:

The lat/long boundaries are (stored into file 'latlong'):
-9.1 47.3
-9.1 -45.1
12.9 47.3
12.9 -45.1

RESOLUTION: 8000m

To get the boundaries in Goode projection, I used m.proj2 (enter in one
line):

m.proj2 inproj="proj=ll" outproj="proj=goode,name=goode,
ellps=wgs84,lat_0=0.0,lon_0=20.0,unfact=1.0"
input=latlong output=goode

This doesn't give you the boundaries of the region. The point -9.1E 0N
is within the region but its projection will lie to the left of the
box obtained by projecting the corners.

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

On Sun, Feb 10, 2002 at 05:33:04PM +0000, Glynn Clements wrote:

Markus Neteler wrote:

> The lat/long boundaries are (stored into file 'latlong'):
> -9.1 47.3
> -9.1 -45.1
> 12.9 47.3
> 12.9 -45.1
>
> RESOLUTION: 8000m
>
> To get the boundaries in Goode projection, I used m.proj2 (enter in one
> line):
>
> m.proj2 inproj="proj=ll" outproj="proj=goode,name=goode,
> ellps=wgs84,lat_0=0.0,lon_0=20.0,unfact=1.0"
> input=latlong output=goode

This doesn't give you the boundaries of the region. The point -9.1E 0N
is within the region but its projection will lie to the left of the
box obtained by projecting the corners.

Glynn, sorry for a naive question: How it is calculated properly?

Thanks,

Markus

Markus Neteler wrote:

> > The lat/long boundaries are (stored into file 'latlong'):
> > -9.1 47.3
> > -9.1 -45.1
> > 12.9 47.3
> > 12.9 -45.1
> >
> > RESOLUTION: 8000m
> >
> > To get the boundaries in Goode projection, I used m.proj2 (enter in one
> > line):
> >
> > m.proj2 inproj="proj=ll" outproj="proj=goode,name=goode,
> > ellps=wgs84,lat_0=0.0,lon_0=20.0,unfact=1.0"
> > input=latlong output=goode
>
> This doesn't give you the boundaries of the region. The point -9.1E 0N
> is within the region but its projection will lie to the left of the
> box obtained by projecting the corners.

Glynn, sorry for a naive question: How it is calculated properly?

I'm not entirely sure that I understand the question.

If you you are asking how to compute the bounding box in the Goode
projection of a lat/lon rectangle where the region straddles the
equator, you would need to include the corresponding segment of the
equator, as that will determine the left and/or right edges of the
projected region (in this case, just the left hand edge, as the entire
region is to the West of the central meridian).

E.g. feeding the following coordinates to m.proj2:

  12.9 47.3 # gives top, right
  -9.1 0.0 # gives left
  12.9 -45.1 # gives bottom (lon is irrelevant)

then taking the max/min x/y of the results should give the smallest
rectangle in the Goode projection which contains the source lat/lon
rectangle. Clearly, the resulting region will include points which lie
outside of the original lat/lon rectangle.

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