asap.materialize package
Submodules
asap.materialize.materialize_sections module
Materialize Render sections using BetterBox client
- exception asap.materialize.materialize_sections.MaterializeSectionsError[source]
Bases:
RenderModuleException
- class asap.materialize.materialize_sections.MaterializeSectionsModule(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]
Bases:
SparkModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
MaterializeSectionsParameters
- default_output_schema
alias of
MaterializeSectionsOutput
- default_schema
alias of
MaterializeSectionsParameters
- classmethod get_materialize_options(baseDataUrl=None, owner=None, project=None, stack=None, rootDirectory=None, width=None, height=None, maxLevel=None, fmt=None, maxOverviewWidthAndHeight=None, skipInterpolation=None, binaryMask=None, label=None, createIGrid=None, forceGeneration=None, renderGroup=None, numberOfRenderGroups=None, cleanUpPriorRun=None, filterListName=None, explainPlan=None, maxImageCacheGb=None, zValues=None, **kwargs)[source]
asap.materialize.render_downsample_sections module
- class asap.materialize.render_downsample_sections.RenderSectionAtScale(schema_type=None, *args, **kwargs)[source]
Bases:
RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RenderSectionAtScaleParameters
- default_output_schema
alias of
RenderSectionAtScaleOutput
- default_schema
alias of
RenderSectionAtScaleParameters
- class asap.materialize.render_downsample_sections.WithThreadPool(*args, **kwargs)[source]
Bases:
ThreadPool
asap.materialize.schemas module
- class asap.materialize.schemas.Bounds(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
minX
minX of bounds
None
int
maxX
maxX of bounds
None
int
minY
minY of bounds
None
int
maxY
maxY of bounds
None
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.DeleteMaterializedSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.DeleteMaterializedSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
ArgSchema
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
minZ
no description
(REQUIRED)
int
maxZ
no description
(REQUIRED)
int
basedir
base directory for materialization
(REQUIRED)
str
pool_size
size of pool to use to delete files
NA
int
tilesource
no description
5
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.MaterializeSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
zValues
no description
(REQUIRED)
int
rootDirectory
no description
(REQUIRED)
str
materializedDirectory
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.MaterializeSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
ArgSchema
,MaterializedBoxParameters
,ZRangeParameters
,RenderParametersRenderWebServiceParameters
,SparkParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
masterUrl
spark master url. For local execution local[num_procs,num_retries]
(REQUIRED)
str
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of target collection
NA
str
project
project fo target collection
NA
str
render
no description
NA
dict
minZ
minimum Z integer
NA
int
maxZ
maximum Z integer
NA
int
stack
stack fromw which boxes will be materialized
(REQUIRED)
str
rootDirectory
directory in which materialization directory structure will be created (structure is <rootDirectory>/<project>/<stack>/<width>x<height>/<mipMapLevel>/<z>/<row>/<col>.<fmt>)
(REQUIRED)
str
width
width of flat rectangular tiles to generate
(REQUIRED)
int
height
height of flat rectangular tiles to generate
(REQUIRED)
int
maxLevel
maximum mipMapLevel to generate.
0
int
fmt
image format to generate mipmaps – PNG if not specified
NA
str
maxOverviewWidthAndHeight
maximum pixel size for width or height of overview image. If excluded or 0, no overview generated.
NA
int
skipInterpolation
whether to skip interpolation (e.g. DMG data)
NA
bool
binaryMask
whether to use binary mask (e.g. DMG data)
NA
bool
label
whether to generate single color tile labels rather than actual images
NA
bool
createIGrid
whther to create an IGrid file
NA
bool
forceGeneration
whether to regenerate existing tiles
NA
bool
renderGroup
index (1-n) identifying coarse portion of layer to render
NA
int
numberOfRenderGroups
used in conjunction with renderGroup, total number of groups being used
NA
int
filterListName
Apply specified filter list to all renderings
NA
str
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
cleanUpPriorRun
whether to regenerate most recently generated boxes of an identical plan. Useful for rerunning failed jobs.
NA
bool
explainPlan
whether to perform a dry run, logging as partition stages are run but skipping materialization
NA
bool
maxImageCacheGb
maximum image cache in GB of tilespec level 0 data to cache per core. Larger values may degrade performance due to JVM garbage collection.
2.0
float
zValues
z indices to materialize
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.RenderSectionAtScaleOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
image_directory
Directory in which the downsampled section images are saved
(REQUIRED)
str
temp_stack
The temp stack that was used to generate the downsampled sections
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.RenderSectionAtScaleParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
input_stack
Input stack to make the downsample version of
(REQUIRED)
str
image_directory
Directory to save the downsampled sections
(REQUIRED)
str
imgformat
Image format (default - png)
png
str
doFilter
Apply filtering before rendering
True
bool
fillWithNoise
Fill image with noise (default - False)
False
bool
scale
scale of the downsampled sections
(REQUIRED)
float
minZ
min Z to create the downsample section from
-1
int
maxZ
max Z to create the downsample section from
-1
int
filterListName
Apply specified filter list to all renderings
NA
str
bounds
no description
None
dict
use_stack_bounds
Do you want to use stack bounds while downsampling?. Default=False
False
bool
pool_size
number of parallel threads to use
20
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.ValidateMaterializationOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
basedir
no description
(REQUIRED)
str
failures
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.ValidateMaterializationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
ArgSchema
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
minRow
minimum row to attempt to validate tiles. Will attempt to use stack bounds if None
NA
int
maxRow
no description
NA
int
minCol
no description
NA
int
maxCol
no description
NA
int
minZ
no description
(REQUIRED)
int
maxZ
no description
(REQUIRED)
int
ext
no description
png
str
basedir
base directory for materialization
(REQUIRED)
str
pool_size
size of pool to use to investigate image validity
NA
int
- opts = <marshmallow.schema.SchemaOpts object>