Pyramids
Issues
- Should have just 1 zoom level rendered when tile has vector data
- In() does not appear to work for polylines (not sure about polygons)
- MouseDown() does not apepar to be called
BlueSpray Tiles
These classes support BlueSpray's tile format and are the base classes for subclasses. The BlueSpray tiles can contain vector (point, polyline, or polygon) or raster data in any projection. The tiles are also only defined when they contain data of sufficent resolution.
CMDatasetPyramid
Member Variables From the JSON Tile Data
- AttributeInfo:
- Headings: name, type
- NumRows
- NumColumns
- MinColumn
- MaxColumn
- NumColumns
- MinRow
- MaxRow
- NumRows
- OriginalBounds: XMin,YMin,XMax,YMax - bounds for the original dataset before it was tiled
- TileBounds: bounds of all the tiles thta were created. This should be equal to or larger than the OriginalBounds
Computed Member Variables
- TheBounds; XMin,YMin,XMax,YMax - Bounds of this dataset, same as the OriginalBounds
Functions
- DatasetPyramid functions
- SetDebugTile()
- GetRasterFileExtension() - called by tiles to get the raster extension
- GetDataForTextureTile() - called by tiles
- GetInfo() - called by tiles
- NeedToLoadTileData() - returns true if the a tile needs to load data
- GetTilesToLoad() - calls tiles to add themselves to the BestTiles array
- GetBestTiles() - calls the GetTilesToLoad() function for the dataset and its tiles to find the best tiles to load for the next paint cycle. Called from Paint()
CMTile
Approach
- Supports both raster and vector tiles.
- Supports rendering tiles in 2D and 3D.
- Loads Tiles as needed
- Loads raster immeidately after a tile is loaded that contains a raster
Memober Variables
- ZoomLevel
- GlobalColumn
- GlobalRow
- OriginalTileExtent - tile extent before projecting on the fly
- OriginalTileArea - An area (array with one polygon) describing the area for the tile if it is completely within a feature. Used to render the polygon.
- GeographicExtent - tile extent which is projected back to geographic if a projector is available
Functions
- Protected 3D Management
- HideMesh()
- HideTiles()
- SetupGeometry (overriden)
- Static Protected 3D Management
- GetSubSample()
- GetNewMaterial()
- GetDistanceTo3DView()
- Protected
- GetTileImageFilePath()
- GetOriginalTileWidth()
- GetOriginalTileExtent()
- GetGeographicTileExtent()
- GetGeoTileExtent()
- GetGeoTileWidth()
- Protected Raster functions
- HaveLoadedRasterData
- NeedToLoadRasterData
- LoadTileRaster
- GetRaster
- GetRasterRequest
- PaintRaster
- Protected tile management
- LoadTile
- PaintChildTiles
- GetChildrenVisible
- GetNumChildTilesLoaded
- GetPaintThisTile
- GetBestTileToLoad
- PaintTile
- Protected
- AddToFeatureBounds
- In
- MouseDown
- Public
- SetPaintTileInfo
- GetPaintTileInfo
- SetData
- GetData
OpenFormat Tiles
CMDatasetPyramidOpenFormat
Subclass of CMDatasetPyramid
-
- GetCoordinateValueOrder() - called by tiles
CMTileOpenFormat
The TileOpenFormat is based on the 256x256 original Google Mercator pixel-baed projection rather than WebMercator.
- Private
- GetChildTile() - allocates new child tile
- SetupGeometr
- Protected (overrides)
- GetTileImageFilePath
- GetOriginalTileExtent
- Protected (overrides)
- GetNumChildTilesLoaded
- GetChildrenVisible
- GetPaintThisTile
- GetBestTileToLoad
- PaintTile
- Public
- GetData()
Implementation
- PaintTile()
- 3D Rendering
- 2D Rendering
- CheckPaintTile()
- 3D specific checks:
- 2D Specific checks:
- If this steps pixel width<256, PaintTile=true
- else PaintChildren=true
- If PaintTile==false
- If this step is 0, PaintTile=true
- CheckPaintTile()