[GRASS-user] map display query and layers
Dave Roberts
droberts at montana.edu
Sat Oct 1 15:43:39 PDT 2016
Hi Vincent,
I have studied the GRASS_GIS_vector_management_model page (and all
the discussion leading up to that), and I think I understand the data
model. What I don't understand is how the map display interacts with
the data tables. So in my example case, yes, there are two tables, both
with key=cat, but that's pretty typical for data imported into GRASS
with v.in.ogr or v.in.e00. I have another case where I imported an ESRI
GDB, and GRASS created 25 layers all with key=cat. When I do
d.vect bryceveg
it seems to draw correctly, but when I use the map query icon and mouse
click it gives me results for layers 22, 23, 25, and 26 (which is not
connected to a table). Even if I specify
d.vect bryceveg layer=1
when I query I still get 22, 23, 25, and 26, none of which I want.
So undoubtedly it's possible (with significant effort) to convert
this to 25 different vector features each with only one table, but that
seems like a lot of work, and I would expect when I specify the layer to
draw that's the layer that gets queried. If I have time, I'll dig into
the code (hopefully python) driving the map query.
Thanks, Dave
On 10/01/16 01:04, Vincent Bain wrote:
> Hello Dave,
>
> am I wrong or is your map connected to two distinct tables with the same
> key (cat) ? then the behavior you describe may be related to a confusion
> on the type of features holding 'cat' values. For exemple in the case of
> a polygon map, you need to define which type of object handles cats
> (i.e. boundaries or centroids).
> Just to check, you can have a look at this wiki entry :
> https://grasswiki.osgeo.org/wiki/Vector_Database_Management#GRASS_GIS_vector_management_model
>
> Best,
> Vincent.
>
> Le vendredi 30 septembre 2016 à 15:47 -0600, Dave Roberts a écrit :
>> d.vect has an option for layer= but I don't get any consistent effect
>> from the query tool in the map display. For example
>>
>> GRASS GIS 7.0.4 > v.db.connect -p fuel
>> Vector map <fuel> is connected by:
>> layer <1/LAB> table <fuel_1> in database
>> </home/dvrbts/grass/bryce/PERMANENT/sqlite/sqlite.db> through driver
>> <sqlite> with key <cat>
>> layer <2/ARC> table <fuel_2> in database
>> </home/dvrbts/grass/bryce/PERMANENT/sqlite/sqlite.db> through driver
>> <sqlite> with key <cat>
>>
>> says there two layers to this feature connected to a sqlite database.
>> I'm interested in the data in layer=2, so
>>
>> d.vect fuel layer=2
>>
>> draws the map correctly, but when I click on polygons I get results from
>> layer 1, not 2. And sometimes for other maps I get multiple layer
>> results, but often not the one I want. It may depend on exactly where I
>> click (e.g. nearest a centroid (often invisible) vs a boundary) but it
>> seems more random to me.
>>
>> GRASS 7.0.4
>>
>> Linux 4.6.2-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux
>>
>> Thanks, Dave
>> _______________________________________________
>> 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