[GRASS-dev] [GRASS GIS] #848: v.in.mapgen: allow direct input from stdin

#848: v.in.mapgen: allow direct input from stdin
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: v.in.mapgen | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Hi,

it would be nice if v.in.mapgen could read directly from stdin when
'input=-'.

in "matlab" format mode this module can make a vector line map from a two
column "x y" data-stream, with new lines created whenever a "nan nan" is
in the stream. this is very useful for creating a line from points without
bothering with the grass vector ascii format. it might be worth getting
its own wrapper script as the 'v.in.mapgen -f' command is not obvious for
this generic task. v.in.points_as_lines or ...?

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/848&gt;
GRASS GIS <http://grass.osgeo.org>

#848: v.in.mapgen: allow direct input from stdin
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Resolution: fixed | Keywords: v.in.mapgen
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

I've just added a new ''v.in.lines'' wrapper shell script into the svn
addons repo.

after suitable testing and porting to python it should be added into the
main archive, as what it wraps (v.in.mapgen -f) is not at all obvious for
the task.

known bug/feature: if you specify a fs=[not whitespace] when there is
really whitespace as the fs it will still work. shrug.

intentional but subtle feature: if you pass 2D data to it and use the -z
flag to make a 3D vector line the z coordinate will be populated with 0s.

enjoy,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/848#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>