[Qgis-user] How to outline regions consisting of multiple fields

Jeroen Hovens mail at groenebij.nl
Tue Sep 12 14:56:22 PDT 2017


Hi,
Thank you for the ideas.
I have no experience with sql, so the virtual layer option is to difficult for me right now.

I did use the Dissolve option to create a new region shapefile. To get a good visual of the region outline (thick line) and at the same time see all municipalities colored according the value of a specific attribute I did the following:
The region layer uses a single symbol style with transparent filling and a thick outline;
The original municipality layer uses a rule based style with 'normal' thickness outline;
The region layer had to be the top layer, otherwise not all region outlines were visible.

So that issue is solved.

This however gives me another issue when using the qgis2web plugin to export a webmap.
I want to show the information from the municipality layer using the 'pop-up on hover' functionality. That functionality however only shows the information of the top layer.

A workaround for this is to use the 'add layer list' functionality in qgis2web which produces a menu to toggle on and off layers. When I toggle off the region layer, the pop up will show the information form the municipality layer on mouse-over, but I lose the region outlines at the same time. I can keep switching between toggle on and off and moving the mouse back to the specific municipality to see information, but it is not very convenient and also needs some explaining for visitors of the webmap ("If you want to see the information for a specific municipality, first toggle off the region layer")

Any ideas for a better workaround?


Regards,
Jeroen Hovens



-----Oorspronkelijk bericht-----
Van: DelazJ [mailto:delazj at gmail.com] 
Verzonden: dinsdag 12 september 2017 10:06
Aan: Matt Boyd <mattslists at gmail.com>
CC: Jeroen Hovens <mail at groenebij.nl>; qgis-user <Qgis-user at lists.osgeo.org>
Onderwerp: Re: [Qgis-user] How to outline regions consisting of multiple fields

Hi,

2017-09-12 8:19 GMT+02:00 Matt Boyd <mattslists at gmail.com>:

> I don't think there is a way to just select the outline / extent of 
> the regions from the municipalities and display that but still keep 
> the municipalities separate. There may be something with a virtual 
> view if you loaded it into a GIS database but I'm just guessing now.
>
No need to have data in a GIS database for that. QGIS provides the virtual layer format [0] which you can use to create the merged features (if you don't want to store such a layer in your folders).

I don't know whether it's possible but wonder if the geometry generator symbol can be used to aggregate features on the fly. Never try!

Another hack could be to use the "Inverted Polygon" symbology (with only the outlining as style) and checking the "Merge polygons before rendering (slow)" option.


[0] http://docs.qgis.org/2.18/en/docs/user_manual/managing_data_source/create_layers.html#vector-virtual-layers

H.
>
> Matt
>
> On Mon, Sep 11, 2017 at 10:04 AM, Jeroen Hovens <mail at groenebij.nl> wrote:
>>
>> Hi all,
>>
>>
>>
>> I am trying to create a map with different visualizations for 
>> different attributes.
>>
>> The map is a basic municipalities map and has at least two other 
>> attributes that I want to show.
>>
>> Each municipality (each field/polygon) belongs to a region (attribute 
>> A) and each municipality has a feature of some sort (attribute B).
>>
>> Now I am trying to create a map that will show the borders of the 
>> municipalities (the basic polygons in simple thin outline), the outer 
>> borders of the region (only a thick outline) and for each 
>> municipality a color representing the value of the ‘feature’.
>>
>>
>>
>> My question is: how do I create only a thick outline of the outer 
>> border for each region on my basic municipality map?
>>
>> I can give each region a color (style rule > categorize), but I don’t 
>> know how to create an outline of the region border. Anything I try 
>> with lines affects every single polygon instead of just the outer border of the region.
>>
>> Is it possible without creating a new layer with the regions as polygons?
>>
>> Since I will color each municipality according to ‘attribute B’, I 
>> want just the outer border for each region to be visible to visually 
>> indicate to which region the municipality belongs.
>>
>>
>>
>> Any idea’s?
>>
>>
>>
>> Regards,
>>
>> Jeroen Hovens
>>
>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user




More information about the Qgis-user mailing list