public BaseTileBasedDataProcessor(MapWriterConfiguration configuration) : base()
        {
            this.boundingbox = configuration.BboxConfiguration;
            this.zoomIntervalConfiguration = configuration.ZoomIntervalConfiguration;
            this.tileGridLayouts           = new TileGridLayout[this.zoomIntervalConfiguration.NumberOfZoomIntervals];
            this.bboxEnlargement           = configuration.BboxEnlargement;
            this.preferredLanguages        = configuration.PreferredLanguages;
            this.skipInvalidRelations      = configuration.SkipInvalidRelations;

            this.outerToInnerMapping            = new TLongObjectHashMap <>();
            this.innerWaysWithoutAdditionalTags = new TLongHashSet();
            this.tilesToCoastlines = new Dictionary <>();

            this.countWays          = new float[this.zoomIntervalConfiguration.NumberOfZoomIntervals];
            this.countWayTileFactor = new float[this.zoomIntervalConfiguration.NumberOfZoomIntervals];

            this.histogramPoiTags = new TShortIntHashMap();
            this.histogramWayTags = new TShortIntHashMap();

            // compute horizontal and vertical tile coordinate offsets for all
            // base zoom levels
            for (int i = 0; i < this.zoomIntervalConfiguration.NumberOfZoomIntervals; i++)
            {
                TileCoordinate upperLeft = new TileCoordinate((int)MercatorProjection.longitudeToTileX(this.boundingbox.minLongitude, this.zoomIntervalConfiguration.getBaseZoom(i)), (int)MercatorProjection.latitudeToTileY(this.boundingbox.maxLatitude, this.zoomIntervalConfiguration.getBaseZoom(i)), this.zoomIntervalConfiguration.getBaseZoom(i));
                this.tileGridLayouts[i] = new TileGridLayout(upperLeft, computeNumberOfHorizontalTiles(i), computeNumberOfVerticalTiles(i));
            }
        }
示例#2
0
        private RAMTileBasedDataProcessor(MapWriterConfiguration configuration) : base(configuration)
        {
            this.nodes         = new TLongObjectHashMap <>();
            this.ways          = new TLongObjectHashMap <>();
            this.multipolygons = new TLongObjectHashMap <>();
            this.tileData      = new RAMTileData[this.zoomIntervalConfiguration.NumberOfZoomIntervals][][];
            // compute number of tiles needed on each base zoom level
            for (int i = 0; i < this.zoomIntervalConfiguration.NumberOfZoomIntervals; i++)
            {
//JAVA TO C# CONVERTER NOTE: The following call to the 'RectangularArrays' helper class reproduces the rectangular array initialization that is automatic in Java:
//ORIGINAL LINE: this.tileData[i] = new RAMTileData[this.tileGridLayouts[i].AmountTilesHorizontal][this.tileGridLayouts[i].AmountTilesVertical];
                this.tileData[i] = RectangularArrays.ReturnRectangularRAMTileDataArray(this.tileGridLayouts[i].AmountTilesHorizontal, this.tileGridLayouts[i].AmountTilesVertical);
            }
        }