Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise NameLoad BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise NameLoad BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num If UnaryOpNot CompareEq Call NameLoad NameLoad Num body Assign NameStore Str AugAssignAdd NameStore Call AttributeLoad Str attr NameLoad Raise NameLoad NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise NameLoad BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body Raise NameLoad BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise NameLoad BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Print Str Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpDiv BinOpSub NameLoad NameLoad NameLoad If BoolOpOr CompareLt NameLoad Num CompareLt NameLoad Num body If CompareNotIn SubscriptLoad NameLoad Slice Num NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num Num Assign NameStore SubscriptLoad NameLoad Index TupleLoad Num Num If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body If CompareGt BinOpDiv NameLoad Call NameLoad Call NameLoad NameLoad BinOpDiv Call NameLoad NameLoad Num body AugAssignAdd NameStore Num Print BinOpAdd Call NameLoad NameLoad Str AugAssignAdd NameStore Num If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str If CompareGt Call NameLoad NameLoad Num body Assign NameStore Str AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpAdd Call NameLoad Call NameLoad NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str For NameStore NameLoad body AugAssignAdd NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad SubscriptLoad NameLoad Index Num Str Call NameLoad SubscriptLoad NameLoad Index Num Str Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Num Assign NameStore Num For NameStore NameLoad body If UnaryOpNot CompareIn Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num orelse Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num If CompareGt NameLoad Num body Assign NameStore Str AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpAdd Call NameLoad NameLoad Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str AugAssignAdd NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Delete NameDel Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str Call NameLoad BinOpSub NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str If CompareNotIn AttributeLoad SubscriptLoad NameLoad Index Num attr ListLoad Str Str body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num If BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str body AugAssignAdd NameStore Str Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword Str keyword AttributeLoad NameLoad attr If BoolOpAnd CompareGt Call NameLoad NameLoad Num Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str If CompareGt Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num orelse Assign NameStore Str Assign NameStore Str Assign NameStore BinOpAdd ListLoad NameLoad NameLoad Str ListComp Str comprehension NameStore AttributeLoad NameLoad attr Assign NameStore BinOpAdd ListLoad NameLoad NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Delete NameDel decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num Delete NameDel Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore NameLoad orelse Print SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore ListLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str keyword Str keyword AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Str If CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str AttributeLoad NameLoad attr Str Print Str Assign NameStore Num Assign NameStore Num While CompareLt NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore ListLoad NameLoad NameLoad Num If NameLoad body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num Num Index TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr Num Num If CompareGt NameLoad NameLoad body Continue Assign SubscriptStore NameLoad Index Num BinOpAdd NameLoad BinOpMult SubscriptLoad NameLoad Index Num NameLoad Assign SubscriptStore NameLoad Index Num BinOpAdd NameLoad BinOpMult SubscriptLoad NameLoad Index Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num If AttributeLoad NameLoad attr body If CompareGt BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr BinOpDiv Call NameLoad NameLoad Num body AugAssignAdd NameStore Num Print BinOpAdd Call NameLoad NameLoad Str Print Str Expr Call AttributeLoad NameLoad attr Delete NameDel decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore ListComp NameLoad comprehension NameStore NameLoad CompareEq Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str body If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For NameStore ListComp NameLoad comprehension NameStore NameLoad CompareEq Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str body If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For NameStore ListComp NameLoad comprehension NameStore NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body If Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Return NameLoad orelse Return NameLoad Delete NameDel handlers ExceptHandler body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num attr If CompareIs NameLoad NameLoad body If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr Num attr Num body Print Str Return Num orelse Return NameLoad orelse Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr
N/A N/A 
Created on Jan 31, 2011

This module creates a Merged Data Set (MDS)
from an input CSV and directory 
or list of rasters. The MDS consists of three
header lines 1st is a x, y, ResponseBinary, 
{other info fields}, then a list of raster covariates.
The next header line contains ones and zeros for each of the 
raster covariates and indicates if the covariate is to be 
used in subsequent analyses.  The last header line contains
the full network path the raster dataset for that covariate.
After the header lines comes the data which is the 
covariate values pulled from the raster cell 
with those coordinates. 

