[GRASS-dev] r.profile limits in Windows 7
Vaclav Petras
wenzeslaus at gmail.com
Fri Feb 14 06:13:13 PST 2014
On Fri, Feb 14, 2014 at 8:08 AM, Enrico Gallo <enrico.gallo at gmail.com>wrote:
> I think "<stdin" is not an option
Actually, it is for Python (m.proj example):
from grass.script import core as gcore
...
proc = gcore.start_command('m.proj', input='-', separator=' , ',
flags='od',
stdin=gcore.PIPE, stdout=gcore.PIPE,
stderr=gcore.PIPE)
proc.stdin.write(proj_in) # put string to the module stdin
proc.stdin.close()
proc.stdin = None # not sure if this really necessary
proj_out, errors = proc.communicate()
if proc.returncode:
raise RuntimeError("m.proj error: %s" % errors)
# process stdout written into the proj_out string
...
But coordinate_file might be better in your case (I'm not sure how to
rewrite code above to easily handle large amounts of coordinates).
Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140214/58f2781a/attachment.html>
More information about the grass-dev
mailing list