Start a new topic
Answered

Import Shapefile Map Value

Hello,


I´ve a shapefile with several fields. Two of those fields as a type of Widget "Value Map", but when i import to my Locus GIS app, the fields lose the Widget and the scroll values that are attached.


Can or how i solvet it?


Thanks,


Alex


Best Answer

Hi Alex,

The functionality you mentioned is enabled by QGIS not by format (I think) but it doesn't matter.

LocusGIS doesn't support any validation of the field value at this moment, but you can use enumeration as you mentioned. There is a workaround how to quickly define multiple enumeration values:

  • create empty layer and define the attributes you can use for mapping. Define enumeration attribute and add at least one value
  • export layer as template
  • template is a XML file that you can edit in any text editor
  • search section for your enumeration attribute and edit the <options> parameter. 
  • the particular values are separated by | "pipe". See the example bellow
    • <options>Beech|Maple|Oak|Spruce</options>
  • Save the template
  • Open LocusGIS and "Create new layer from the template"

Using this workaround you can create the enumeration attribute with multiple values. On the other side I'm not sure if will be usable with thousands of values. 

Petr


Dear Alex,

I'm sorry but SHP format doesn't support (at least as I know) the "value map" field. On the other side there is no way how to import the SHP file and create the "Value map" attribute from imported data at this moment. There is already a feature request that focus on conversion of data types of layer attributes - maybe it could solve this issue.

BTW: what's your use-case, please? What's the source for your SHP file, please?

Thank you

Petr

Petr,


I´m not talking about field type, but Field Widget. In Locus GIS, if you create a layer, is the similar to Enumeration, but the difference is that Enumeration need a Database connetion (PostGIS or similar), and the Value Map Widget you can create a combo box.


My case: I create a shapefile (point) with several fields with the purpose to colect data related to Biodiversity. In two of those fields, i want to the user don´t write the species but instead choose from a combo box the species that he/she see.


I know that in Locus GIS i can create a layer and defined my combo with the Enumeration choice, but there are more than 5000 species to put (imagine the task).


With Qgis, i can create a shapefile and associate a CSV file to create the combo box in a bit, but when i import to Locus it delete my field combo.

Answer

Hi Alex,

The functionality you mentioned is enabled by QGIS not by format (I think) but it doesn't matter.

LocusGIS doesn't support any validation of the field value at this moment, but you can use enumeration as you mentioned. There is a workaround how to quickly define multiple enumeration values:

  • create empty layer and define the attributes you can use for mapping. Define enumeration attribute and add at least one value
  • export layer as template
  • template is a XML file that you can edit in any text editor
  • search section for your enumeration attribute and edit the <options> parameter. 
  • the particular values are separated by | "pipe". See the example bellow
    • <options>Beech|Maple|Oak|Spruce</options>
  • Save the template
  • Open LocusGIS and "Create new layer from the template"

Using this workaround you can create the enumeration attribute with multiple values. On the other side I'm not sure if will be usable with thousands of values. 

Petr

Hello again Petr,


it works! And i made a test with more than a thousand names and works fine!


Thanks a lot!

Hi,

great, I'm glad to hear it.  

BTW: is the enumeration with thousand names usable?

Petr

Yes, is the species that are in our Portuguese catalog.


A question: you can´t with on Field filter the other. Exemple: if the user choose, in the field Name, Bird, the next field, for example, Specie, only apear the Birds species of the thousand inicialy loaded.

I see something like conditional or structured forms. Unfortunately such feature is missing in the app. Would you please create a new feature request (here on the forum) and describe the idea, use-case, etc.

Thanks, Petr

Login or Signup to post a comment