[GRASS-user] Problems using qgis and grass in one python script

Moritz Lennert mlennert at club.worldonline.be
Fri Sep 15 02:04:15 PDT 2017



Le 15 septembre 2017 10:01:15 GMT+02:00, Markus Metz <markus.metz.giswork at gmail.com> a écrit :
>On Fri, Sep 15, 2017 at 9:42 AM, Moritz Lennert <
>mlennert at club.worldonline.be> wrote:
>>
>> On 13/09/17 13:11, T K wrote:
>>>
>>> Hello list,
>>>
>>> I am very new to the whole GIS topic, so I do not know if this is
>the
>>> right place for my question, but I did not find a more suitable
>place.
>>
>>
>> This is a good place, don't worry.
>>
>>>
>>> I am trying to combine QGIS and GRASS in one python script.
>>>
>>> The first step is to import a csv-file and create a shp-layer with
>QGIS
>>> which runs without errors. But when I try to load the shp with grass
>>> run_command like v.import or v.in.ogr there is always an error
>Illegal
>>> filename. Character < > are not allowed.
>>
>>
>>
>> You already received an answer about possible cause from Andrea.
>>
>> However, this seems to be an awful lot of hoops to jump through for
>the
>task at hand. Why not just import your csv file directly into GRASS GIS
>with v.in.ascii ?
>
>The last command is v.to.rast, therefore g.region + r.in.xyz with the
>csv
>file as input should do the job.
>

Right, even better if your only aim is to create a raster. It all depends on what you want to do further with the data.

Moritz



More information about the grass-user mailing list