if there is a field that is common in both the text file and the shapefile you could dump the shapefile into postgis, put the text file with the tenement names in as another table and create a view using SQL that joins / selects according to the 2nd table with the tenement names. It sounds more difficult than it is. I've vague recollections of doing something like this a while back.
Or... a clunky hacky way to do it might be to create another column in the shapefile and populate each line in the column with the list of tenements you want, then select where column A contains/is in column B. I'm not quite sure how well this would work or how easy it is to populate a column. I've been playing around with petroleum exploration permits in Oz. Creating queries based on company name or some other criteria is handy at times. On Fri, Mar 25, 2011 at 4:04 PM, Ramon Andinach <[email protected]> wrote: > Hello, > > I'm wondering if someone could point me in the right direction for a solution > to this situation. > > I have a shapefile with a large number of polygons (in this case mining > leases). > I have a text file that contains a list of tenements of interest. > I'd like to end up with a second shape file that only has the polygons shown > in that text file. > > I could do it by setting up a series of filters in the General tab, but after > about the 20th TenementID = "fish" AND "TenementID = "finger" it gets a > little tedious. > The tenements are not adjacent to each other so I can't really go through and > do an area search. > > I have tried pulling the text file in (via delimited text) and joining the > shapefile to it, but had errors with saving (I think because it thought it > had polygons that it was trying to put in a point file.) > I was not able to try it the other way around (join text to shape). > > Does anyone have any thoughts? > -ramon. > > _______________________________________________ > Qgis-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-user > _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
