Reference‎ > ‎

Suggested workflow and best practices

You may find that you need to manage many maps with the same content, either for different  geographic areas and/or for more than one user (device). You may also want to set up symbology and attribute validation rules for a particular map and be able to reuse this definition for similar maps. In such case, first define the map metadata and consider creating a template map.

Defining map metadata

A map has a set of metadata tables (stored in a SQLite database along the map) that lets you define: a) symbology b) list fields and and c) validation rules. The I/O utility provides an interface that makes it easy to work with the metadata, and since the tables are stored as regular SQLite tables, you can also use standard SQL commands and scripts to operate on them.
The metadata is stored in the following tables:
  • pcm_table_metadata (data per individual shapefile/table)
  • pcm_field_metadata (data per individual column for each shapefile/table)
Please refer to Metadata Tables for more details.

a) Defining symbology fields

pcMapper comes with a predefined set of symbols, designed to stand out and display clearly on an image background. You will notice that black symbols have a cyan halo when a background image is enabled. Symbols are defined per individual shapefile but can be changed for features individually when editing the map.
Please contact us for more information on how to create custom symbols and classification.
Figure: Symbols
  1. Connect your device to a PC and navigate to the pcMapper program folder on the sdcard
  2. Start the I/O utility - PcmSQLite.exe
  3. Select the Show tab
  4. Select the Map to change
  5. Expand the <Map>.db list and select the pcm_table_metadata item
  6. Identify the shapefile (_TabName)  to change
  7. Click the corresponding SymId cell, enter a symbol number (0-9) and click OK

Tip: you can also view the contents of your shapefile attributes by selecting it in the tree list. You can increase the number of records shown by changing the default SELECT clause by increasing the value for “LIMIT 20” or removing it.

Notice: changing SymId requires an update of the map. This is performed by syncing the metadata as described below.

b) Defining list and map fields

List fields lets you control which attribute values (columns) to display in the records screen. Map fields display at the bottom of the map screen when a feature is selected. Additionally, the MapField specifies a labeling field for polygons (set to blank if you don’t want any labels).
Figure: Records, Map
  1. see steps 1-6 above
  2. Select the pcm_field_metadata item, identify the fields you want to use [_FieldIndex]
  3. Select the pcm_table_metadata item
  4. Click the corresponding ListRow1, ListRow2 or MapField cell, enter a field index number and click OK
Notice: changing MapField requires an update of the map. This is performed by syncing the metadata:
Syncing map with changes to metadata
  1. Select the Import tab
  2. Select the Map to sync
  3. Click the [..] button next to InFolder and navigate to the original shapefiles folder from where you performed the import (this is unchanged unless you re-started the I/O utility)
  4. Click the [Re-Import Map] button

Tip: you can avoid this step by choosing a Db template (existing map) when creating your map. Please refer to “Working with many maps sharing the same content” below.

c) Defining attribute validation and input rules

Attribute validation rules define the possible input when editing attribute records. For example: setting a default value automatically populates a new record, min/max restricts the allowed range for numbers and so on. Please refer to Metadata Tables for more information.
  1. Connect your device to a PC and navigate to the pcMapper program folder on the sdcard
  2. Start the I/O utility - PcmSQLite.exe
  3. Select the Show tab
  4. Select the Map to change
  5. Expand the <Map>.db list and select the pcm_field_metadata item
  6. Identify the attribute to change (_FkTable and Name)
  7. Click the corresponding cell, enter a value and click OK

Tip: if not all your attributes are listed for the pc_field_metadata table, you can increase the number of records shown by changing the default SELECT clause by increasing the value for “LIMIT 20” or removing it.

Working with many maps sharing the same content

Once you have defined the map metadata (as described above) you can reuse this map as a template for subsequent maps that you create from the same kind of shapefiles.
Notice that these shapefiles must have the exact same name and attribute definitions as for the template, but obviously may cover any geographic area. However, the actual content doesn’t matter, but it is advisable that it is a valid representation of your data so that you can verify the symbology and validation rules.
This would be a typical scenario if you want to extract data from a central “master” database to different maps and/or devices.

Creating a map by using a Db template

By selecting an existing Db template when importing shapefiles, all metadata (including symbology) will be inherited by your new map.
  1. Connect your device to a PC and navigate to the pcMapper program folder on the sdcard
  2. Start the I/O utility - PcmSQLite.exe
  3. Select the Import tab
  4. Enter a name for the map to store the imported shapefiles
  5. Click the [..] button next to InFolder and navigate to the folder containg the shapefiles to import
  6. Click the [..] button next to Db Template file and navigate to the map (<Map> folder inside the pcMapper program folder) you want to use as a template
  7. Select the <Map>.db file and click Open
  8. Click the [Start Import] button
    Warning any existing map with the same name will be overwritten!
Notice: you must create the map template on each device you want to use it on. Please contact us for more information on how to apply this in the most efficient manner for many devices.
Comments