Creating an ArcPad map file (.apm) for use on the iPAQ

 

The easiest way to create an ArcPad map file for use on the iPAQ is to use the ArcPad tools that are available through ArcGIS 8.2.  This web page will lead you through the steps necessary to create a map for iPAQ use.

 


 

Adding the ArcPad Toolbar

 

First, the ArcPad 8 tools must be installed in ArcGIS.  If you see a toolbar in ArcGIS that looks like this then the tools are already installed.

 

 

 

 

 

If this toolbar is not present, the select the Tools menu and choose Customize. Select the ‘Toolbars’ tab.  Press the button ‘Add from file...’ at the bottom of the dialog box and navigate to C:/Program Files/ArcPad/apTools8 and select apTools8.dll.  Click OK.  Under the heading ‘Toolbars:’ on the left hand side of the menu should be a new entry entitled ‘Arcpad Tools’.  Select the check box next to ‘ArcPad Tools’ and click close.  The ArcPad toolbar should now appear.

 


 

Using the ArcPad Toolbar

 

ArcPad Toolbuttons

 

The ArcPad Toolbar has three toolbuttons.  From left to right, the ArcPad Map Wizard, Export Shapefile Symbology, and ArcPad Pack Shapefile.  This tutorial will focus on the ArcPad Map Wizard.  The ArcPad Map Wizard is designed to export the current map layout in ArcMap for use in ArcPad.  This includes exporting and projecting all vector layers into shapefiles, and compressing raster data into MrSID image files.  Layer symbology for each layer will also be exported as .apl files for each layer.  An ArcPad map file (.apm file) will be written, and the wizard provides the option to clip data layers to a user defined map extent (vector layers only).

 

Map projections

 

Since ArcPad does not have the capability to project data on-the-fly, and since the ArcPad Map Wizard in ArcGIS does not project raster data when converting it to MrSID, it is extremely important to verify that 1) all of the raster data you wish to include in the ArcPad map is in the same projection, and 2) that this projection is the one that you would like to use for the ArcPad map.  Typically, the map projection of and ArcGIS map is defined by the projection of the first layer loaded into the map.  This is not a bad idea, but if the projection of that first layer is not what you thought, this can cause havoc down the line.  The best way to deal with this problem is to start ArcGIS and begin a new map.  Before adding data to the map, go to View and select Data Frame Properties.  Choose the tab marked ‘Coordinate System’.  The Current Coordinate System should read ‘No projection’.  From the Choose Coordinate System menu select the coordinate system that you would like used for your ArcPad map.  In general, if you are fairly new to ArcGIS and ArcPad, it is best to choose one of the predefined coordinate systems, instead of a custom coordinate system.  If you have a significant amount of projected raster data, it is most time efficient to select the coordinate system that the raster data is in.  Click ‘OK’.

 

Raster data

 

Now that you have defined a coordinate system, you can add any raster data layers to your ArcGIS map.  If, at any point, when adding a raster layer, you get the following error messages:

 

            One or more layers is missing spatial information.  Data from those layers cannot be projected.

OR

The following layer XXXXXXX

has a geographic coordinate system that differs from other data in the map or the current map projection. ETC.

 

Then you must remove that layer from the map, and, using either the Projection function in ArcInfo workstation or the Projection Wizard in ArcToolbox, project the raster layer into the coordinate system defined when you first opened the map.

 

It is also important to note that the ArcPad Map Wizard is capable of clipping vector data, such as shapefiles, to the current map extent.  However, the ArcPad Map Wizard will not clip the extent of raster layers.  If the raster layer is much larger than needed, you may wish to consider clipping the raster layer prior to adding it to the ArcGIS map.  This functionality is not available in ArcGIS, but can be done through ArcInfo.  Instructions can be found here.

 

Vector data

 

After adding all of the raster layers, vector data, in the form of shapefiles or coverages, can be added to the map.  The ArcPad Map Wizard will convert all vector types into shapefiles when run, and will project all vector layers into the current map projection.  Nonetheless, ArcGIS occasionally chooses the incorrect map transformation for vector data that is not in the same coordinate system as defined for the ArcGIS map.  If you receive one of the two error messages listed above, continue to add the vector data to the map.  Check carefully, however, that the vector data is aligned as expected with existing raster and vector layers.  If it is, continue on with the next vector layer.  If it does not look correctly aligned, then you may wish to remove the layer, project it into the map coordinate system using the Projection Wizard in ArcToolbox, and add the newly projected layer.

 

 

Setting layer symbology

 

The ArcPad Map wizard will export vector layer symbology along with vector layers. 

 

Points.  You can set any type of symbol for point features, however, if you opt to use any special symbols, such as geologic symbols, then you must copy the font file that holds these symbols from the laptop to the iPAQ.  The ESRI fonts are found in C:/WINNT/Fonts on the laptops and each needed font file should be copied to /My Device/Windows/Fonts on the iPAQ.  There are problems with rotation when using multiple point symbols.  See this web page.

 

Lines.  ArcPad supports far fewer types of line symbology than ArcGIS.  Different colors of lines are supported, as are line weights.  Dashed lines and symbolic lines, such as thrust faults, are not supported.  Heavy line weights can take an extremely long time to draw in ArcPad, so it is recommended that line symbology be limited to colors as much as possible.

 

Polygons.  Polygon symbology is not supported at the present time.

 

 

Exporting the ArcGIS map using the ArcPad Wizard

 

Once all of the layers have been added to the ArcPad map, and the layer symbology has been set, the map can be exported.  Click the ArcPad Map Wizard button on the toolbar and follow through the dialog box.  You will select the layers to export, whether to export the entire map extent or just the current map view, and the location for all of the output files.  At the end of this, click OK, and the map will export.  If you have a significant number of raster files to be converted to MrSID format, this could take a while.

 


 

