I have a .gdb file with >17,000 features. Simplified example of attributes table:
ID NAME DATE ETC
0001 london 2012 12
0002 london 2012 23
0003 thame 2012 45
0004 thame 2012 56
0005 kent 2012 67
0006 london 2011 78
...
I have an Excel file with a list of ~250 names:
NAME
kent
essex
sussex
london
...
I want to extract only the features with attributes that match the names in the Excel file and save them as shapefiles. Multiple features share the same attributes. How to do this using FOSS? I think there is a function in ArcGIS called FeatureClassToShapefile that does this.
I found this code to run GDAL directly from the terminal to convert the .gdb to a shapefile:
ogr2ogr -f "ESRI Shapefile" /test/extraction /test/test.gdb
I can select a subset of layers by appending these to the above code:
ogr2ogr -f "ESRI Shapefile" /test/extraction /test/test.gdb example_layer
If I try to use the same formatting to select a subset of features I get the error:
FAILURE: Couldn't fetch requested layer 'example_feature'!
Is this possible using this method? I've looked at the GDAL documentation here but couldn't find an answer.
I'm open to other solutions, using GDAL, R pr QGIS preferably.