[GRASSLIST:452] g.setproj problem

Hi all, I am trying to import a non georeferenced tif into a lat long location.
I received the standard error in this situation stating

WARNING: G_set_window(): Illegal latitude for South

As suggested in GRASSLIST 6203, I want to change my lat long location into an xy
location using g.setproj, import the tif and set the boundaries, then reset
back to lat long. Here is the problem. When I run g.setproj, I never get a
chance to set the projection. A typical interactive session looks like this:

GRASS 5.0.0 > g.setproj

WARNING! A projection file
'/Users/gans/grass/sonoralatlong/PERMANENT/PROJ_INFO'
   already exists for this location

This file contains all the parameters for the location's projection:
Latitude-Longitude

Overriding this information implies that the old projection parameters
    were incorrect. If you change the parameters, all existing data will be
    interpreted differently by the projection software.
    GRASS will not re-project your data automatically

Would you still like to change some of the parameters (y/n) [n] y
The current ellipsoid is clark66
Would you want to change ellipsoid parameter (y/n) [n]
The ellipse information is not changed
Do you want to specify a map datum for this location?(y/n) [n]

Projection information has been recorded for this location

What is going on? Is there a way to import a tif into a lat long besides this
method? I am running GRASS 5.0.0 v2 (OpenOSX) on mac 10.2.6.

Thanks,
ian

Hello

On Fri, 20 Jun 2003, Ian Macmillan wrote:

Hi all, I am trying to import a non georeferenced tif into a lat long location.
I received the standard error in this situation stating

WARNING: G_set_window(): Illegal latitude for South

As suggested in GRASSLIST 6203, I want to change my lat long location into an xy
location using g.setproj, import the tif and set the boundaries, then reset
back to lat long. Here is the problem. When I run g.setproj, I never get a
chance to set the projection.

You are correct; the advice in that message doesn't really work properly.
g.setproj originally seems to have been designed only for setting up USA
state plane projections and prompting the user for the parameters required
by the PROJ software for each projection. It has had further capabilities
added to it over the years, none of which it does particularly well.

In particular, changing a location's projection from or to one of the 3
originally supported by GRASS (xy, latlong or utm) can be very messy and
you are probably better creating a new location and then copying the
generated WIND, PROJ_INFO and PROJ_UNITS (if present--the latter two won't
be for an xy location) files back over to your old location if you want to
do this (back up the old ones so you can easily change back later).

However, for this particular problem, I *suspect* you may be able to
change your projection to xy by manually editing the WIND file in the
PERMANENT mapset directory of your location. Just change the line
'proj: 3' (which means latlong) to 'proj: 0' (which means xy).

I hope this works; let me know.

Paul Kelly

Ian Macmillan said:

Hi all, I am trying to import a non georeferenced tif into a lat long
location.
I received the standard error in this situation stating

WARNING: G_set_window(): Illegal latitude for South

As suggested in GRASSLIST 6203, I want to change my lat long location into
an xy
location using g.setproj, import the tif and set the boundaries, then
reset
back to lat long. Here is the problem. When I run g.setproj, I never get
a
chance to set the projection. A typical interactive session looks like
this:

GRASS 5.0.0 > g.setproj

WARNING! A projection file
'/Users/gans/grass/sonoralatlong/PERMANENT/PROJ_INFO'
   already exists for this location

This file contains all the parameters for the location's projection:
Latitude-Longitude

Overriding this information implies that the old projection parameters
    were incorrect. If you change the parameters, all existing data will
be
    interpreted differently by the projection software.
    GRASS will not re-project your data automatically

Would you still like to change some of the parameters (y/n) [n] y
The current ellipsoid is clark66
Would you want to change ellipsoid parameter (y/n) [n]
The ellipse information is not changed
Do you want to specify a map datum for this location?(y/n) [n]

Projection information has been recorded for this location

What is going on? Is there a way to import a tif into a lat long besides
this
method? I am running GRASS 5.0.0 v2 (OpenOSX) on mac 10.2.6.

The method that is generally recommended is to create a separate x,y
location, import the raster file into that location and then
geocode/reproject into the lat-long location. See
http://grass.itc.it/gdp/grass5tutor/HTML/c1014.html for more information.

Moritz