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

alassane toure atourej at gmail.com
Tue Oct 18 20:56:15 PDT 2016


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"?

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
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161018/5da9bf7e/attachment.html>


More information about the grass-user mailing list