I have a buildings shapefile layer and every building has a building ID linked to its feature id ($id). Some new buildings have been built and old buildings were demolished. I'd like to not recycle those old ID's, I'd like to sequentially add new numbers to the new buildings, but I would like to delete the geometry of the old buildings.

Is it possible to have a record in my database that does not contain geometry?

Is there a better way to do this?

I mainly use QGIS but I have the basic version of ArcGIS Desktop and ArcGIS Pro at my disposal if needed.

I'm somewhat familiar with PostgreSQL and geodatabases if those are recommended over shapefiles.

  • 1
    I have used PostgreSQL in the past to create tables which only have geometries for items which meet certain conditions. Just perform a new selection into a new table and only copy geom if the conditions are met. It might also be worthwhile creating an extra column for "building exists T/F?" so you could retain all the original info but filter for existing buildings when necessary. retaining all records will ensure no $id recycling. – Marshall Sep 28 '18 at 0:49
  • 2
    Shapefiles FIDs will always compress to 0 based, unique and ascending on save - nothing you can do will change that. If you don't want to recycle FIDs either add your own building ID column or use a storage type other than shapefiles - PostGIS is a good option, not just because of static OIDs but the table has a much larger theoretical maximum number of rows, you can also use personal (limit 2GiB) or file geodatabases; all three of these will not reallocate an OBJECTID or modify their unique ID in any way. – Michael Stimson Sep 28 '18 at 2:50
  • 1
    The ID column of a shapefile does not exist in the dBase file. It is a computed record number. You can preserve shapefile ID values by using a null shape (0 vertices, type 0) for features which no longer exist. You will still need to have a marker or destruction timestamp for attribute searches (since the attribute row will continue to exist), but spatial searches will not find null shapes. All in all, its far better to use something other than shapefile for this purpose. – Vince Sep 28 '18 at 3:18
  • 1
    I would add columns "is_demolished" and "date_demolished". Then filter them out for display, queries, etc.. But the data is still there and will support multiple buildings over time on the same spot(each has their own row). – user1269942 Sep 28 '18 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.