@author: talbertc

 N/A sys N/A csv N/A os N/A time N/A random N/A shutil osgeo gdalconst osgeo gdal optparse OptionParser N/A utilities MDSBuilder N/A object N/A N/A Takes a csv with animal location x,y and attributes each with the values 
    extracted from each of the grids (covariates) indicated in the supplied 
    csv list of files
     __init__ N/A N/A self N/A N/A N/A N/A self verbose False N/A N/A self inputsCSV N/A N/A self inputs N/A N/A N/A self fieldData N/A N/A self outputMDS N/A N/A self probsurf N/A N/A self pointcount 0 N/A N/A self NDFlag -9999 N/A N/A self deleteTmp False N/A N/A self logger None N/A validateArgs N/A N/A self N/A N/A N/A N/A N/A N/A N/A os path exists N/A self fieldData N/A N/A RuntimeError N/A Could not find CSV file of fieldData provided.  Please check input file:  N/A str N/A self fieldData N/A N/A N/A N/A N/A os path exists N/A self inputsCSV N/A N/A RuntimeError N/A Could not find CSV file of inputs provided.  Please check input file:  N/A str N/A self inputsCSV N/A reader N/A N/A csv reader N/A open N/A self inputsCSV r N/A header N/A N/A reader next N/A missingfiles N/A N/A row reader N/A N/A N/A N/A N/A self isRaster N/A row N/A 0 N/A N/A N/A N/A missingfiles append N/A row N/A 0 N/A N/A N/A N/A len missingfiles 0 N/A N/A msg One or more of the files in the input covariate list CSV could not be identified as rasters by GDAL. N/A msg N/A N/A join missingfiles N/A RuntimeError msg N/A N/A N/A self probsurf N/A N/A N/A N/A N/A self isRaster N/A self probsurf N/A N/A RuntimeError N/A N/A The supplied probability surface,  N/A self probsurf , does not appear to be a valid raster. N/A N/A N/A N/A self pointcount N/A int N/A self pointcount N/A N/A N/A N/A RuntimeError N/A N/A The supplied point count parameter,  N/A self pointcount , does not appear to be an integer N/A outDir N/A N/A N/A N/A os path split N/A self outputMDS N/A 0 N/A N/A N/A N/A N/A os path exists outDir N/A N/A RuntimeError N/A N/A The directory of the supplied MDS output file path,  N/A self outputMDS , does not appear to exist on the filesystem N/A N/A N/A self logger None N/A N/A N/A self logger N/A N/A utilities logger outDir N/A self verbose N/A N/A self writetolog N/A N/A self logger writetolog N/A run N/A N/A self N/A N/A N/A 
        This routine loops through a set of rasters and creates an MDS file
         N/A N/A N/A self validateArgs N/A N/A N/A self writetolog 
