Vizitown

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Private Member Functions | List of all members
vizitown_plugin.vt_utils_tiler.Raster Class Reference

Class Raster Unherited object class. More...

Inheritance diagram for vizitown_plugin.vt_utils_tiler.Raster:
Collaboration diagram for vizitown_plugin.vt_utils_tiler.Raster:

## Public Member Functions
def | __init__
| Constructor. More...
def | rasterName
| rasterName method Format the name of the raster like this : nameWithoutExtension_zoomLevel_tileX_tileY More...
def | pixelSizeX
| pixelSizeX method Get the X pixel size More...
def | initialTileSize
| initialTileSize method Get the initial tile size More...
def | pixelSizeXForSize
| pixelSizeXForSize method Calculate the new pixel size More...
def | demElevation
| demElevation method Provides the min and max data contained by the raster More...
def | getNbTilesByZoomLevel
| getNbTilesByZoomLevel method Provides the number of tiles for each zoom level More...
def | sizes
| sizes method Calculate the size of the pixel size for each zoom level More...
def | createForExtent
| createForExtent method Produce the tile of data about the extent and reproject it if necessary The result is png image More...
def | createForSizes
| createForSizes method Create data about the array of pixel size More...

## Public Attributes
| size
| basename
| dataSource
| geoTransform
| isDem
| path
| dem

## Private Member Functions
def | _normalizeDEM
def | _createForExtent
| createForExtent method Produce the tile of data about the extent and reproject it if necessary The result is png image More...

## Detailed Description

Class Raster Unherited object class.

## Constructor & Destructor Documentation

def vizitown_plugin.vt_utils_tiler.Raster.__init__ | ( |  | self,
|  |  | path,
|  |  | size,
|  |  | isDem = `False`
| ) |  |

Constructor.

Parameters

  path | the path where the data are stock
  size | the size of the tile
  isDem | if a dem exists

## Member Function Documentation

def vizitown_plugin.vt_utils_tiler.Raster._createForExtent | ( |  | self,
|  |  | ds,
|  |  | extent,
|  |  | outFilename
| ) |  |
| private

createForExtent method Produce the tile of data about the extent and reproject it if necessary The result is png image

Parameters

  extent | the extent of the image
  outFilename | the name of the tile

def vizitown_plugin.vt_utils_tiler.Raster._normalizeDEM | ( |  | self) |  |
| private

def vizitown_plugin.vt_utils_tiler.Raster.createForExtent | ( |  | self,
|  |  | extent,
|  |  | outFilename
| ) |  |

createForExtent method Produce the tile of data about the extent and reproject it if necessary The result is png image

Parameters

  extent | the extent of the image
  outFilename | the name of the tile

def vizitown_plugin.vt_utils_tiler.Raster.createForSizes | ( |  | self,
|  |  | extent,
|  |  | sizes,
|  |  | baseDestPath,
|  |  | tileSize,
|  |  | zoom
| ) |  |

createForSizes method Create data about the array of pixel size

Parameters

  extent | the extent to produce data
  sizes | the array of pixel size to produce data
  baseDestPath | the directory to stock the produce data
  tileSize | the tile size of the data
  zoom | the number of zoom level

def vizitown_plugin.vt_utils_tiler.Raster.demElevation | ( |  | self) |  |

demElevation method Provides the min and max data contained by the raster

Returns
  tuple (minimum value, maximum value)

def vizitown_plugin.vt_utils_tiler.Raster.getNbTilesByZoomLevel | ( |  | self,
|  |  | globalExtent,
|  |  | dicSizes
| ) |  |

getNbTilesByZoomLevel method Provides the number of tiles for each zoom level

Parameters

  globalExtent | the extent provided
  dicSizes | a dictionnary of {zoomLevel : size of the tiles in meters for this zoom level}

Returns
  nbTilesByZoomLevel a dictionnary of {zoomLevel : number of tiles for this zoomLevel}

def vizitown_plugin.vt_utils_tiler.Raster.initialTileSize | ( |  | self) |  |

initialTileSize method Get the initial tile size

Returns
  the initial tile size

def vizitown_plugin.vt_utils_tiler.Raster.pixelSizeX | ( |  | self) |  |

pixelSizeX method Get the X pixel size

Returns
  the x pixel size

def vizitown_plugin.vt_utils_tiler.Raster.pixelSizeXForSize | ( |  | self,
|  |  | size
| ) |  |

pixelSizeXForSize method Calculate the new pixel size

Parameters

  size | the size demand by the user

Returns
  the new pixel size

def vizitown_plugin.vt_utils_tiler.Raster.rasterName | ( |  | self,
|  |  | destDir,
|  |  | zoom,
|  |  | x,
|  |  | y
| ) |  |

rasterName method Format the name of the raster like this : nameWithoutExtension_zoomLevel_tileX_tileY

Parameters

  tileZoomLevelthe | zoomLevel of the tile
  tileX | the X value of the tile
  tileY | the Y value of the tile

Returns
  the new formatted name of the raster

def vizitown_plugin.vt_utils_tiler.Raster.sizes | ( |  | self,
|  |  | extent,
|  |  | zoomLevel
| ) |  |

sizes method Calculate the size of the pixel size for each zoom level

Parameters

  extent | the extent of the view
  zoomLevel | the zoom level

Returns
  the array of pixel size for each zoom level

## Member Data Documentation

vizitown_plugin.vt_utils_tiler.Raster.basename

vizitown_plugin.vt_utils_tiler.Raster.dataSource

vizitown_plugin.vt_utils_tiler.Raster.dem

vizitown_plugin.vt_utils_tiler.Raster.geoTransform

vizitown_plugin.vt_utils_tiler.Raster.isDem

vizitown_plugin.vt_utils_tiler.Raster.path

vizitown_plugin.vt_utils_tiler.Raster.size

The documentation for this class was generated from the following file:

- vt_utils_tiler.py