Geographic Information Systems Asked on January 16, 2021
My data consists of a point layer (iceberg positions containing their acquisition date as attributes) and a polygon layer (areal extends of DEMs also containing the acquisition date).
My aim is to select/extract the features based on their same location (the iceberg positions overlapping with the DEM extends) AND under the condition that they possess the same acquisition date.
Unfortunately I couldn’t figure out how I can solve this problem.
What I tried is:
You can use a virtual layer to join the layers. You can then save as
the output if you want to persist the data.
Go to the menu Layer > Add Layer > Add/Edit Virtual Layer...
and enter the following query. Replace the layer name for yours
select pt.*, poly.ID
from mypointlayer pt
join mypolygonlayer poly
on st_intersects(pt.geometry, poly.geometry)
AND pt.acquisition_date = poly.acquisition_date
Answered by JGH on January 16, 2021
You can achieve your request using the tool Select feature by expression available in the selection Toolbar.
Here, having the point layer active in the TOC, you can use this expression
contains(
aggregate(
layer:='polygon',
aggregate:='collect',
expression:=$geometry,
filter:="date" = '2020-09-06'
)
,$geometry)
This will select all the points that are inside the polygons that respect the filter rule: in this case only the polygons that have a specific data as attribute.
Having all the requested point selected you can now create a new layer exporting only the selected features.
Answered by Val P on January 16, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP