2

I try to import a dwg file (using Projekt > DWG/DXF-Import) into QGIS (2.18.3 32Bit on Windows) which works quit nice.

Since I try to use the fid, I found that the numbers are not the same in QGIS as the one in AutoCAD MAP. different fid numbers for the same object Is there a way to get the proper numbers directly in QGIS?

1 Answer 1

2

Using FID field for managing your data is not proper since this column is filled in automatically by application. You can't delete or change that field, at least in most applications you shouldn't be able to.

Best way to handle your data would be to create new column with unique integer number, distinct for every feature. In AutoCAD you can copy it's original FID content to your new column. This way you will have ID property independent of application you are running.

4
  • Thank you for your input. The example used was created using Topobase2 (The FID links to a Oracle DB). Based upon your tip, I tried to output with "tbwriteobjectdata" which adds the oracle-data to the dwg. The above mentioned QGIS import-procedure does not show the additional, imported oracle attributes. Do I miss something?
    – adrian
    Commented Feb 13, 2017 at 12:37
  • @adrian Can you create for your data a new column in AutoCAD? About missing oracle-data in your dwg I can't help you without more info and some testing.. Can you please provide more details on steps you take to add that data to dwg and import it to QGIS?
    – deevee
    Commented Feb 13, 2017 at 20:16
  • Thanks again. Unfortunately I do not know how to add a new column and copy for example the fid in this new column. The way I tried to import in QGIS was just straight forward: Projekt > DWG/DXF Import which creates a gpkg file.
    – adrian
    Commented Feb 20, 2017 at 12:53
  • Ok if you don't know how to create new attribute field maybe you can use some other unique field in your layer? In example Objektkennung, doesn't that stand for Object ID? Key is to find and use other unique field, different from FID.
    – deevee
    Commented Feb 21, 2017 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.