[GRASS-dev] g.proj to create a new location

Moritz Lennert mlennert at club.worldonline.be
Mon Feb 12 16:50:21 EST 2007


On Mon, February 12, 2007 19:28, Michael Barton wrote:
> I'm continuing to follow this discussion and I don't think it will be a
huge
> problem to wrap this into TclTk. The simplest way for TclTk to parse
this is
> to simply have each datum transformation be a separate line in text sent to
> stdout.
>
> 1:dt1 parameters
> 2:dt2 parameters
> 3:dt3 parameters
> ...and so on
>
> The way I'm thinking of doing this is to open a read channel from the
command as follows...
>
> set input [open "|g.proj epsg=$epsgcode epsgloc=$epsgloc datumtrans=-1"]
set dtrans [read $input]
> close $input
> if {$dtrans==""} {
>     # I assume that $dtrans=="" if there is only one default parameter
open "|g.proj epsg=$epsgcode epsgloc=$epsgloc datumtrans=0"


This means that if there is only one set of default parameters, these are
not set explicitely in PROJ_INFO. Another option would be to make this

open "|g.proj epsg=$epsgcode epsgloc=$epsgloc datumtrans=1"

to do so.

I don't know what is better. If we want to leave the choice to the user,
the GUI could offer it (maybe in form of a checkbox), or should this be
only for powerusers, and GUI users live with the default=no parameters
solution ?

Moritz






More information about the grass-dev mailing list