An attribute schema allows users to create a series of attributes for a layer to make data collection more efficient. The schema defines the name, type, and associated properties such as an optional pick list. Attribute schemas can then exported and shared between users to ensure data collection is standardized between users.
Creating an Attribute Schema
There are two ways to create an attribute schema within the app - for an individual feature, or for an entire layer. Creating an attribute schema for an entire layer is often the best method as it ensures that any subsequent data collected on that layer will have access to the same attribute selections. Creating an attribute schema for a layer can be done from within the Map View (Map Features list) or from the Layers tab directly.
To create an Attribute Schema for a layer:
- Long press on the desired layer from the Layers tab, or from the Map Features list (within the Map View)
- Tap the pencil icon (Edit) displayed in the toolbar at the top of the screen. This will open the Edit Layer dialog, which displays all the details for that layer
- Scroll down to the bottom of the Edit Layer dialog and tap on the '+' icon next to 'Attribute Schema'. This will open the Edit Attribute dialog
- Rename the attribute as desired (e.g. Tree Type)
- Set the type of attribute
- String - alphanumeric characters
- Boolean - yes or no values
- Real - numbers that can contain decimal values
- Integer - whole numbers
- If desired, set a picklist value
- Tap the '+' icon next to 'Pick List'
- Type in the appropriate value
- Tap the back arrow to return to the Edit Attribute dialog
- Repeat as required
- Tap the back arrow when the attribute is complete
- Repeat steps 3-7 for each desired attribute
Example of attributes to collect for a tree inventory:
- Tree Type > String > Pick List Values: Oak, Pine, Cedar, Maple
- Cut (Y/N) > Boolean
- Circumference > Real
- Lot number > Integer > Pick List Values: 1, 2, 3, 4, 5
NOTE: While attribute schemas can be created outside of the app in other software, it is currently not recommended, as Avenza Maps requires the schema to be in KML format for importing, and often times problems can arise when creating such files in other software packages. If you wish to create your schema outside of Avenza Maps, the best option available is to use a text editor (e.g. Notepad++) with an existing KML schema created from the app as a template.
Exporting an Attribute Schema
To export an attribute schema to share with other users or for use elsewhere, you will use a similar process to Exporting Map Features:
- Open the map that has the schema you wish to export
- Tap on the Map Features icon (next to the three dots)
- Tap the menu icon (lower right corner)
- Select 'Export Map Features'
- Adjust the settings as desired (NOTE: to re-import into Avenza Maps as a schema, the format must be set as KML)
- Choose 'Export Schema Only' (NOTE: no data will be exported, only the schema information)
Importing an Attribute Schema
To import a custom schema provided to you or that you have created, you will use a similar process to Importing Map Features:
- Open the map that you want the schema on
- Tap on the Map Features icon (next to the three dots) (NOTE: you can also import the schema to the Layers tab and choose not to link it to a map. The remaining steps are the same for both options)
- Tap the menu icon (lower right corner)
- Select 'Import Map Features'
- Select the checkbox for "Import Schema Only" and navigate to the desired file. (NOTE: the schema must be in KML format)
NOTE: Once imported, the schema will be on its own layer and may require additional changes in order to be the active layer for data collection. Please see below on how to use schemas in the app.
Using Attribute Schemas
With an active layer schema, users can begin collecting data using the pre-designed attributes, icons, any other styling settings. To collect data using a schema please follow the steps below:
- Set the schema as the active layer on a map
- Long press on the layer from the Map Features list
- Select the pencil icon (Edit)
- Choose "Set to Current Layer"
- Add a placemark to the map
- Before confirming the addition of the feature (checkmark in the top right corner), scroll down to 'Attributes'
- In the Attributes section, tap the attribute you need to enter data for
- If the attribute has a picklist, choose the appropriate value, or enter a new value
- Tap the back arrow to return to the Add Placemark screen
- Repeat steps 4-6 for each remaining attribute
- Tap the checkmark to confirm the placemark addition
- Repeat for any other features