Running MDSBuilder True True N/A startTime N/A N/A time time N/A N/A N/A gdal UseExceptions N/A N/A N/A gdal AllRegister N/A N/A N/A self constructEmptyMDS N/A N/A N/A self pointcount 0 N/A N/A N/A N/A self addBackgroundPoints N/A outputRows N/A N/A self readInPoints N/A input N/A self inputs N/A N/A inputND N/A N/A self getND input N/A rasterDS N/A N/A gdal Open input N/A gdalconst GA_ReadOnly N/A rows N/A rasterDS RasterYSize N/A cols N/A rasterDS RasterXSize N/A band N/A N/A rasterDS GetRasterBand 1 N/A transform N/A N/A rasterDS GetGeoTransform N/A xOrigin N/A transform N/A 0 N/A yOrigin N/A transform N/A 3 N/A pixelWidth N/A transform N/A 1 N/A pixelHeight N/A transform N/A 5 N/A N/A self verbose N/A N/A N/A N/A self writetolog N/A     Extracting raster values for  input N/A N/A pcntDone 0 N/A i 1 N/A badpoints N/A N/A row outputRows N/A N/A x N/A float N/A row N/A 0 N/A y N/A float N/A row N/A 1 N/A xOffset N/A int N/A N/A x xOrigin pixelWidth N/A yOffset N/A int N/A N/A y yOrigin pixelHeight N/A N/A N/A xOffset 0 N/A yOffset 0 N/A N/A N/A N/A row N/A 3 badpoints N/A N/A N/A N/A badpoints append N/A row N/A 3 N/A N/A N/A row append N/A str N/A self NDFlag N/A N/A N/A N/A data N/A N/A band ReadAsArray xOffset yOffset 1 1 N/A value N/A data N/A N/A 0 0 N/A N/A value inputND N/A N/A N/A N/A row append value N/A N/A N/A N/A row append N/A str N/A self NDFlag N/A N/A N/A N/A N/A N/A badpoints append N/A row N/A 3 N/A N/A N/A row append N/A str N/A self NDFlag N/A N/A self verbose N/A N/A N/A N/A i N/A float N/A len outputRows N/A N/A float pcntDone 100 N/A N/A pcntDone 10 N/A N/A N/A str pcntDone ... N/A i 1 N/A N/A self verbose N/A N/A N/A N/A self writetolog     Done N/A N/A N/A len badpoints 0 N/A N/A msg 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! N/A msg 
!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 N/A msg N/A N/A str N/A len badpoints  point fell outside the Covariate coverage. N/A msg 
These points were assigned the NoData value of -9999 for all covariates and will N/A msg not be included in subsequent models.
     These points are: N/A badpoint badpoints N/A N/A msg N/A N/A N/A N/A N/A      x: N/A str N/A row N/A 0  Y:  N/A str N/A row N/A 1  response:  N/A str N/A row N/A 2 N/A N/A N/A self writetolog msg N/A outputMDS N/A N/A csv writer N/A open N/A self outputMDS ab N/A thrownOut 0 N/A kept 0 N/A row outputRows N/A N/A N/A N/A N/A str N/A self NDFlag N/A row N/A 3 N/A N/A N/A N/A outputMDS writerow row N/A kept 1 N/A N/A N/A N/A outputMDS writerow row N/A thrownOut 1 N/A N/A thrownOut 0 N/A N/A msg 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! N/A msg 
