[GRASS-dev] text interface for GRASS70
Martin Landa
landa.martin at gmail.com
Wed Mar 23 05:44:19 EDT 2011
Hi,
2011/3/23 Glynn Clements <glynn at gclements.plus.com>:
>> > > $ grass70 -c /home/martin/grassdata/test1
>> > > g.proj -p
>> > > XY location (unprojected)
>>
>> create XY by default? I'm not so sure about that. I'd think it
>> much better to exit with an error if location type could not be
>> determined.
>
> The most important thing is to create /something/ so that you can
> actually get into GRASS. Once you've done that, you can change the
> projection or create a new location with g.proj. But first you have to
> get to the point that g.proj works.
Agreed.
>> > > $ grass70 -c ~/lakes.shp /home/martin/grassdata/test1
>> >
>> > in r45727 you can also create new location based on EPSG
>> >
>> > $ grass70 -c EPSG:4326 /home/martin/grassdata/test1
>>
>> re. -c, in GRASS 6 we have been using the -c command line flag
>> to create a new mapset if it doesn't exist. Using the same
>> flag contextually to create a new location too would be confusing
>> and bug prone. We should split mapset/location creation into
>> two separate flags.
>
> The argument is a complete path, so the logical approach would be to
> check how much of that path already exists, i.e.:
should be working like this
> if the complete path exists:
> mapset already exists; no need to create anything
$ grass70 -c /home/martin/grassdata/nc_spm_08/user1/
works
> else if the path minus the last element exists:
> location exists; create new mapset
$ grass70 -c /home/martin/grassdata/nc_spm_08/user2
works
> else if the path minus the last two elements exists:
> database exists; create new location and mapset
current behaviour
grass70 -c /home/martin/grassdata/test01/user
creates location 'user' in dbase '/home/martin/grassdata/test01'
I am not sure at this point, to change this behaviour you would need
to define always the mapset, e.g.
grass70 -c /home/martin/grassdata/test01/PERMANENT
which is annoying.
> else
> none of it exists; create new database, location and mapset
$ grass70 -c /home/martin/grassdata/nc_spm_08/user1/
works.
[...]
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list