Package org.ka2ddo.yaac.osm
Class OsmXmlSegmenter
java.lang.Object
org.ka2ddo.yaac.osm.OsmSegmenter
org.ka2ddo.yaac.osm.OsmXmlSegmenter
This class parses an OpenStreetMaps compressed XML file into a series of one-degree
"square" tiles of map data, stored in a compact binary format suitable for efficient
and fast rendering.
Special Java command-line parameters can be defined with the -D option to alter the operation of this class. These are:
- alt.tile.dir=/directory/path - specify where to put the temporary files that are used as a brute-force indexed OSM Node position table. Default is the configured tile directory specified in the YAAC Preferences, but a partition on another disk spindle could be used to reduce disk seeking latency.
- skip.osm.xml.parse - if defined, skip reading the OSM input file and just re-sort and merge any new *.ways.tmp and *.nodes.tmp files into the operational *.ways and *.nodes files. Useful if the import crashes prior to completing the sort and merge phase.
- dont.purge.temp - if defined, don't delete the temporary files when the processing is complete.
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ka2ddo.yaac.osm.OsmSegmenter
OsmSegmenter.AcceptTileSubdirsOrPlanetWays, OsmSegmenter.BoundsToNameTag, OsmSegmenter.ReportUpdates, OsmSegmenter.WayFileSorter
-
Field Summary
Fields inherited from class org.ka2ddo.yaac.osm.OsmSegmenter
ESTIMATED_EXTRA_TILE_SPACE, ESTIMATED_TEMP_TILE_SPACE, FILETYPE_SUFFIXES, MAX_LATITUDE, MAX_LONGITUDE, MIN_LATITUDE, MIN_LONGITUDE, numDupWaysDeleted, numSortFailures, numWayFiles, planetDos, RELATIONS_STATS_MAP_ENTRY_COMPARATOR, tileRootDirectory, tileTmpDirectory
-
Constructor Summary
ConstructorDescriptionOsmXmlSegmenter
(String rootTilePath) Constructor for bzipped XML OSM file segmenter, -
Method Summary
Modifier and TypeMethodDescriptionprotected long
Check if there is enough heap available for the importer to operate without guaranteed OutOfMemoryErrors due to the minimum size of data structures that will be simultaneously allocated during import.void
parse
(FileInputStream fileInputStream, NonshareableCountingBufferedDataInputStream inputStream, File inputFile, boolean useFixMe, StatusListener listener) Parse a compressed XML file into YAAC's version of OpenStreetMap tiles.Methods inherited from class org.ka2ddo.yaac.osm.OsmSegmenter
checkDiskSpace, computeActiveQueueCount, computeQueuesBacklog, findBiggestQueue, produceSortStatusMessage, refreshMapWindows
-
Constructor Details
-
OsmXmlSegmenter
Constructor for bzipped XML OSM file segmenter,- Parameters:
rootTilePath
- String pathname of the configured tile directory- Throws:
IOException
- if tile directory cannot be created
-
-
Method Details
-
getMinHeapRequired
protected long getMinHeapRequired()Check if there is enough heap available for the importer to operate without guaranteed OutOfMemoryErrors due to the minimum size of data structures that will be simultaneously allocated during import.- Specified by:
getMinHeapRequired
in classOsmSegmenter
- Returns:
- localized error message String, or null if no problem detected
-