[GRASS5] projection definition for new location

Glynn Clements glynn.clements at virgin.net
Mon Oct 28 07:44:38 EST 2002


Moritz Lennert wrote:

> While working on the tutorial, I've come upon a small incoherence in
> the projection definition screens for a new location which might
> confuse new users:
> 
> If I chose D - Other Projection and then ask for a list of available
> projections, the first to on this list are ll and utm, both of which
> give me the error message:
> 
> ***
> Projection 99 does not support UTM or LL
> 
> Please specify projection name
> Enter 'list' for the list of available projections
> Hit RETURN to cancel request
> ***
> 
> Already, I do not think this message very clear: a "normal" user would
> have no idea about "Projection 99", but the second problem is that
> when I follow the instruction to "Hit RETURN to cancel request", I
> arrive at the screen for defining the default region. In my logic, I
> should be arriving at the screen allowing me to chose between x,y, ll,
> utm, or other projection.
> Then, when I try to cancel the default region definition screen with
> Ctrl-C I get a message telling me that the location has been created,
> but without projection information.
> 
> I would suggest that cancelling during this process actually should
> cancel the creation of a location and either exit GRASS or get the
> user back to the screen where he/she is asked to give the names of
> location, mapset, and database.

Easier said than done. The issues to which you refer are part of
g.setproj, which is run from set_data *after* it has created the
location. GRASS doesn't provide any mechanism for deleting an existing
location.

However, it would be fairly straightforward to change set_data to
acknowledge the creation of the location immediately, rather than
waiting until a projection has (or has not) been set.

> Second of all, would it be possible to
> either remove ll and utm from the projection list in the "other
> projection" dialogue,

g.setproj calls G_ask_proj_name(), which uses the file
$GISBASE/etc/projections (which is a copy of
src/libes/gis/projections). Removing them from that file will remove
them from the list; however, I don't know whether this will affect the
*.proj programs.

> or provide the user with the possibility to go
> back up one step and chose either of these two projections ?

This would involve rewriting src/general/g.setproj/main.c. Currently,
the code is written in classic Q&A style. Each part of the code
obtains one piece of information, then moves on to the next part. 
There is no way to go back to a previous question. However, you can
subsequently re-run g.setproj manually.

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




More information about the grass-dev mailing list