Global Positioning System Reference
In-Depth Information
Administrative information. The third major compilation step is the extrac-
tion of administrative information. Basically, most countries can be subdi-
vided into an administrative hierarchy of city, county, and state, which is
represented in the destination selection of any navigation system. In many
commercial maps, every single link has a reference to the administrative
section to enable fast detection.
The country script extracts a %1.cities.osm file with all nodes attributed
with place.city . In OSM these nodes have the admin hierarchy codes as
follows:
<node id="240120926" lat="49.0159295" lon="12.0956268">
<tag k="place" v="city"/>
<tag k="name" v="Regensburg"/>
<tag k="is_in" v="Regensburg,Oberpfalz,Bayern, ...
... Bundesrepublik Deutschland,Europe"/>
<tag k="population" v="129323"/>
Then, the political borders are extracted to %1.borders.osm with all ways
for drawing a political map together with the natural areas attributed with
boundary.administrative .
Map algebra Especially when setting up a dedicated compiler for the first
time, the engineer can only guess which features to pick for the final map.
Therefore, the country script can be used to extract the entire landuse
and natural layers for comparison. Note that this operation might require
additional RAM for osmosis as applied in the script.
With simple algebra, estimations can be made:
landuse - ( forest + farm + residential + industrial ) = ...
natural - (
wood + water ) = ...
For exact figures, two additional command lines are added to the script to
actually apply this algebra on the files and produce the following files:
germany.landuse.rest.osm germany.natural.rest.osm
And, finally, the script can be used to remove extracted elements from the
map:
Germany - landuse - natural - networks - cities
= germany.rest.osm
Note that this operation is divided into subsequent steps and osmosis needs
a lot of RAM. Generally, all command lines pass through the complete
input file to improve readability, while osmosis does offer pipelining. The
reduction steps do not seem to have a big eect on the le size|until all
unrelated nodes are removed from the file. It is logical that the osmosis
--un switch needs to traverse to the end of the file, before it can release
 
Search WWH ::




Custom Search