I am starting to learn how to create QGIS database for assignments at work, I know how to create query's that you can "search" the database for, but this not exactly what I want in QGIS.

I want to create shapefiles inside the database with created unique value, so entrys of new objects can be easier. In ArcGIS desktop you had the option to create Domains, so you can setup specific values in Shapefile fields. So when you made the connection to that feature class field, you have those options to select from. For example, the author's are two people so you have two names in a list. Another example is the state of maintenance for a tree. It is that kind of stuff that I want because to make it possible for quick efficient entry's, so that so less much typing is possible. Is this possible or not in QGIS? And you can you "import" an excel table with such values?


You can do this in QGIS at the project file level (.qgs) using a Value Map. To do this follow these steps:

  1. Load the layer into QGIS that you want domain/value map added to
  2. Go to layer>properties>field tab and click on the Text Edit button that you want to add the domain/value map to
  3. Choose Value Map option on the left and manually add description and values or import a .csv of these
  4. Finally, save project file (.qgs) and start edit session on layer

When you fill out the attributes you should have a drop down for the fields which have value maps.

These value maps are only set to the project file (not to database) so you'll have to open it to use.

  • Thank you for the response, I have also discovered that you can link these to the database using a database table, using the value relate command. But you always must add this table with you as a layer, which is real downer, but it works if you get it right. Anyway thanks. – ThunderSpark Mar 20 '17 at 14:50

Your Answer

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

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