more plotting errors

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

more plotting errors

Tyler Smith-2
Hi again,

Having solved my GUI/Python issues from yesterday, I'm now getting
different errors when querying vector maps in the wx0 display:

Steps to reproduce:

GRASS 7.2.0 installed from Debian repository, using
GRASS_PYTHON=python2.7 (which is also installed from Debian)

grass -text
d.mon start=wx0
d.vect map=myVectorMap

<select the "Query vector maps" icon>
<click on a line vector>
<fail!>

GRASS 7.2.0 (blandings):~ > Traceback (most recent call last):
  File "/usr/lib/grass72/gui/wxpython/mapwin/buffered.py", line 1372, in
  MouseActions
    self.OnLeftUp(event)
  File "/usr/lib/grass72/gui/wxpython/mapwin/buffered.py", line 1553, in
  OnLeftUp
    y=self.mouse['end'][1])
  File "/usr/lib/grass72/etc/python/grass/pydispatch/signal.py", line
  229, in emit
    dispatcher.send(signal=self, *args, **kwargs)
  File "/usr/lib/grass72/etc/python/grass/pydispatch/dispatcher.py",
  line 349, in send
    **named
  File "/usr/lib/grass72/etc/python/grass/pydispatch/robustapply.py",
  line 60, in robustApply
    return receiver(*arguments, **named)
  File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 915, in
  Query
    self.QueryMap(east, north, qdist, rast, vect)
  File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 971, in
  QueryMap
    self._queryHighlight(vectQuery)
  File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 1008, in
  _queryHighlight
    tmp.append(i['Category'])
KeyError: 'Category'

I would appreciate any suggestions on how to debug/fix this!

Thanks,

Tyler

--
plantarum.ca
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Anna Petrášová
On Wed, May 3, 2017 at 11:30 AM, Tyler Smith <[hidden email]> wrote:

> Hi again,
>
> Having solved my GUI/Python issues from yesterday, I'm now getting
> different errors when querying vector maps in the wx0 display:
>
> Steps to reproduce:
>
> GRASS 7.2.0 installed from Debian repository, using
> GRASS_PYTHON=python2.7 (which is also installed from Debian)
>
> grass -text
> d.mon start=wx0
> d.vect map=myVectorMap
>
> <select the "Query vector maps" icon>
> <click on a line vector>
> <fail!>
>
> GRASS 7.2.0 (blandings):~ > Traceback (most recent call last):
>   File "/usr/lib/grass72/gui/wxpython/mapwin/buffered.py", line 1372, in
>   MouseActions
>     self.OnLeftUp(event)
>   File "/usr/lib/grass72/gui/wxpython/mapwin/buffered.py", line 1553, in
>   OnLeftUp
>     y=self.mouse['end'][1])
>   File "/usr/lib/grass72/etc/python/grass/pydispatch/signal.py", line
>   229, in emit
>     dispatcher.send(signal=self, *args, **kwargs)
>   File "/usr/lib/grass72/etc/python/grass/pydispatch/dispatcher.py",
>   line 349, in send
>     **named
>   File "/usr/lib/grass72/etc/python/grass/pydispatch/robustapply.py",
>   line 60, in robustApply
>     return receiver(*arguments, **named)
>   File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 915, in
>   Query
>     self.QueryMap(east, north, qdist, rast, vect)
>   File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 971, in
>   QueryMap
>     self._queryHighlight(vectQuery)
>   File "/usr/lib/grass72/gui/wxpython/mapdisp/frame.py", line 1008, in
>   _queryHighlight
>     tmp.append(i['Category'])
> KeyError: 'Category'

I would guess it's something specific in your data. Could you post
v.what output (json output) for that feature?

Anna

>
> I would appreciate any suggestions on how to debug/fix this!
>
> Thanks,
>
> Tyler
>
> --
> plantarum.ca
> _______________________________________________
> grass-user mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Tyler Smith-2
On Wed, May 3, 2017, at 12:32 PM, Anna Petrášová wrote:

> On Wed, May 3, 2017 at 11:30 AM, Tyler Smith <[hidden email]> wrote:
> > Hi again,
> >
> > Having solved my GUI/Python issues from yesterday, I'm now getting
> > different errors when querying vector maps in the wx0 display:
> >
> > Steps to reproduce:
> >
> > GRASS 7.2.0 installed from Debian repository, using
> > GRASS_PYTHON=python2.7 (which is also installed from Debian)
> >
> > grass -text
> > d.mon start=wx0
> > d.vect map=myVectorMap
> >
> > <select the "Query vector maps" icon>
> > <click on a line vector>
> > <fail!>
> >
> I would guess it's something specific in your data. Could you post
> v.what output (json output) for that feature?
>

Thank you for your help. I've been away from the office,  just getting
back to this. Here's the json output for a polygon that generates the
same error reported before:

blandings:PERM> v.what -j map=Obs_20170329@PERMANENT
coordinates=1548324.30568,12154706.4547
{"Coordinates": {"East": "1548324.30568", "North": "12154706.4547"},
"Maps":
[{"Map": "Obs_20170329",
"Mapset": "PERMANENT",
"Type": "Area",
"Area_height": 0.000000,
"Sq_Meters": 3086589.260,
"Hectares": 308.659,
"Acres": 762.713,
"Sq_Miles": 1.1917,
"Categories": [
{"Layer": 1, "Category": 2744},
{"Layer": 1, "Category": 13236},
{"Layer": 2, "Category": 2}]}]}

I don't understand that, but is it suspicious to see two different
categories in the same layer?

