Global Positioning System Reference
In-Depth Information
For development purposes, the three networks were manually merged
with the cities (destinations).
Please
open
the
le
../products/GER/networks/germany.osm
with
JOSM.
A look using JOSM reveals that the three networks are only connected
on the city nodes, which have additional address data. It can also be seen
that the ways are not split into links. In order to create a \clean" network,
the ways will be chopped into links later.
8.3.2 A
LinkCompiler
to Assemble OSM Links
Although the file
germany.osm
contains three networks and a number of
destination points, it is not yet suited for effective route calculations. The
basic idea of a
LinkCompiler
is to go through all OSM
<way>
is of the input
file and split each way into links connecting intersections. Figure 8.1 shows
part of the Germany network file. By clicking on any edge between A and
C and between C and D in JOSM, one can tell that the ways have not been
further split into links.
From the Java perspective, the
LinkCompiler
is a great playground to
get more familiar with the
Collection
framework:
TheJavaTutorial>Collections>Introduction
A collection sometimes called a container is simply an
object that groups multiple elements into a single unit. Col-
lections are used to store, retrieve, manipulate, and communi-
cate aggregate data. Typically, they represent data items that
form a natural group. . . Acollectionsframeworkis a unified
architecture for representing and manipulating collections.
For a deeper understanding of the link compiler for OSM files, the
reader should open the file
LinkCompiler.java
and set the command
line arguments in the IDE as described in the \hands-on" box on
page 92.
Program usage. The
LinkCompiler
has only one argument list with the way-
key-value list of intended networks (OSM line features):
java LinkCompiler -rx germany.osm -wx germany.net.osm
-wkv "railway.rail,highway.motorway,waterway.river"
Search WWH ::
Custom Search