Global Positioning System Reference
In-Depth Information
the details of the map, and it is a good idea to test with a limited number
of zoom levels.
A small area like
RGB
can produce a lot of data:
Tiles folder:
1,069 Folders
235,923 Files
2,700,925,950 Bytes
~ 2.5 gig
The time consumption for eighteen layers can be significant:
level 0-15: 0:56 - 1:19 = 23 minutes !
level 16: 1:19 - 2:30 = 1h 11
level 17: 2:30 - 7:30 = 5h 00
---------------------------------
total:
0h56min - 7h30min = 6 and one half hours !!
After some experimenting, all osm files and the
Tiles
folder can be
removed again and now
createRGB.bat
can run all the way. In the con-
text of a map compiler, the creation of products like
createRGB.bat
and
createRGB-NW.bat
can be run in parallel, if the hardware allows this.
TileMapViewer
. We now go back to the two applications
MapViewer
and
MovingObjects
described on page 76, and enable the viewer to display the
tiles
12
created above.
The packaging of
roaf.book.ro.MovingObjects.java
,
roafx.swingmap
.MapViewer.java
, and
roaf.book.map.osm.TileMapViewer.java
is important
in the larger project context:
ˆ
MovingObjects
is real-object specific;
ˆ
the
MapViewer
is an external observer to real objects;
ˆ
the
TileMapViewer
is an OSM-specific add-on.
The implementation of the
TileMapServer
is straightforward:
1. The
menuTileManger()
instantiates a
newTileMapServer(tilesDir)
to read the tile directory.
2. The
TileMapServer
goes through the zoomlevels 0 to 17 to
createTiled
Maps
for each existing directory.
3. The constructor of each
TiledMap
iterates through all subdirectories
to allocate the images according to the vertical and horizontal matrix.
4. Since all tiles have the same pixel size only the very first image is
loaded to get the horizontal and vertical pixel lengths.
12
Find the tiles in
../resources/gps/RGB-BUELL/Tiles
.
Search WWH ::
Custom Search