Opened 15 years ago

Closed 15 years ago

#848 closed enhancement (fixed)

v.in.mapgen: allow direct input from stdin

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: v.in.mapgen Cc:
CPU: All Platform: All

Description

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

Change History (1)

comment:1 by hamish, 15 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.