This tutorial will explore how to create an attribute schema, the 4 different types of attributes, how to import and export a schema, and how to edit a schema.
Creating an Attribute Schema
1. Open Toronto, ON Parks & Trails (West)
2. Tap on the Map Layers icon in the toolbar
3. Tap on the + and select Create Layer. Name the new layer Gas Stations then tap OK.
4. Tap on the three dots next to Gas Stations and select Edit.
5. Make the new layer the current layer by toggling Set as Active Layer.
6. Under Attribute Schema add the following new attributes using the Add a New Attribute button:
8. Add an attribute for the name of the gas station.
- Attribute name: Name
- Type: String
- Allows alpha-numeric and special characters
9. Add an attribute to show whether or not the gas station offers diesel
- Attribute name: Diesel
- Type: Boolean
- Yes/No or True/False
10. Add an attribute for the current price of gas at the gas station
- Attribute name: Price
- Type: Real
- Allows any numerical value including decimals
11. Add an attribute for how many pumps the gas station has
- Attribute name: Pumps
- Type: Integer
- Allows only whole numerical values (no decimals)
12. Add an attribute for the type of loyalty card the gas stations accepts, if any
- Attribute name: Loyalty
- Type: String
- Create a picklist for this attribute with the following values
- Air Miles
- PC Optimum
- None
Exporting an Attribute Schema
1. Open Toronto, ON Parks & Trails (West)
2. Tap the Map Layers icon in the toolbar to access the Map Layers page
3. Tap on the three dots next to the Gas Station layer and choose Export Layers
4. Choose an appropriate name for the file.
5. Keep the Format as KML.
6. Change Data to Schema Only
7. Tap the Export button and save the file to your preferred location (e.g. Device Storage, email, cloud storage, etc)
Importing an Attribute Schema
1. Open Toronto, ON Parks & Trails (West).
2. Open your Map Layers from the toolbar.
3. Tap on the '+' and select Import.
4. On the import page tap on Set up and ensure that Schema Only is toggled.
5. Tap on Back and select From Storage Location, select the file that corresponds with where your KML file was saved.
6. Your layer should be imported containing the attribute fields you created in the previous steps.
7. You can delete your duplicated layer by tapping on the three dots > Edit > Delete.
Please note: Upon importing an attribute schema, the resulting feature layer may be nested within the parent layer in your map's Layers list. To ensure the layer is ready for data collection, you must tap on the imported layer, then select the nested feature layer within to either set it as active or move it back to the root level. Always confirm the desired feature layer is active before attempting to collect data.
Using an Attribute Schema
1. Open Toronto, ON Parks & Trails (West)
2. Tap the Map Features button in the toolbar to access the Map Layers page
3. Ensure the Gas Stations layer is set as the active layer.
4. Return to the map view.
5. Tap the Add Placemark button.
6. Change the name of the Placemark to Shell.
7. Before confirming the addition of the feature, scroll down to Attribute Schema.
8. Enter the following attribute values (if necessary, tap the back arrow to return to the Add Placemark screen from the Edit Attribute Value screen):
- Name: Shell
- Diesel: Yes
- Price: 132.37
- Pumps: 8
- Membership: choose PC Optimum from the Value list
9. Gas prices can be displayed in different units of measurement so we would like to edit the name of this attribute:
- In the Attribute Schema tap on the Price attribute to edit it
- Change the name of the attribute to Price (cents/liter)
- Tap the back button to save the change and return to the Attribute Schema list. Notice that the value of “132.37” remains intact.
- Repeat steps a and b
- Change the Attribute Type to Integer
- Tap the back button twice to save the change and return to the Attribute Schema List. Notice that the value of the attribute has been erased due to the type change.
- Change the Attribute Type back to Real and re-enter 132.37 as its value in the placemark.
10. Tap the checkmark to confirm the placemark addition
Comments
0 comments
Please sign in to leave a comment.