[GRASS-user] GRASS GIS 7.8.5 v.distance

Stefan Blumentrath Stefan.Blumentrath at nina.no
Thu May 13 13:04:11 PDT 2021


Hi Kelsey,

Try: "from_"

So, 
gs.run_command('v.distance', 
    from_ = 'buildings', 
    to = 'mappedStreams',

The problem is indeed that from is a keyword...

Cheers
Stefan

-----Original Message-----
From: grass-user <grass-user-bounces at lists.osgeo.org> On Behalf Of Kelsey Wong
Sent: torsdag 13. mai 2021 21:32
To: grass-user at lists.osgeo.org
Subject: [GRASS-user] GRASS GIS 7.8.5 v.distance

Hi,

I am trying to use the v.distance function in GRASS GIS 7.8.5, however, it won't accept 'from' as a parameter as it's a python keyword (I think). When I use 'FROM' I get an error saying:

WARNING: Illegal filename <FROM=buildings>. Character <=> not allowed.
ERROR: Vector map <FROM=buildings> not found

This is the code I'm trying to run:

gs.run_command('v.distance', 
    FROM = 'buildings', 
    to = 'mappedStreams', 
    upload = 'to_attr', 
    column = 'stream_id', 
    to_column = 'OBJECTID', 
    output = 'distanceLines', 
    overwrite = True)

Any help would be greatly appreciated.

Thanks!
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgrass-user&data=04%7C01%7C%7C8d24cded0189434d8cc708d91646e043%7C6cef373021314901831055b3abf02c73%7C0%7C0%7C637565316357978059%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Wi6V%2FnzJQvTKzyUf0oK6q18d0MOMI%2FPOrLbNms2BfZQ%3D&reserved=0


More information about the grass-user mailing list