Import/Export Attribute Set
Possibility to import/export an attribute set together with it’s values has been requested by number of users and now it’s possible with MapIt 3.2.2.
JSON structure has been chosen as the exchange format as in fact it’s a simple text file and can be edited using any text editor, however it’s allowing to keep things organised and well structured.
If you are unfamiliar with the JSON format, you can export existing attribute set to see how it looks like.
Below you can see basic Attribute Set JSON file ready to import by MapIt app:
Sample JSON file structure:
{ "name": "Imported Attribute Set 1", "description": "This attribute set is imported from file...", "fields": [ { "name": "Height", "order": 0, "required": 0, "multiselect": 0, "multiselectFirstSelected": 0, "lastAddedAsDefault": 0, "defaultValue": "10-15", "values": [ "0-5", "5-10", "10-15", ">20" ] }, { "name": "Type", "order": 1, "values": [ "1", "2", "3", "4" ] }, { "name": "High Risk", "order": 2, "fieldType": "boolean", "required": 1, "defaultValue": "Yes" }, { "name": "Need action", "order": 3, "fieldType": "boolean", "defaultValue": "No" }, { "name": "Note", "order": 4, "fieldType": "text", "isTextBox": "yes", "defaultValue": "Good quality" }, { "name": "Estimated Cost", "order": 5, "fieldType": "number", "required": 1, "isTextBox": "yes", "defaultValue": "250" }, { "name": "Colors", "order": 10, "required": 1, "multiselect": 1, "multiselectFirstSelected": 1, "values": [ "white", "black", "red" ] } ] }
Before you import the data into MapIt, it’s recommended to check the file structure using online JSON validator:
You can also analyse your Attribute set using the JSON renderer e.g. http://jsonviewer.stack.hu :
- To import Attribute Set just copy and paste your ready JSON files into your device memory MapIt->Import->Attributes Folder:
2. When you place your files in the proper folder please go to ‘Attributes Management’ and press the button ‘Import’ as shown on the picture below:
3. Select the file from the list of available json files and press ‘Import’ button in the bottom-right corner.
4. When the import is successful the new Attribute Set will be added to your collection and it can be used for new layers.
Great addition!
Great improvement!!
Every day is better than the day before with this awesome app….
I using a lot the import tool, specially with kml, I dont have problems with polygons, but when I want to import lines have problems. commonly I create or I have lines or tracks lines in google Earth (KML) and when I try to import to Map it just a part of these lines are imported, per example I have a Kml with 50 lines and just 2 lines were imported without problems….What is the problem?, how I can fix it?…is a bug?
Export Problems.
until now Im using the NAD83 UTM, when I export to CVS the UTM coordinates are in the same column of the spreedsheet, and is very complicated separate it in individual columns to be worked as a spreedsheet. What is the problem?, how I can fix it?…is a bug?……with the lat long coordinates dont have problems, are perfect, but the UTM are more used and could be good idea fix this issue in the CVS export to be easy the manipulation of the data in excel or any GIS software….
Hi Steve, After ‘New Year’ I will provide an option to split UTM coordinates into separate columns during the export.
Awesome!!!, …….and what about with the import issue of line in kml that I was explaining in the previous comment?……cheers
Hi Steve, I am sorry I have missed that. Can you please email me directly at mapitgis@gmail.com. I would appreciate if you can share your data or even subtract of the line data (kml format) you have problems with and I will be happy to investigate it.
Regards,
Andrzej
The sample attribute set json file above is no more working. The variable “order” is missing. After adding “order” per field I were able to import the file. Order is used to define the sequence of the fields.
Thanks Inge for spotting it, I will update the article.
Hi Andrzej,
thanks for fast response on my “order” comment. MapIt is really great and easy to use.
I have another question. Is it poossible to set the encoding for a to be imported attribute set json file?
I would like to import values with German “Umlaute” like “ü” in Inge Bücker. When I import it now an unknown character is shown instead the “ü”. If I edit the attribute set directly on my mobile an “ü” is working.
Thanks, Inge
Hi Inge, I have tested the Attributes Import from json file containing German special characters, as long as you encode your file in UTF-8 all the values are being imported properly.
If you are editing the file using e.g. Notepad++ there is a tab Encoding. Please use it to encode your file properly before importing into MapIt.
Hi Andrzej,
super, your recommendation solved the encoding issue. When I save my attributes set file with UTF-8 encoding all „Umlaute“ are shown fine in MapIt after import. Many thanks!
Inge
Is audio recording likely to be included?
Congratulation!
But I wish the software will allow very soon mock locations from an external USB gps antenna.