Classes:
    Bare or compacted earth ATTEMPT
    Bare or compacted earth
    Buildings
    Elevated Greenspace
    Fountain or Pool
    Impervious and unknown
    Roads
    Shrub
    Trees
    Turf
    Vegetation Superclass
    Vegetation Superclass 2010
    Water

Process: Main:
    Rule Set Version 123
         \\ Create NDVI and nDSM layers via arithmatic functions
         do
              layer arithmetics: layer arithmetics (val "(NIR2010-Red2010)/(NIR2010+Red2010)", layer NDVI2010[32Bit float ])
              layer arithmetics: layer arithmetics (val "(NIR2013-Red2013)/(NIR2013+Red2013)", layer NDVI2013[32Bit float ])
              layer arithmetics: layer arithmetics (val "DSM-DEM", layer nDSM[32Bit float ])
         \\ Segment into pixels
         \\ 
         do
              chessboard segmentation: chess board: 1 creating 'New Level'
         \\ Classify water using NWI
         do
              classification: unclassified with "CIRC39_CLA": Water > 1  at  New Level: Water
         \\ Use OSM (file has been modified in ArcMap by AWA to approximate 2010-2013 features) to classify buildings (exclusive of skyway structures) NOTE: errors of omission --- especially residential buildings are not digitized in this layer.
         do
              classification: unclassified with "osm_id": Buildings >= 0  and ("type": Buildings <> "skyway" ) at  New Level: Buildings
         \\ Find pixels with veg signal that overlap with building layer. This begins extraction and delineation of elevated greenspaces.
         do
              classification: Buildings with Mean NDVI2013 > 0.1  at  New Level: Elevated Greenspace
              classification: Buildings with Mean NDVI2010 > 0.1  and (Mean NDVI2013 > -0.3 ) at  New Level: Elevated Greenspace
         \\ Find pixels with veg signal using NAIP 2010 and 2013. Classify separately at first then bring them all into one "Vegetation Superclass" classification.
         do
              classification: unclassified with Mean NDVI2013 > 0.13  at  New Level: Vegetation Superclass
              classification: unclassified with Mean NDVI2010 > 0.1  and (Mean NDVI2013 > -0.3 ) at  New Level: Vegetation Superclass 2010
              do
                   classification: Vegetation Superclass 2010 at  New Level: Vegetation Superclass
         \\ Refine delineation of Elevated Greenspace objects. Remedy some errors of comission caused where trees overhang low buildings and are therefore initially interpreted as elevated greenspace.
         do
              merge region: Elevated Greenspace at  New Level: merge region
              merge region: Buildings at  New Level: merge region
              do
                   classification: Elevated Greenspace with Rel. border to Buildings <= 0.65  at  New Level: Vegetation Superclass
                   classification: Buildings with Rel. border to Elevated Greenspace = 1  at  New Level: Elevated Greenspace
                   merge region: Elevated Greenspace at  New Level: merge region
                   classification: Elevated Greenspace with Area <= 4 Pxl at  New Level: Buildings
                   classification: Elevated Greenspace with Width <= 2 Pxl at  New Level: Buildings
                   merge region: Buildings at  New Level: merge region
         \\ Produce edge extraction and sigma layers to discern more about texture
         do
              edge extraction lee sigma: edge extraction lee sigma (10.0, Dark) 'NDVI2010' => 'LS_DarkNDVI2010'
              median filter: median filter (7 x 1): 'LS_DarkNDVI2010' => 'LS_DarkNDVI2010_Median7'
              edge extraction lee sigma: edge extraction lee sigma (10.0, Dark) 'NDVI2013' => 'LS_DarkNDVI2013'
              median filter: median filter (7 x 1): 'LS_DarkNDVI2013' => 'LS_DarkNDVI2013_Median7'
         \\ DIFFERENT FROM MINNEAPOLIS! Different layers used for segmentation and different thresholds for classification.
         do
              multiresolution segmentation: Vegetation Superclass at  New Level: 10 [shape:0.9 compct.:0.1]
              assign class: Vegetation Superclass with Mean nDSM <= 0.33  at  New Level: Turf
              assign class: Vegetation Superclass with Mean nDSM > 0.33  and Mean nDSM < 0.66  at  New Level: Shrub
              assign class: Vegetation Superclass with Mean nDSM >= 0.66  at  New Level: Trees
         do
              classification: Trees with Min. pixel value Blue2010 = 81  and Min. pixel value Green2010 = 25  and Min. pixel value Green2013 = 121  and Min. pixel value NIR2010 = 1  at  New Level: Elevated Greenspace
              classification: Trees with Min. pixel value Blue2010 = 90  and Min. pixel value Green2010 = 43  and Min. pixel value Green2013 = 123  and Min. pixel value NIR2010 = 1  at  New Level: Elevated Greenspace
              classification: Buildings with Rel. border to Elevated Greenspace = 1  at  New Level: Elevated Greenspace
              merge region: Elevated Greenspace at  New Level: merge region
         \\ 50 minutes --- segment unclassified areas using NAIP (2010 and 13) as well as intensity to extract bare earth
         do
              multiresolution segmentation: unclassified at  New Level: 10 [shape:0.7 compct.:0.3]
              do
                   classification: unclassified with Mean NDVI2013 >= 0.036  at  New Level: Bare or compacted earth
                   classification: unclassified with Mean NDVI2010 >= 0.04  at  New Level: Bare or compacted earth
              \\ LOCATE fountain objects and classify them using very narrow specs
              do
                   assign class: unclassified with Min. pixel value Green2010 = 53  and Min. pixel value Green2013 = 101  and Area = 39 Pxl and Min. pixel value Blue2010 = 102  and Min. pixel value Red2010 = 28  and Min. pixel value Red2013 = 107  at  New Level: Fountain or Pool
                   assign class: unclassified with Min. pixel value Green2010 = 53  and Min. pixel value Green2013 = 91  and Area = 136 Pxl and Min. pixel value Blue2010 = 104  and Min. pixel value Red2010 = 26  and Min. pixel value Red2013 = 81  at  New Level: Fountain or Pool
                   assign class: unclassified with Min. pixel value Green2010 = 112  and Min. pixel value Green2013 = 87  and Area = 39 Pxl and Min. pixel value Blue2010 = 149  and Min. pixel value Red2010 = 105  and Min. pixel value Red2013 = 84  at  New Level: Fountain or Pool
                   assign class: unclassified with Min. pixel value Green2010 = 55  and Min. pixel value Green2013 = 96  and Area = 31 Pxl and Min. pixel value Blue2010 = 115  and Min. pixel value Red2010 = 35  and Min. pixel value Red2013 = 94  at  New Level: Fountain or Pool
                   assign class: unclassified with Min. pixel value Green2010 = 58  and Min. pixel value Green2013 = 102  and Area = 75 Pxl and Min. pixel value Blue2010 = 128  and Min. pixel value Red2010 = 29  and Min. pixel value Red2013 = 91  at  New Level: Fountain or Pool
                   merge region: Fountain or Pool at  New Level: merge region
         \\ merge water pixels for simplification
         do
              merge region: Water at  New Level: merge region
         \\ Classify roads using OSM layer --- footways were omitted before 3 meter buffer polygon layer was made.
         do
              chessboard segmentation: unclassified at  New Level: chess board: 1
              assign class: unclassified with "BUFF_DIST": RoadBuffer = 3  at  New Level: Roads
              merge region: Roads at  New Level: merge region
         \\ 20 minutes -- DIFFERENT FROM MINNEAPOLIS - object shape is 10 instead of 18
         do
              multiresolution segmentation: unclassified at  New Level: 10 [shape:0.9 compct.:0.1]
              do
                   assign class: unclassified with Mean NDVI2010 >= 0.01  at  New Level: Bare or compacted earth ATTEMPT
                   assign class: Bare or compacted earth ATTEMPT at  New Level: Bare or compacted earth
                   assign class: unclassified with Mean NDVI2013 >= -0.0114  at  New Level: Bare or compacted earth ATTEMPT
                   assign class: Bare or compacted earth ATTEMPT at  New Level: Bare or compacted earth
         \\ Clean up tiny objects
         do
              merge region: Bare or compacted earth at  New Level: merge region
              merge region: Turf at  New Level: merge region
              merge region: Trees at  New Level: merge region
              merge region: Shrub at  New Level: merge region
              classification: Bare or compacted earth with Area <= 9 Pxl and Rel. border to Turf >= 0.75  at  New Level: Turf
              classification: Bare or compacted earth with Area <= 9 Pxl and Rel. border to Trees >= 0.75  at  New Level: Trees
              classification: Bare or compacted earth with Area <= 9 Pxl and Rel. border to Shrub >= 0.75  at  New Level: Shrub
              merge region: Turf at  New Level: merge region
              merge region: Trees at  New Level: merge region
              merge region: Shrub at  New Level: merge region
         \\ Most all unclassified objects now become "Impervious and unknown" --- identify fountains as possible habitat features object-by-object because I cannot find a universal attribute to extract them.
         do
              assign class: unclassified at  New Level: Impervious and unknown
         do
              merge region: Impervious and unknown at  New Level: merge region
              \\ Clean up tiny objects
              do
                   assign class: Bare or compacted earth, Shrub, Trees, Turf with Area <= 4 Pxl and Rel. border to Impervious and unknown >= 0.5  at  New Level: Impervious and unknown
                   merge region: Impervious and unknown at  New Level: merge region
                   do
                        merge region: Impervious and unknown at  New Level: merge region
                        merge region: Turf at  New Level: merge region
         \\ Clean up tiny objects that are engulfed within road features.
         do
              assign class: Bare or compacted earth, Buildings, Elevated Greenspace, Impervious and unknown, Shrub, Trees, Turf with Area <= 4 Pxl and Rel. border to Roads = 1  at  New Level: Roads
              merge region: Roads at  New Level: merge region
         \\ Export classification product as a shapefile
         do
              export vector layer: at  New Level: export object shapes to ObjectShapes