Reference‎ > ‎

Importing and Exporting Shapefiles

pcMapper DB lets you work with ESRI® shapefiles and dBase tables via an import/export (I/O) utility. You can create a new map from a set of shapefiles, edit both attributes and geometry and then export the edited map back to shapefiles.
The I/O utility is contained in the PcmDb app package and consists of a program (PcmSQLite.exe) that executes on a Windows PC from the sdcard on your Android device. Thus, you don’t need to install anything on your PC. The shapefiles are automatically converted and the resulting map transferred to/from your Android device.

Requirement: you must be able to mount the sdcard as a disk volume on a Windows PC, typically via a USB connection.

Importing from shapefiles

A map in pcMapper consists of points, lines and polygons. As a shapefile may only contain a single feature type, multiple files of the same type (e.g., streets and railroads) are combined into a single line “layer”, but their attributes are retained as separate database tables. You can also set the symbology and other metadata per imported shapefile.
The original set of shapefiles are reconstituted upon export.

Requirements:
  • attribute table must contain at least 3 columns
  • the 1st attribute column must be a unique integer (primary key)
  • must have a defined projection (*.prj file)
    • coordinate system must be a projected Mercator
      (i.e., contain the text “Mercator” - example: "Transverse_Mercator")
    • units must be in meters

UTM is the preferred choice

  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 containing the shapefiles to import
    (all *.dbf files in the input folder will be selected)
  6. Click the [Start Import] button
    Warning any existing map with the same name will be overwritten!
Tip: you can define metadata controlling symbology, valid values and more from the Show tab. Please refer to “Suggested workflow and best practices” below for more information.

Exporting to shapefiles

You can export any map that was created from shapefiles back to the original set of files.
  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 Export tab
  4. Select the Map to export
  5. Click the [..] button and navigate to the folder where you want to place the shapefiles
  6. Click the [Start Export] button
    Warning any existing files with the same names will be overwritten!
Notice: at this time, only the *.dbf, *.shp and *.shx files are created. Make sure to keep the original files (such as *.prj) and copy them to the export folder as needed. Also, imported standalone dBase (*.dbf) tables are not exported.
There are two situations of potential mismatch between map features and attribute records that may occur as pcMapper doesn’t enforce a 1:1 relationship:
a) orphaned attribute records - any attribute record(s) without a corresponding map feature will not be included in the exported shapefile.
b) unlinked map features - any feature(s) without a corresponding attribute record will be exported into a separate shapefile per feature type: Lines_NoDb.shp, Polygons_NoDb.shp and Points_NoDb.shp respectively.
This guarantees the integrity of the resulting shapefile and allows you to identify any mismatch.
Comments