[GRASS-user] v.to.rast error in version 7.0.6svn

Anna Petrášová kratochanna at gmail.com
Tue Oct 18 21:01:22 PDT 2016


On Tue, Oct 18, 2016 at 11:56 PM, alassane toure <atourej at gmail.com> wrote:
> Anna,
> I run the command you suggested and there is indeed a connection problem.
> How do i fix it?  Here are the commands i run in a grass/python script:
>
> criteria="(value=255) and (area_sf>"+sys.argv[5]+")"
> grass.run_command('v.extract', input='imperv',
> output='impervh_clean',type='area',where=criteria)
>
> Here is the command yielding the database connection error...
>
> grass.run_command('v.to.rast', input='impervh_clean',
> output='impervh_clean1',use='attr',attribute_column='value')
>
> Any suggestion to establish db connection for vector map "impervh_clean"?

That's hard to say from this, check whether the v.extract gives any
warning and if it extracts any features.

>
> Regards,
>
> Alassane
>
>
> On Tue, Oct 18, 2016 at 11:29 PM, Anna Petrášová <kratochanna at gmail.com>
> wrote:
>>
>> On Tue, Oct 18, 2016 at 11:21 PM, alassane toure <atourej at gmail.com>
>> wrote:
>> > Anna,
>> > is that the command needed to make the connection? ...
>>
>> No, it just shows you the current connection, I was just trying to
>> analyze the problem.
>>
>>
>> >
>> > db.connect driver=sqlite
>> > database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
>> > db.tables -p
>> > v.db.connect map=vectormap table=table driver=sqlite \
>> >
>> > database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
>> > v.db.connect -p map=vectormap
>> >
>> >
>> > Thanks,
>> >
>> > Alassane
>> >
>> >
>> > On Tue, Oct 18, 2016 at 9:46 PM, Anna Petrášová <kratochanna at gmail.com>
>> > wrote:
>> >>
>> >>
>> >>
>> >> On Tue, Oct 18, 2016 at 9:31 PM, alassane toure <atourej at gmail.com>
>> >> wrote:
>> >>>
>> >>> Group,
>> >>> While executing v.to.rast the following error came up (not present in
>> >>> earlier 7.0 version)
>> >>> Your suggestion is appreciated.
>> >>
>> >>
>> >> Check your database connection for the input vector, it says:
>> >>  "Database connection not defined for layer <1>"
>> >>
>> >> using v.db.connect -p vector_name
>> >>
>> >> Anna
>> >>
>> >>>
>> >>> Thanks
>> >>> Alassane
>> >>>
>> >>> _______________________________________________
>> >>> grass-user mailing list
>> >>> grass-user at lists.osgeo.org
>> >>> http://lists.osgeo.org/mailman/listinfo/grass-user
>> >>
>> >>
>> >
>
>


More information about the grass-user mailing list