Package madrona :: Package raster_stats :: Module models
[hide private]

Module models

source code

Classes [hide private]
  RasterDataset
  ZonalCategory
  ZonalStatsCache
Functions [hide private]
 
geom_to_file(geom, filepath) source code
 
_run_starspan_zonal(geom, rasterds, pixprop=0.5)
Consider this a 'private' method ..
source code
 
clear_cache() source code
 
zonal_stats(geom, rasterds, read_cache=True, cache_only=False, pixprop=0.5)
Given a GEOSGeometry and a RasterDataset,...
source code
Variables [hide private]
  logger = get_logger()
  RASTDIR = os.path.join(os.path.dirname(__file__), 'test_data')
  RASTER_TYPES = "continuous", "continuous", ("categorical", "ca...
  STARSPAN_BIN = settings.STARSPAN_BIN
Function Details [hide private]

_run_starspan_zonal(geom, rasterds, pixprop=0.5)

source code 

Consider this a 'private' method .. dont call directly, use zonal_stats() instead Runs starspan and returns a ZonalStatsCache object

zonal_stats(geom, rasterds, read_cache=True, cache_only=False, pixprop=0.5)

source code 

Given a GEOSGeometry and a RasterDataset,
compute the zonal stats and return json like
 { 'raster': 'elevation', 'stats': {'sum': 10234.2, 'mean': 12.4}}
result will be stored in cache
 and cache value is returned if read_cache


Variables Details [hide private]

RASTER_TYPES

Value:
"continuous", "continuous", ("categorical", "catgorical"),