I have some shapefiles. Each shapefile contains the data on a topic for a county. I have data for 26 counties.
In the filename of the shapefile, the county ID is given.
I load these shapefiles into PostGIS using FME. The data for all counties is loaded into one table (so 26 shapefiles get loaded into 1 PostGIS table).
This data gets updated every now and then, and I can request the data for the county where the data has been changed. I get supplied with a new shapefile with all data for that county (not just the changed records).
I would like to delete the data in the PostGIS table for the county that I have the new data for before I load the new data.
How do I do this? Is this possible if I get the county ID from the filename of the shapefile and each record in the PostGIS table has a county ID attached to it?
My plan is to just add the new shapefile to a specified folder, and run my FME workspace.
Just to clarify, I have multiple records for each county (i.e. all roads, buildings etc in a county). I basically want to bulk delete a counties data, and replace it with the new data.