I have a very large GDB file with about 5000 polygon features, several GB in size, that takes a very long time to load into memory. I want to reduce the number of polygons to something I can work with more easily. The polygons have an attribute
SCINAME and I have a .csv file with a list of a few hundred
SCINAMEs. How can I construct a call to
ogr2ogr to create a new .shp file that is a subset of the original GDB only including the polygons that have a
SCINAME found in my .csv file? Or is there a better command-line way to do it?
Edit: I made a shell script with a while loop to do this, but it is running extremely slowly. Please take a look and see why it might be so slow.
while read line; do echo $line ogr2ogr -append -where SCINAME="'$line'" -f "ESRI Shapefile" ./output input.gdb/ "Feature_class_name" done < scinames.txt