[GRASS-dev] 2D to 3D points

Hamish hamish_b at yahoo.com
Mon Mar 3 03:27:36 EST 2008


> >> Benjamin Ducke wrote:
> >>> How about a little wrapper script for v.transform that simplifies
> >>> this action?

Dylan:
> > However, doesn't it make more sense to put that code (for
> > points) into v.extrude ? Or, is v.extrude primarily for areas 
> > by design?

Michael:
> IMHO, v.type is a much better place to put this. v.type is already  
> designed to transform vector objects from one type of vector object  
> to another. Changing a vector object from a 2D point to a 3D point  
> seems to fit this concept well.

As the functionality is already written into a C module, and v.type is
not conspicuously missing the feature or obviously+naturally matching
the task, IMO it is better to use a simple wrapper script with an
obvious+natural name.

I wonder if such a script could call another module for the reverse
proceedure? (v.out.ascii directly piped back into v.in.ascii (without
-z)?, or v.transform + db.in.ogr? or some new C code?)

for the 2D -> 3D case the clearest way would be to pipe
'v.out.ascii.db | v.in.ascii -z' and then copy the table. But to do
that properly v.out.ascii would need to finally to have the DB output
code written. (probably pretty simple to do; the v.out.ascii.db script
can be found in wiki addons)


> (And while we're at it, v.type should
> be changed to work like v.type.sh).

the module command line interface can't change until GRASS 7.
Hence we have v.type.sh, for once it's not due to long queues.

 
> v.transform is really a georectifying module for vector objects. It's
> a conceptual stretch to include transforming 2D to 3D points there-- 
> though it does work.

Hence using a wrapper function with a more intuitive name and only
expose the relevant options.



Hamish



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the grass-dev mailing list