| Vietnamese GPS - Intelligent on the go |
|
Mapmaker Getting StartedTutorial 3a – Routing Goals for this section
-
Understanding Routing
-
Use GM8 to insert vertices at intersections
-
Export .MP file to GPSMapEdit (GME)
-
Create routing data in GPSMapEdit
-
Use the Search feature in GM8 to edit multiple features simultaneously Some Garmin GPS receivers have the ability to calculate
routes from your current location to your destination, then provide turn
guidance along the calculated route. If your GPSr has this capability, then you
can create routable maps with cGPSMapper’s Personal version. A free 30-day
trial is available at http://cgpsmapper.com/buy.htm#personal
Routable maps have additional data associated with the road
object declarations, indicating the speed limit, the class of road, and
specific restrictions such as toll or one-way. Currently, GM8 does not have the ability to edit all of
these routing attributes, so we will use another program to help us with
generating the routing information. GM8 is still a very important part of
creating routable maps, as you will see. How Routing Works Each routable road has associated information describing its
routing characteristics. Each intersection between routable roads is called a
Routing Node. Calculating a route in the GPSr is simply a matter of looking at
where you are, where you want to go, and evaluating the available paths to
generate the best route within your defined road grid, according to your
preferences. This map fragment, grabbed from a GPSMapEdit screen, has
four routable intersections indicated by the small rectangles at the
intersections. The yellow rectangles (NW, NE and SE) indicate two roads meeting
at the intersection, and the green rectangle (SW) indicates three roads meeting
at the intersection.
Let’s explore the Polish format source code underlying this
map. All of these routing attributes have been added by
GPSMapEdit; we’re simply going to take a look to understand what’s going on
inside the data file when routing information is present. I’ve reformatted the
coordinates to make it easier to see the relationships between vertices used as
NodeIDs, and added comments to the side explaining the meaning of the Nodx=
declarations.
[RGN40] First, an explanation of the Nodx= declaration. Nodx= <This road’s zero-based coordinate pair
reference>, <NodeID>, <External (1|0)> The first number represents the offset of the referenced
coordinate pair, counting from 0. The second number is the NodeID. Any other
Nodx= declarations with the same NodeID in this position share an intersection
with this Nodx= declaration. The third number says whether or node this node is
external, meaning that other maps can link to this map at this node. Its value
can be 1 or 0. For an example, let’s look at the Nod2= declaration for
The second routing node from The second routing node from Notice that the referenced coordinate pairs are identical,
as they must be for routing to work. GPSMapEdit will not create a routable node
unless there are matching vertices at the intersection of the two roads. Now let’s look at the intersection defined by NodeID 5, with
three intersecting roads.
Again, note that the coordinate pairs for this intersection
are identical. At compile time, cGPSMapper looks through the .MP file for
all Nodx= statements, grouping those with matching Node IDs, and creating the
routable road data structure that your GPSr scans when calculating a route. Understanding RouteParam= In addition to declaring the routable road intersections, we
also need to declare attributes for the individual roads describing the Speed
Limit, and Road Class characteristics. In Polish format, this is done with a
RouteParam= declaration: RouteParam=<Speed>,<Road Class>,<restrictions…> Here is a table showing the possible values of RouteParam=
for Speed and Road Class, the two most important parameters:
The Speed parameter is used when calculating the fastest
route and projected arrival time. The Road Class attributed is used to select
the path of least resistance through an area. Higher numbers mean more
desirable routing. Creating Routing Nodes
Now we’re going to create the data that we’ve been studying
here. Launch GPSMapEdit, and open Jackson WY.MP. Press the Z key to enter Zoom mode, then drag
a box around the center of town. Press the M key
to enter the Edit Nodes mode, then click Highway 89 so that it is selected.
Right-click at the intersection of 89, Broadway and Cache, then select Connect to Nearest Nodes.
This creates a routing node at the intersection of 89,
Broadway and Cache. The resulting node should be green, indicating a 3-street
intersection. When we created this intersection in GM8, it was an origin point
for each of the roads, so there are already vertices at this location to
connect. GPSMapEdit shows vertices as ‘X’s. Note that there are no vertices at
the intersection of 89 and DELONEY, just north of our 3-street intersection.
GPSMapEdit requires vertices in both intersecting roads at any location
intended to become a routing node. Right-click at the intersection of 89 and DELONEY, and note
that there is no option to Connect to
Nearest Nodes. We need to add vertices at the intersection of these
roads. With Highway 89 still selected, position the cursor at the
intersection of 89 and DELONEY. Right-click, then select Add Node Here. Click on DELONEY,
position the cursor at the same intersection, then right-click and select Add Node Here. Depending upon how
accurate you were with your clicking, you may or may not have a right-click
option to Connect to Nearest Nodes
at this intersection. I usually have to drag one of the vertices towards
the other until it lights up red, indicating that they’re aligned before I can
use Connect to Nearest Nodes. As you can see, this process will get tedious very quickly!
Fortunately, GM8 can help us out. Close GPSMapEdit without saving any of your edits, and
return to GM8. Use the Click Tools |
Configure… (or the Configure icon in the
toolbar) then click the Vector Display tab. In the Select From section, select
only Lines, then click OK. Drag over your entire map so that all the roads are
selected. Press Shift+V to
toggle vertex display so that vertices are visible. Right-click anywhere, then
select Insert Vertices at
Intersections of Selected Features. Note that GM8 has created
coincident vertices at all road intersections for us. Press Esc to
unselect the roads. Let’s use this opportunity to do a little clean up on some
Areas. Click the Configure icon in the tool bar to open the
Configuration dialog, then click the Vector Display tab. Select only Areas,
then exit the Configuration dialog. Press Alt+Z to
enter Zoom Mode, then drag over Export your Polish format file, overwriting the previous
copy. Open this file in GPSMapEdit. Press the M key
to enter Edit Nodes mode, and click on Highway 89. Note that there is now a
vertex at the DELONEY intersection. Click on DELONEY, and notice an identical
vertex at that intersection. This map is ready for routing nodes. In the GPSMapEdit menu, click Tools | Generate Routing Nodes | At Coinciding Points of Polylines.
This automatically creates routing nodes at all intersections. The blue nodes
are created at the ends of roads - don’t worry about them. Check your map to
make sure that all intersections are at least yellow, and not blue. If you see
blue at an intersection, it probably means that the one of the roads terminates
just shy of the intersection. Press M
to Edit Nodes, then click and drag the vertex to align it with the other,
then right-click to Connect Nodes.
Now let’s take a look at how GPSMapEdit assigned Speed and
Route class attributes. In GPSMapEdit, press the S key to Select Objects, then double-click on Highway 89 to
bring up the Object Properties dialog, then click the Routing tab.
GPSMapEdit assigned a default speed of 60mph, which is too
fast for this segment through town. In the Speed limit dropdown, select (3) 35
MPH / 60 KPH. Click OK to accept the parameters and dismiss the Object
Properties dialog. Now double-click BROADWAY, and adjust its parameters to
Speed limit (2) and Road class (2).
Click OK to accept the parameter changes and dismiss the
dialog. Apply the same settings for CACHE. We now have the most important
streets in town designated as Principal HW or Arterial. Let’s take a look at
the other streets to see what RouteParam= attributes have been assigned. Double-click Save the file in GPSMapEdit by pressing Ctrl+S, then exit. Now we need reload our Polish format file that’s been edited
in GPSMapEdit. Our workspace already has a representation of the roads in our
USER CREATED FEATURES overlay, but we now want to work with our edited version.
First, save your current JACKSON WY.GMW workspace just in case you want to come
back to your original data. Open the Press Ctrl+O to
Open File, and open JACKSON WY.MP – the updated vector feature file that was
just saved by GPSMapEdit. Click File |
Save Workspace As …, and save this workspace as JACKSON WY IMPORT.GMW.
This version of the workspace will use the imported .MP file with our edits. Press Home so
you can see the entire project. We’re now going to use the Search feature to
find all roads whose RouteParam= attributes begin with 3,0 – in other words,
those roads for which GPSMapEdit set a speed limit of 35. In the menu bar, click Search | Search by Attributes, Name, and Description. In Types to Search, click ‘Lines’. In Search Criteria –
Attribute/Item, select ROUTEPARAM from the drop-down list. Select ‘=’ from the
comparison type list, and ‘3,0*’ as the Compare value. This will find all lines
whose RouteParam= attribute begins with 3,0.
This is exactly the group of roads we’re looking for. Click
‘Select All’, then ‘Edit Selected’.
In the Modify Selected Line Feature dialog, select
RouteParam from the Feature Attributes drop-down list, then click Edit. Change
the initial 3 to a 2, representing a 25mph speed limit for city streets. Close
all open dialogs and return to the GM8 main screen. Note: Beginning with version 1.0.32.0 of
GPSMapEdit, it is possible to simultaneously change the Speed and Route class
parameters for a group of selected roads. This section of the tutorial was
designed to introduce the powerful Search/Modify features of GM8. Now we’ll export our modified road database plus the topo contours.
Open the Export the visible vector overlays as JACKSON WY.MP. Note
that we have now merged our two vector overlays into a single overlay. Compile and download your map to your GPSr. This concludes the introductory tutorial sequence. Tutorial 4a – The Development Cycle To continue developing your map, you need to be aware of a
few key concepts to keep everything in order. Only vector data can be compiled and downloaded into a GPSr.
In these tutorials, we combined the digitized features that you created
manually with GENERATED CONTOURS. If you want to remove or exclude vector
features from your export, you can easily do so by using the filter functions
of GM8. You will find that GM8 is very flexible in its ability to manipulate
your database. If you want to edit your .MP Polish format source files
outside of GM8, you need to follow a simple sequence to keep things in order. When you are ready to work on your source file outside of
GM8, export it as a .MP Polish format file. Edit the file as needed in your external tool, saving it
again in .MP format. When you are ready to re-import the modified file to GM8,
open your saved workspace, and Close the older version of your data in the Have fun! Additional Online Resources Global Mapper Tech Support Group http://tech.groups.yahoo.com/group/global_mapper/
cGPSMapper Tech Support Group http://tech.groups.yahoo.com/group/map_authors/
GPS Passion Forum http://www.gpspassion.com/forumsen/default.asp
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||