Vizitown
 All Classes Namespaces Files Functions Variables
vizitown_plugin.vt_utils_tiler.Raster Class Reference

Class Raster Unherited object class. More...

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

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
paththe path where the data are stock
sizethe size of the tile
isDemif 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
extentthe extent of the image
outFilenamethe 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
extentthe extent of the image
outFilenamethe 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
extentthe extent to produce data
sizesthe array of pixel size to produce data
baseDestPaththe directory to stock the produce data
tileSizethe tile size of the data
zoomthe 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
globalExtentthe extent provided
dicSizesa 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
sizethe 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
tileZoomLevelthezoomLevel of the tile
tileXthe X value of the tile
tileYthe 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
extentthe extent of the view
zoomLevelthe 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: