Global Positioning System Reference
In-Depth Information
With the command line (without linebreaks)
java OSMparser -rx germany.clean.osm -wx germany.norel.osm
-xelements "<relation id=[\"]"
all relations can be removed from the file, since they will not be used with
this map compiler.
The batch file ../deliveries/processDelivery.bat lists different pro-
cessing options of the parser.
The batch should be adopted to the
needs of your own compiler.
A nice setup to test regular expressions is an open command line box
to repeatedly call the parser with different expressions. A smaller file
( RGB-NW.clean.osm ) is created in a few seconds and can be opened with
a (UTF-8) text editor (or diff tool) after the first run. Consecutive calls
of the command line will write over an existing file and the output can be
updated in the editor window. Note that the overwriting of preexisting files
could destroy an earlier parsing. Nevertheless, the tool should not (have to)
wait for a keyboard input, since this could interrupt a longer compilation.
Note that
ˆ the input file has to have the extension .osm ;
ˆ Java splits the command line arguments by the space. Thus any
string (and regex) with a space should be masked with "" ;
ˆ the regular expression provided via the command line is compiled and
immediately returns a hint to the command line, if it is invalid.
Please review regular expression:
Unclosed character class near index 15
<relation id=["
^
7.9
Toolchain Configuration
The OSMparser introduces regular expressions as a powerful tool to manip-
ulate OSM data. However, it is kind of numb to map semantics and can
easily make the output file unusable. For example, the -felements switch
can be used to fetch distinct elements and analyze them in an editor. This
can be helpful for concrete problems, but the output file is useless for fur-
ther processing.
When setting up a map compiler, the engineer has to be aware of the side
effects of every tool used. To make sure that the *.clean.osm files are still
valid, they can be repacked after cleaning to include unicode, XML, and,
Search WWH ::




Custom Search