[GRASSLIST:453] Re: g.setproj problem

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Jun 20 20:55:20 EDT 2003


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




More information about the grass-user mailing list