New answers tagged

1 vote

Extract specific information from a shapefile

I assume that when you say you have "72 pipes that have unique ID's", the remaining 3000+ pipes share an ID with one or more of the other pipes? I created a dummy layer with 15 features, 3 (...
Tom Brennan's user avatar
  • 4,652
3 votes

Extract specific information from a shapefile

Your question is slightly vague, but I assume you mean that you have a list of pipe IDs and want to extract those pipes from a large dataset of pipes with IDs. If so: Joining method Put the list of ...
wildkoala's user avatar
1 vote

Saving selection as new layer after using array for filter expression in PyQGIS

Extending great answers from @Matt, @OP himself, and also solutions mentioned in these threads: Creating temporary layer out of selection in QGIS and Duplicating layer in memory using PyQGIS. I would ...
Taras's user avatar
  • 32.8k
2 votes

Saving selection as new layer after using array for filter expression in PyQGIS

You can simplify your solution by doing away with the loop altogether. layer = iface.activeLayer() array = [35007, 93013] # check ZIP_CODE against multiple values by using the `in` operator # an `f ...
Matt's user avatar
  • 16.3k
3 votes

Saving selection as new layer after using array for filter expression in PyQGIS

I figured most of it out by changing the for loop to collect those selected features and save it to an in-memory layer as below: for i in array: expression = ('ZIP_CODE = ' + str(i)) selection ...
Simon Palmer's user avatar
5 votes
Accepted

Select features by joining table in QGIS

You can use an expression. I have a point layer called random with the field FIELD_1. I have dragged and dropped an excel table called abcd with a field named Field1. I want to select all points whose ...
BERA's user avatar
  • 71.5k
1 vote

Select features by joining table in QGIS

It is a one line command with ogrinfo or ogr2ogr. Take a shapefile that has an id field "shp_id" Then take an Excel table that has on id field "excel_id" Excel_ids 10, 11, and 12 ...
user30184's user avatar
  • 64.7k

Top 50 recent answers are included