1

I am trying to create a point layer based on values from a field in a joined table. I have an Excel table (shown below) that contain individual rows of information but no x,y information, only the district in which they lie. The "Deer Elk Hunting District" is the join field in this table. Example - Is it possible to create a layer with a point for each instance of 100,101, 103, 104, etc. Some districts would have 1 point but others may have multiples.

Ultimately I am mapping the district in which each animal was trapped or shot and will be updating or creating new point layers each week, hence, not wanting to manually create the points each week.

enter image description here

1
  • I have joined the table to the District polygon layer. Now I wish to create a point for each instance in the table above. For example my new point layer would have 4 points that would fall in district 100 and 13 points for district 103. I could then have a map displaying those points and district plygons.
    – Lon
    Jan 15 at 19:52

3 Answers 3

3

one possibility: you can use a random marker fill for your joined layer, which is a polygon layer I suppose. For the point count value you can use the data defined override with the following expression:

count( "district", group_by:="district")

you have to change the fieldname "district" to your fieldname. Be aware, that one point is not linked to one feature, it is only a symbol representation of the feature count per district.

enter image description here

1

I would suggest using the Geometry by expression tool to create a new point layer that snaps all rows within a district to the centroid of the district (or point on surface for complex polygons where the centroid may lay outside).

Once this is done, you can use the Point displacement symbology type which groups together nearby points (in this case all at the same location) and displays them in a configurable layout.

enter image description here

Shown here is the grid type layout, but there are various options to configure the position and style of the points.

Geometry by expression

To be applied on your joined polygon layer. Don't forget to change the output geometry type to Point.

centroid($geometry)

or

point_on_surface($geometry)

enter image description here

Symbology

enter image description here

1

Create a virtual layer because this is dynamic and changes when the input layer is changed.

Use this query to create as many points in each polygon as there are defined in your table and use the layer- and field names you use (I have polygon, DATA, district and DISTRICT):

select centroid (polygon.geometry) from polygon, DATA
where DATA.DISTRICT = polygon.district

Then set layer's rendering style to Point Displacement to see a point for each feature:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.