public class OsmPbfSegmenter extends OsmSegmenter implements AbortListener, OsmSegmenter.ReportUpdates
Special Java command-line parameters can be defined with the -D option to alter the operation of this class. These are:
OsmSegmenter.AcceptTileSubdirsOrPlanetWays, OsmSegmenter.BoundsToNameTag, OsmSegmenter.OpenRandomAccessFileCache, OsmSegmenter.ReportUpdates, OsmSegmenter.WayFileSorteremptyPostalQueueIdle, ESTIMATED_EXTRA_TILE_SPACE, ESTIMATED_TEMP_TILE_SPACE, FILETYPE_SUFFIXES, FILETYPE_SWAY, FILETYPE_WAY, flushUntiled, fullPostalQueueDelay, listener, MAX_LATITUDE, MAX_LONGITUDE, MAX_WAY_READ_FILES, MIN_LATITUDE, MIN_LONGITUDE, minWaysToWrite, numAddressesSaved, numDupPostalQueueEmpty, numDupPostalQueueFull, numDupWaysDeleted, numInvalidPostal, numNodeFiles, numPatchedAddresses, numPostalQueueEmpty, numPostalQueueFull, numRelations, numSortFailures, numTileWays, numWayFiles, numWayReaderOpens, numWayReads, out, planetDos, RELATIONS_STATS_MAP_ENTRY_COMPARATOR, S_LOG_TIMESTAMP_FMT, sdfLogTimestamp, tileRootDirectory, tileTmpDirectory, unsavedWayFileCache, unsavedWaysFileCounter, untiledDos, WAY_INDEX_PREFILL, WAY_READBACK_BUF_SIZE, WAY_READBACK_MAX_BUFFERS, wayIdUsedSet, wayIndex, wayQueuesAreEmpty, wayWriterQueues, wayWriterThread, zeroLengthWayIds| Constructor and Description |
|---|
OsmPbfSegmenter(java.lang.String rootTilePath)
Constructor for protocol buffers OSM file segmenter,
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRequested()
Called from the user interface when the user requests a cancel.
|
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.
|
void |
parse(java.io.FileInputStream fileInputStream,
NonshareableCountingBufferedDataInputStream inputStream,
java.io.File inputFile,
boolean useFixMe,
StatusListener listener)
Parse an OSM PBF file into YAAC's version of OpenStreetMap tiles.
|
void |
updateMessage(java.lang.String countString)
Report a status update string to the progress indicator (if one was provided).
|
checkDiskSpace, closePostalAddresses, computeActiveQueueCount, computeQueuesBacklog, copyAddressFromNodeToOther, ensurePostalTablesExist, findBiggestQueue, flushPostalAddressesToDB, getFileForIndexedWay, getPostalAddressQueueSize, getWayForRelation, isPostalDbInUse, processNonStdAmenityTypes, produceSortStatusMessage, refreshMapWindows, tryToSetUpPostalDB, updateAddressesWithStreet, writePostalAddressToDbpublic OsmPbfSegmenter(java.lang.String rootTilePath)
throws java.io.IOException
rootTilePath - String pathname of the configured tile directoryjava.io.IOException - if tile directory cannot be createdprotected long getMinHeapRequired()
getMinHeapRequired in class OsmSegmenterpublic void parse(java.io.FileInputStream fileInputStream,
NonshareableCountingBufferedDataInputStream inputStream,
java.io.File inputFile,
boolean useFixMe,
StatusListener listener)
throws java.io.IOException
parse in class OsmSegmenterfileInputStream - FileInputStream underlying the input stream being usedinputStream - NonshareableCountingBufferedDataInputStream reading a PBF fileinputFile - File of the OpenStreetMap snapshot file being readuseFixMe - boolean true if FIXME-tagged elements of the OSM data are to be includedlistener - StatusListener to receive progress report of the importjava.io.IOException - if the input file cannot be read or any of the output files cannot be writtenpublic void cancelRequested()
cancelRequested in interface AbortListenerpublic void updateMessage(java.lang.String countString)
throws UserAbort
updateMessage in interface OsmSegmenter.ReportUpdatescountString - String to reportUserAbort - if user clicked the abort button