Altering the ArcPad .apm file for use on the iPAQ and loading the map

 

Now let’s say that you have created a map in a folder called ArcPadExportFolder entitled sample.apm.  Unfortunately, ArcGIS exports sample.apm with the location of the file ‘sample.apm’ included as an absolute path with relation to the laptop.  This will need to be changed for use on the iPAQ.  Open the file sample.apm using NotePad.  The beginning of the file will look like this:

 

<ArcPad>

<MAP name="c:\ArcPadExportFolder\sample">

 

It is now time to consider where you would like to place the files on the iPAQ.  The most logical place, for data security, is on the Secure Digital Memory Card.  Let’s assume that you will place all of the ArcPad map files that you have just generated into a folder on the memory card called ‘NewMap’.  In Notepad, change the file sample.apm to read

 

<ArcPad>

<MAP name="\Storage Card\NewMap\sample">

 

Save the file in NotePad, and select all the files in the folder ArcPad.  Connect your iPAQ to the laptop, and using the Explore feature in Microsoft ActiveSync, navigate to /My Pocket PC/Storage Card/ and create a new folder called NewMap.  Open this folder and drap all of the files in ArcPadExportFolder into NewMap.

 

On the iPAQ, start ArcPad.  From the File menu, select Open Map, and choose sample.apm from the resulting list.  All of the data that you have  exported should now appear.

 


 

Preparing the ArcPad Applet files for the iPAQ

 

Now you have a basemap on the iPAQ that is ready for use.  It can be used with a GPS, and with any self designed shapefiles that you create in ArcPad to collect data.  If you wish to use any of the custom software applets, however, there is some more preparation that needs to be done.  This example will follow the installation of the geologic mapping applet, however, other applets are similar.  The geologic mapping applet expects certain shapefiles to be in the ArcPad map, so that the applet can write and store data collected using the custom data collection forms.  Six shapefiles are needed, and they can be found in the folder ‘data’ in the mapping applet zip file located here (restricted to MIT, see Sinan Akciz for the password.  IE 5 or later required).

 

In the ‘data’ folder, you will find a number of shapefiles, as well as other files needed for the applets.  Make a copy of the data folder in a new location on your hard drive.  You will note that each of the six shapefiles (linear.shp, lines.shp, lithology.shp. planar.shp, photo.shp, and sample.shp) has a corresponding projection file (linear.prj, lines.prj, etc.).  These projection files must match those in your basemap, created above, for these shapefiles to work.  The easiest way to do this is to return to the ArcPadExportFolder and find any .prj file associated with one of the shapefiles in the basemap.  Copy this file to your copy of the data folder.  Make six copies of this .prj file, and rename them after each shapefile so that you have a new linear.prj etc.

 

Now take the copy of the data folder, with the new .prj files, and drag it onto the iPAQ into the NewMap folder.

 

Start ArcPad on the iPAQ, if it is not already running, and Open your map sample.apm, if it is not already open.  Select the Add button from the Main toolbar, and navigate to /Storage Card/NewMap/data/.  Select the checkbox next to each of the six shapefiles in the data folder and press OK.  Now Save the map.  The applet shapefiles are now added to the basemap.

 


 

Altering the .vbs code to use the new map

 

The final step in preparing the applet files for use on ArcPad is to make a minor modification to the VBScript code that controls the applet.  This file is found in the Applets folder in the unzipped mapping zip file.  Open the file mapping.vbs in a text editor (VBSEditor is great if available (http://www.koansoftware.com) but NotePad or TextPad will do.  Search for ‘Sub Config’ (it should be about 30 lines down) and you will see code that looks like this (colorized from VBSEditor):

 

You can see the line OpSys sets a variable to the value of Application.System.Properties(“platformid”).  This is simply a way of identifying what OS ArcPad is running on.  Here we will focus on ‘Case 3’, since that is the number for the iPAQ operating system.

 

In the first select statement, above, you see the following:

 

Case 3

                        Map Path = “\Storage Card\SpringMtns\data\”        ‘WindowsCE/PocketPC

                        NotePath = “\Storage Card\SpringMtns\data\notes\”

 

This would be altered, in our example, to:

 

Case 3

                        Map Path = “\Storage Card\NewMap\data\”        ‘WindowsCE/PocketPC

                        NotePath = “\Storage Card\NewMap\data\notes\”

 

 

In the second select statement, above, you see the following:

 

Case 3

                        Application.Map.Open(“\Storage Card\SpringMtns\fieldcamp.apm”)        ‘ PocketPC

 

This would be altered, in our example, to:

 

Case 3

                        Application.Map.Open(“\Storage Card\NewMap\sample.apm”)        ‘ PocketPC

 

 

Save the file mapping.vbs.  Now drag the entire folder ‘Applets’ into the folder ‘NewMap’ on the Storage Card of the iPAQ.

 


 

Loading the Applets

 

The final step is to set the Applet Path of the iPAQ to look for the Applets.  If ArcPad is not running, start ArcPad.  From the Tools menu on the Main Toolbar, select Options.  Scroll to the right until you find the Page Tab ‘Paths’.  At the bottom of this page is a Browse dialog for ‘Applet Path’.  Browse to /Storage Card/NewMap/ and select the folder ‘Applets’.  Click OK.  Close the Options dialog box.  Now Quit and Restart ArcPad.  ArcPad should take longer to load this time, since it is interpreting the newly loaded applet.  When it opens, however, it should automatically contain the mapping toolbar.  It should also open the map sample.apm, so all of your basemap and data layers should be visible and available.

 

Now you’re ready to collect data.

 

 

 

 

Updated on 1/16/2003 by N. Niemi.