[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] v.to.rast error in version 7.0.6svn
From:       alassane toure <atourej () gmail ! com>
Date:       2016-10-19 4:13:53
Message-ID: CAC0_Kaf86KHjajHR5rfo7cgYdrEGvH0iApXufiWak0guTD8Hvw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


correct.  there was no feature in "impervh_clean" !

On Wed, Oct 19, 2016 at 12:01 AM, Anna Petrášová <kratochanna@gmail.com>
wrote:

> On Tue, Oct 18, 2016 at 11:56 PM, alassane toure <atourej@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@gmail.com>
> > wrote:
> >>
> >> On Tue, Oct 18, 2016 at 11:21 PM, alassane toure <atourej@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@gmail.com>
> >> > wrote:
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Oct 18, 2016 at 9:31 PM, alassane toure <atourej@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@lists.osgeo.org
> >> >>> http://lists.osgeo.org/mailman/listinfo/grass-user
> >> >>
> >> >>
> >> >
> >
> >
>

[Attachment #5 (text/html)]

<div dir="ltr">correct.   there was no feature in &quot;impervh_clean&quot; \
!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 19, 2016 at \
12:01 AM, Anna Petrášová <span dir="ltr">&lt;<a \
href="mailto:kratochanna@gmail.com" \
target="_blank">kratochanna@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On Tue, Oct 18, 2016 at 11:56 PM, alassane \
toure &lt;<a href="mailto:atourej@gmail.com">atourej@gmail.com</a>&gt; wrote:<br> \
&gt; Anna,<br> </span><span class="">&gt; I run the command you suggested and there \
is indeed a connection problem.<br> &gt; How do i fix it?   Here are the commands i \
run in a grass/python script:<br> &gt;<br>
&gt; criteria=&quot;(value=255) and (area_sf&gt;&quot;+sys.argv[5]+&quot;)&quot;<br>
&gt; grass.run_command(&#39;v.extract&#39;, input=&#39;imperv&#39;,<br>
&gt; output=&#39;impervh_clean&#39;,type=&#39;<wbr>area&#39;,where=criteria)<br>
&gt;<br>
&gt; Here is the command yielding the database connection error...<br>
&gt;<br>
&gt; grass.run_command(&#39;v.to.rast&#39;, input=&#39;impervh_clean&#39;,<br>
&gt; output=&#39;impervh_clean1&#39;,use=&#39;<wbr>attr&#39;,attribute_column=&#39;value&#39;<wbr>)<br>
 &gt;<br>
&gt; Any suggestion to establish db connection for vector map \
&quot;impervh_clean&quot;?<br> <br>
</span>That&#39;s hard to say from this, check whether the v.extract gives any<br>
warning and if it extracts any features.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Alassane<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Oct 18, 2016 at 11:29 PM, Anna Petrášová &lt;<a \
href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>&gt;<br> &gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Oct 18, 2016 at 11:21 PM, alassane toure &lt;<a \
href="mailto:atourej@gmail.com">atourej@gmail.com</a>&gt;<br> &gt;&gt; wrote:<br>
&gt;&gt; &gt; Anna,<br>
&gt;&gt; &gt; is that the command needed to make the connection? ...<br>
&gt;&gt;<br>
&gt;&gt; No, it just shows you the current connection, I was just trying to<br>
&gt;&gt; analyze the problem.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; db.connect driver=sqlite<br>
&gt;&gt; &gt; database=&#39;$GISDBASE/$LOCATION_<wbr>NAME/$MAPSET/sqlite/sqlite.db&#39;<br>
 &gt;&gt; &gt; db.tables -p<br>
&gt;&gt; &gt; v.db.connect map=vectormap table=table driver=sqlite \<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; database=&#39;$GISDBASE/$LOCATION_<wbr>NAME/$MAPSET/sqlite/sqlite.db&#39;<br>
 &gt;&gt; &gt; v.db.connect -p map=vectormap<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Alassane<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Tue, Oct 18, 2016 at 9:46 PM, Anna Petrášová &lt;<a \
href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>&gt;<br> &gt;&gt; &gt; \
wrote:<br> &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Tue, Oct 18, 2016 at 9:31 PM, alassane toure &lt;<a \
href="mailto:atourej@gmail.com">atourej@gmail.com</a>&gt;<br> &gt;&gt; &gt;&gt; \
wrote:<br> &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Group,<br>
&gt;&gt; &gt;&gt;&gt; While executing v.to.rast the following error came up (not \
present in<br> &gt;&gt; &gt;&gt;&gt; earlier 7.0 version)<br>
&gt;&gt; &gt;&gt;&gt; Your suggestion is appreciated.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Check your database connection for the input vector, it says:<br>
&gt;&gt; &gt;&gt;   &quot;Database connection not defined for layer \
&lt;1&gt;&quot;<br> &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; using v.db.connect -p vector_name<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Anna<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Thanks<br>
&gt;&gt; &gt;&gt;&gt; Alassane<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt;&gt;&gt; grass-user mailing list<br>
&gt;&gt; &gt;&gt;&gt; <a \
href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br> &gt;&gt; \
&gt;&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" \
rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
 &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>


[Attachment #6 (text/plain)]

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic