A sample GRF XML document

In your work you are not limited to StreetMap to create and maintain a geocoding and routing file. In fact, with minimal effort you can create your own GRF file.

The example below shows a fragment of a GRF document that contains two stops. As you examine the information below notice that both stops are enabled; therefore, they will be participating in the route generation. One of them has a collapsed callout box (property closed=“True”), and one has the comment field filled in.

<?xml version="1.0"?>

<GRFDOC version="1.1">

<ROUTE_INFO>

<STOPS>

<STOP enabled="true">

<LOCATION visible="true" closed="true">

<POINT x="-117.1956" y="34.0570727272727"/>

<TITLE>380 New York St</TITLE>

<COMMENTS>ESRI</COMMENTS>

</LOCATION>

<POINTSTOP>

<POINT x="-117.19567052095" y="34.05707172727"/>

</POINTSTOP>

</STOP>

<STOP enabled="true">

<LOCATION visible="true" closed="false">

<POINT x="-117.17433200550" y="34.039876158558"/>

<TITLE>Prospect Park</TITLE>

<COMMENTS></COMMENTS>

</LOCATION>

<POINTSTOP>

<POINT x="-117.17433200550" y="34.039876158558"/>

</POINTSTOP>

</STOP>

</STOPS>

<BARRIERS/>

<PUSHPINS/>

<ROUTERESULT/>

</ROUTE_INFO>

</GRFDOC>

You may want to create a custom tool that reads point features and saves the attributes automatically into the appropriate XML elements in the GRF file. A sample illustrating how you can create such a custom tool is available on the ArcScripts Web page (www.esri.com/arcscripts). To find the example, type “grf” in the keyword field. This sample has a tool that can be added to ArcMap, which will then allow you to create a GRF file based on a point layer in your map. The GRF file can then be added to ArcPad.

NO ALT TEXT


2/6/2013