Best,

Tyler
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Anna Petrášová
On Wed, May 17, 2017 at 3:56 PM, Tyler Smith <[hidden email]> wrote:

> On Wed, May 3, 2017, at 12:32 PM, Anna Petrášová wrote:
>> On Wed, May 3, 2017 at 11:30 AM, Tyler Smith <[hidden email]> wrote:
>> > Hi again,
>> >
>> > Having solved my GUI/Python issues from yesterday, I'm now getting
>> > different errors when querying vector maps in the wx0 display:
>> >
>> > Steps to reproduce:
>> >
>> > GRASS 7.2.0 installed from Debian repository, using
>> > GRASS_PYTHON=python2.7 (which is also installed from Debian)
>> >
>> > grass -text
>> > d.mon start=wx0
>> > d.vect map=myVectorMap
>> >
>> > <select the "Query vector maps" icon>
>> > <click on a line vector>
>> > <fail!>
>> >
>> I would guess it's something specific in your data. Could you post
>> v.what output (json output) for that feature?
>>
>
> Thank you for your help. I've been away from the office,  just getting
> back to this. Here's the json output for a polygon that generates the
> same error reported before:
>
> blandings:PERM> v.what -j map=Obs_20170329@PERMANENT
> coordinates=1548324.30568,12154706.4547
> {"Coordinates": {"East": "1548324.30568", "North": "12154706.4547"},
> "Maps":
> [{"Map": "Obs_20170329",
> "Mapset": "PERMANENT",
> "Type": "Area",
> "Area_height": 0.000000,
> "Sq_Meters": 3086589.260,
> "Hectares": 308.659,
> "Acres": 762.713,
> "Sq_Miles": 1.1917,
> "Categories": [
> {"Layer": 1, "Category": 2744},
> {"Layer": 1, "Category": 13236},
> {"Layer": 2, "Category": 2}]}]}
>
> I don't understand that, but is it suspicious to see two different
> categories in the same layer?
>

Are you sure this is the feature causing the error? This seems to be
ok. Can you also post the output of
grass.vector_what(map='Obs_20170329@PERMANENT',
coord=(1548324.30568,12154706.4547),  distance=100)

?

Thank you

> Best,
>
> Tyler
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Tyler Smith-2
On Thu, May 18, 2017, at 12:28 AM, Anna Petrášová wrote:
>
> Are you sure this is the feature causing the error? This seems to be
> ok. Can you also post the output of
> grass.vector_what(map='Obs_20170329@PERMANENT',
> coord=(1548324.30568,12154706.4547),  distance=100)
>

I'm not actually sure which feature caused the problem, now that you
mention it. I tried again with just that map:

    [start grass]
    d.mon start=wx0

    d.vect map=Obs_20170329@PERMANENT

And it seems to work fine.

So I added the other layers one at a time to figure out which was the
problem:

d.vect map=counties@PERMANENT type=boundary
d.vect map=usa type=boundary

And now I find the problem is actually the usa map. This is an outline
of the USA. So I retried the commands from before using this map:

v.what -j map=usa coordinates=1698426.136563,12132061.925937
{"Coordinates": {"East": "1698426.136563", "North": "12132061.925937"},
"Maps":
[{"Map": "usa",
"Mapset": "PERMANENT"}
]}

That sort of makes sense, as the coordinates are outside of the
boundaries of the usa. But in that case v.what.vect should just return
'nothing found'? Does the output indicate something wrong with this map?

Thanks again,

Tyler
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Anna Petrášová


On May 18, 2017 9:15 AM, "Tyler Smith" <[hidden email]> wrote:
On Thu, May 18, 2017, at 12:28 AM, Anna Petrášová wrote:
>
> Are you sure this is the feature causing the error? This seems to be
> ok. Can you also post the output of
> grass.vector_what(map='Obs_20170329@PERMANENT',
> coord=(1548324.30568,12154706.4547),  distance=100)
>

I'm not actually sure which feature caused the problem, now that you
mention it. I tried again with just that map:

    [start grass]
    d.mon start=wx0

    d.vect map=Obs_20170329@PERMANENT

And it seems to work fine.

So I added the other layers one at a time to figure out which was the
problem:

d.vect map=counties@PERMANENT type=boundary
d.vect map=usa type=boundary

And now I find the problem is actually the usa map. This is an outline
of the USA. So I retried the commands from before using this map:

v.what -j map=usa coordinates=1698426.136563,12132061.925937
{"Coordinates": {"East": "1698426.136563", "North": "12132061.925937"},
"Maps":
[{"Map": "usa",
"Mapset": "PERMANENT"}
]} 

This output seems to be ok, it shouldn't cause any problems. Perhaps you need to send us the link to your data with the exact command to reproduce it.


That sort of makes sense, as the coordinates are outside of the
boundaries of the usa. But in that case v.what.vect should just return
'nothing found'? Does the output indicate something wrong with this map?

Thanks again,

Tyler


_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: more plotting errors

Tyler Smith-2

Anna Petrášová writes:
>
> This output seems to be ok, it shouldn't cause any problems. Perhaps you
> need to send us the link to your data with the exact command to reproduce
> it.
>
>

Thanks again for your time. I'm just returning from the field, and now I
can only reproduce the error with the original map of points.
Unfortunately, I don't have permission to this data, so I won't be able
to post it anywhere. If I can come up with a reproducible example that
uses only a shareable subset of the data, I'll send a link.

Best,

Tyler

--
Tyler Smith
http://plantarum.ca
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user