private HDTileBasedDataProcessor(MapWriterConfiguration configuration) { super(configuration); this.indexedNodeStore = new IndexedObjectStore<>(new SingleClassObjectSerializationFactory(Node.class), "idxNodes"); this.indexedWayStore = new IndexedObjectStore<>(new SingleClassObjectSerializationFactory(Way.class), "idxWays"); // indexedRelationStore = new IndexedObjectStore<Relation>( // new SingleClassObjectSerializationFactory( // Relation.class), "idxWays"); this.wayStore = new SimpleObjectStore<>(new SingleClassObjectSerializationFactory(Way.class), "heapWays", true); this.relationStore = new SimpleObjectStore<>(new SingleClassObjectSerializationFactory(Relation.class), "heapRelations", true); this.tileData = new HDTileData[this.zoomIntervalConfiguration.getNumberOfZoomIntervals()][][]; for (int i = 0; i < this.zoomIntervalConfiguration.getNumberOfZoomIntervals(); i++) { this.tileData[i] = new HDTileData[this.tileGridLayouts[i].getAmountTilesHorizontal()][this.tileGridLayouts[i] .getAmountTilesVertical()]; } this.virtualWays = new TLongObjectHashMap<>(); this.additionalRelationTags = new TLongObjectHashMap<>(); }
/** * Creates a new instance. * * @param serializationFactory * The factory defining the object serialisation implementation. * @param sourceIterator * The source of data. * @param storageFilePrefix * The prefix of the storage file. * @param useCompression * If true, the storage file will be compressed. */ public PersistentIterator( ObjectSerializationFactory serializationFactory, ReleasableIterator<T> sourceIterator, String storageFilePrefix, boolean useCompression) { this.sourceIterator = sourceIterator; store = new SimpleObjectStore<T>(serializationFactory, storageFilePrefix, useCompression); initialized = false; }
/** * Creates a new instance. * * @param serializationFactory * The factory defining the object serialisation implementation. * @param sourceIterator * The source of data. * @param storageFilePrefix * The prefix of the storage file. * @param useCompression * If true, the storage file will be compressed. */ public PersistentIterator( ObjectSerializationFactory serializationFactory, ReleasableIterator<T> sourceIterator, String storageFilePrefix, boolean useCompression) { this.sourceIterator = sourceIterator; store = new SimpleObjectStore<T>(serializationFactory, storageFilePrefix, useCompression); initialized = false; }
/** * Creates a new bounding box computer instance. * * @param origin * The origin for the bound to set. */ public BoundComputer(String origin) { objects = new SimpleObjectStore<EntityContainer>(new GenericObjectSerializationFactory(), "cbbo", true); bottom = 0; top = 0; left = 0; right = 0; nodesSeen = false; this.origin = origin; }
/** * Creates a new bounding box computer instance. * * @param origin * The origin for the bound to set. */ public BoundComputer(String origin) { objects = new SimpleObjectStore<EntityContainer>(new GenericObjectSerializationFactory(), "cbbo", true); bottom = 0; top = 0; left = 0; right = 0; nodesSeen = false; this.origin = origin; }
/** * Creates a new instance. * * @param idTrackerType * Defines the id tracker implementation to use. */ public UsedNodeFilter(IdTrackerType idTrackerType) { allNodes = new SimpleObjectStore<NodeContainer>( new SingleClassObjectSerializationFactory(NodeContainer.class), "afnd", true); allWays = new SimpleObjectStore<WayContainer>( new SingleClassObjectSerializationFactory(WayContainer.class), "afwy", true); allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afrl", true); requiredNodes = IdTrackerFactory.createInstance(idTrackerType); }
/** * Creates a new instance. * * @param idTrackerType * Defines the id tracker implementation to use. */ public UsedWayFilter(IdTrackerType idTrackerType) { allNodes = new SimpleObjectStore<NodeContainer>( new SingleClassObjectSerializationFactory(NodeContainer.class), "afnd", true); allWays = new SimpleObjectStore<WayContainer>( new SingleClassObjectSerializationFactory(WayContainer.class), "afwy", true); allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afrl", true); requiredWays = IdTrackerFactory.createInstance(idTrackerType); }
allNodes = new SimpleObjectStore<NodeContainer>( new SingleClassObjectSerializationFactory(NodeContainer.class), "afn", true); allWays = new SimpleObjectStore<WayContainer>( new SingleClassObjectSerializationFactory(WayContainer.class), "afw", true); allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afr", true); } else if (cascadingRelations) { allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afr", true);
allNodes = new SimpleObjectStore<NodeContainer>( new SingleClassObjectSerializationFactory(NodeContainer.class), "afn", true); allWays = new SimpleObjectStore<WayContainer>( new SingleClassObjectSerializationFactory(WayContainer.class), "afw", true); allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afr", true); } else if (cascadingRelations) { allRelations = new SimpleObjectStore<RelationContainer>( new SingleClassObjectSerializationFactory(RelationContainer.class), "afr", true);