!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 N/A msg N/A N/A str thrownOut  points had 'nodata' in at least one of the covariates. N/A msg 
These points will not be considered in subsequent Models. N/A msg 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! N/A msg 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! N/A N/A N/A self writetolog msg N/A outputMDS N/A output_shp N/A N/A N/A self outputMDS replace .csv .mds N/A N/A N/A utilities mds_to_shape N/A self outputMDS output_shp N/A endTime N/A N/A time time N/A N/A self deleteTmp N/A N/A N/A N/A os remove N/A self fieldData N/A N/A self verbose N/A N/A N/A N/A self writetolog Finished running MDSBuilder True True N/A N/A N/A self writetolog N/A N/A     The process took  N/A str N/A endTime startTime  seconds N/A constructEmptyMDS N/A N/A self N/A N/A N/A Creates the triple header line format of our output file.
        Also parses the inputs file to append the '_categorical' flag 
        to the covariate names of all categorical inputs.
         N/A field_data_CSV N/A N/A csv reader N/A open N/A self fieldData r N/A orig_header N/A N/A field_data_CSV next N/A full_header N/A x y N/A N/A N/A N/A orig_header N/A 2 lower N/A responsebinary responsecount N/A N/A N/A N/A full_header append responseBinary N/A N/A N/A N/A full_header append N/A orig_header N/A 2 N/A inputs_CSV N/A N/A csv reader N/A open N/A self inputsCSV r N/A inputs_header N/A N/A inputs_CSV next N/A N/A self inputs N/A N/A rasters N/A N/A row inputs_CSV N/A N/A temp_raster N/A row N/A 0 N/A raster_shortname N/A N/A N/A N/A os path split temp_raster N/A 1 N/A raster_shortname N/A N/A N/A N/A os path splitext raster_shortname N/A 0 N/A N/A N/A N/A len row 1 N/A N/A row N/A 1 1 N/A N/A raster_shortname _categorical N/A N/A rasters N/A raster_shortname temp_raster N/A keys N/A N/A rasters keys N/A N/A N/A keys sort key N/A N/A N/A s N/A N/A N/A s lower N/A N/A N/A keys sort key N/A N/A N/A s N/A N/A N/A s lower N/A key keys N/A N/A N/A N/A N/A self inputs append N/A rasters N/A key N/A N/A N/A full_header append key N/A oFile N/A open N/A self outputMDS wb N/A fOut N/A N/A csv writer oFile delimiter , quotechar " quoting N/A csv QUOTE_MINIMAL N/A N/A N/A N/A len orig_header 7 N/A N/A N/A os path exists N/A orig_header N/A 7 N/A N/A original_field_data N/A orig_header N/A 7 N/A field_data_template N/A orig_header N/A 8 N/A N/A original_field_data N/A self fieldData N/A field_data_template NA N/A N/A N/A len inputs_header 5 N/A N/A parc_template N/A inputs_header N/A 5 N/A parc_workspace N/A inputs_header N/A 6 N/A N/A parc_template Unknown N/A parc_workspace Unknown N/A secondRow N/A N/A original_field_data field_data_template N/A 1 N/A elem N/A self inputs N/A thirdRow N/A N/A parc_template parc_workspace N/A self inputs N/A N/A N/A fOut writerow full_header N/A N/A N/A fOut writerow secondRow N/A N/A N/A fOut writerow thirdRow N/A N/A N/A oFile close N/A fOut N/A readInPoints N/A N/A self N/A N/A N/A Loop through each row in our field data and add the X, Y, response
        to our in memory list of rows to write to our output MDS file
         N/A fieldDataCSV N/A N/A csv reader N/A open N/A self fieldData r N/A origHeader N/A N/A fieldDataCSV next N/A points N/A N/A row fieldDataCSV N/A N/A N/A N/A points append N/A row N/A 3 N/A fieldDataCSV N/A points N/A addBackgroundPoints N/A N/A self N/A N/A N/A Add pointcount number of points to the supplied field data
        If a probability surface was provided the distribution will 
        follow this otherwise it will be uniform within the extent of the first of our inputs.
        No more than one per pixel is used.
         N/A N/A N/A shutil copy N/A self fieldData N/A N/A self fieldData .tmp.csv N/A N/A self fieldData N/A N/A self fieldData .tmp.csv N/A N/A self deleteTmp True N/A N/A N/A self probsurf N/A N/A rasterDS N/A N/A gdal Open N/A self probsurf N/A gdalconst GA_ReadOnly N/A useProbSurf True N/A N/A N/A N/A self inputs N/A 0 N/A rasterDS N/A N/A gdal Open N/A N/A self inputs N/A 0 N/A gdalconst GA_ReadOnly N/A useProbSurf False N/A rows N/A rasterDS RasterYSize N/A cols N/A rasterDS RasterXSize N/A band N/A N/A rasterDS GetRasterBand 1 N/A transform N/A N/A rasterDS GetGeoTransform N/A xOrigin N/A transform N/A 0 N/A yOrigin N/A transform N/A 3 N/A pixelWidth N/A transform N/A 1 N/A pixelHeight N/A transform N/A 5 N/A xRange N/A xOrigin N/A N/A xOrigin pixelWidth cols N/A yRange N/A yOrigin N/A N/A yOrigin pixelHeight rows N/A oFile N/A open N/A self fieldData ab N/A fOut N/A N/A csv writer oFile delimiter , quotechar " quoting N/A csv QUOTE_MINIMAL N/A N/A self verbose N/A N/A N/A N/A self writetolog N/A N/A     Starting generation of  N/A str N/A self pointcount  random background points,  N/A N/A N/A self probsurf N/A N/A N/A N/A self writetolog N/A N/A       using  N/A self probsurf  as the probability surface. N/A     Percent Done:     N/A foundPoints 0 N/A pcntDone 0 N/A N/A foundPoints N/A self pointcount N/A N/A x N/A N/A random randint 0 N/A cols 1 N/A y N/A N/A random randint 0 N/A rows 1 N/A tmpPixel N/A x y -9999 N/A useProbSurf N/A N/A pixelProb N/A int N/A N/A N/A band ReadAsArray N/A tmpPixel N/A 0 N/A tmpPixel N/A 1 1 1 N/A N/A 0 0 N/A rand N/A N/A random randint 1 100 N/A N/A rand pixelProb N/A N/A N/A N/A tmpPixel N/A 0 N/A xOrigin N/A N/A tmpPixel N/A 0 pixelWidth N/A N/A tmpPixel N/A 1 N/A yOrigin N/A N/A tmpPixel N/A 1 pixelHeight N/A N/A N/A fOut writerow tmpPixel N/A foundPoints 1 N/A N/A self verbose N/A N/A N/A N/A N/A float foundPoints N/A self pointcount N/A N/A float pcntDone 100 N/A N/A pcntDone 10 N/A N/A N/A str pcntDone ... N/A Done!
 N/A N/A N/A oFile close N/A fOut N/A getRasters N/A N/A self directory N/A N/A N/A rasters N/A N/A dirList N/A N/A os listdir directory N/A file N/A elem N/A elem dirList N/A N/A N/A N/A elem N/A -4 lower .tif N/A N/A N/A isRaster N/A N/A N/A os path join directory file N/A N/A N/A N/A rasters append N/A N/A N/A os path join directory file N/A file N/A elem N/A elem dirList N/A N/A N/A N/A elem N/A -4 lower .asc N/A N/A N/A isRaster N/A N/A N/A os path join directory file N/A N/A N/A N/A rasters append N/A N/A N/A os path join directory file N/A folder N/A name N/A name dirList N/A N/A N/A os path isdir N/A N/A N/A os path join directory name N/A N/A N/A isRaster N/A N/A N/A os path join directory folder N/A N/A N/A N/A rasters append N/A N/A N/A os path join directory folder N/A rasters N/A isRaster N/A N/A self filePath N/A N/A N/A Verifies that a pased file and path is recognized by
        GDAL as a raster file.
         N/A N/A N/A dataset N/A N/A gdal Open filePath N/A gdalconst GA_ReadOnly N/A N/A dataset None N/A N/A False N/A N/A True N/A dataset N/A N/A N/A N/A False N/A getND N/A N/A self raster N/A N/A N/A dataset N/A N/A gdal Open raster N/A gdalconst GA_ReadOnly N/A ND N/A N/A N/A N/A dataset GetRasterBand 1 GetNoDataValue N/A N/A ND None N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 1 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of 255 N/A 255 N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 2 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of 65536 N/A 65536 N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 3 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of 32767 N/A 32767 N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 4 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of 2147483647 N/A 2147483647 N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 5 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of 2147483647 N/A 2147483647 N/A N/A N/A N/A N/A N/A dataset GetRasterBand 1 DataType 6 N/A N/A Warning:  Could not extract NoData value.  Using assumed nodata value of -3.40282346639e+038 N/A -3.40282346639e+38 N/A N/A None N/A N/A ND N/A N/A main N/A N/A argv N/A N/A N/A usageStmt usage:  options: -f --fieldData -i --inCSV -o --output -pc --pointcount -ps --probsurf N/A desc Creates a merged dataset file (mds) from a csv of field points and rasters located in a csv listing one raster per line.  Optionally this module adds a number of background points to the output. N/A parser N/A OptionParser usage usageStmt description desc N/A N/A N/A parser add_option -v dest verbose default False action store_true help the verbose flag causes diagnostic output to print N/A N/A N/A parser add_option -f --fieldData dest fieldData help The input CSV of field data points N/A N/A N/A parser add_option -i --inCSV dest inputsCSV help The input CSV containing a list of our inputs, one per line. N/A N/A N/A parser add_option -o --output dest outputMDS help Output MDS file to save to. N/A N/A N/A parser add_option -p --probsurf dest probsurf default help Probability surface to use for generation of background points (optional) N/A N/A N/A parser add_option -c --pointcount dest pointcount default 0 help Number of random background points to add(optional) N/A N/A options args N/A N/A parser parse_args argv N/A ourMDS N/A MDSBuilder N/A N/A ourMDS verbose N/A options verbose N/A N/A ourMDS fieldData N/A options fieldData N/A N/A ourMDS inputsCSV N/A options inputsCSV N/A N/A ourMDS probsurf N/A options probsurf N/A N/A ourMDS pointcount N/A options pointcount N/A N/A ourMDS outputMDS N/A options outputMDS N/A N/A N/A ourMDS run N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A main N/A sys argv