Compute Dirty Area (Data Management)

Summary

Identifies areas within a mosaic dataset that have changed since a specified point in time. This is used commonly when a mosaic dataset is updated or synchronized, or when derived products, such as cache, need to be updated. This tool will enable you to limit such processes to only the areas that have changed.

Usage

  • This tool constructs a polygon that defines regions containing one or more mosaic dataset items that have been modified since a specified point in time.

  • This allows tools and applications that depend on the mosaic dataset for the construction of derived products, such as cache, to perform partial updates since the last time the derived products were synchronized with the mosaic dataset.

  • The date and time parameter can be specified in one of two ways:

    • XML time sting
    • Non-XML string

  • A valid XML time string must be in one of the following formats:

    • YYYY-MM-DDThh:mm:ss
    • YYYY-MM-DDThh:mm:ss.ssssZ
    • YYYY-MM-DDThh:mm:ss.ssss-00:00
    • YYYY-MM-DDThh:mm:ss+00:00
    • YYYY
    • YYYY-MM
    • YYYY-MM-DD
    • YYYY-MM-DDZ
    • YYYY-MM-DDThh
    • YYYY-MM-DDThhZ
    • YYYY-MM-DDThh:mm
    • YYYY-MM-DDThh:mmZ
    • YYYY-MM-DDThh:mm:ss
    • YYYY-MM-DDThh:mm:ssZ

  • The last possible part of the XML time strings is the time zone. The time zones specified with a Z refers to Zulu Time, or Greenwich Mean Time. You can also specify a time zone by using the positive or negative hours from Zulu Time. If you do not specify a time zone, then the local time zone will be used.

  • Valid Non-XML time strings can take on any format shown below:

    • YYYY/MM/DD hh:mm:ss.s
    • YYYY/MM/DD hh:mm:ss
    • YYYY/MM/DD hh:mm
    • YYYY/MM/DD hh
    • YYYY/MM
    • YYYY-MM-DDhhmmss.s
    • YYYY-MM-DDhhmmss
    • YYYY-MM-DDhhmm
    • YYYY-MM-DDhh
    • YYYY-MM-DD
    • YYYY-MM
    • YYYYMMDDhhmmss.s
    • YYYYMMDDhhmmss
    • YYYYMMDDhhmm
    • YYYYMMDDhh
    • YYYYMMDD
    • YYYYMM
    • YYYY

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset that you want to analyze for changes.

Mosaic Layer
Query Definition
(Optional)

SQL expression to select specific rasters within the mosaic dataset on which to compute dirty areas.

SQL Expression
Start Date and Time

Compute the areas that have changed since the input time.

XML time syntax:

  • YYYY-MM-DDThh:mm:ss
  • YYYY-MM-DDThh:mm:ss.ssssZ
  • 2002-10-10T12:00:00.ssss-00:00
  • 2002-10-10T12:00:00+00:00

Non-XML time syntax:

  • 2002/12/25 23:59:58.123
String
Output Feature Class

The feature class containing the areas that have changed.

Feature Class

arcpy.management.ComputeDirtyArea(in_mosaic_dataset, {where_clause}, timestamp, out_feature_class)
NameExplanationData Type
in_mosaic_dataset

The mosaic dataset that you want to analyze for changes.

Mosaic Layer
where_clause
(Optional)

SQL expression to select specific rasters within the mosaic dataset on which to compute dirty areas.

SQL Expression
timestamp

Compute the areas that have changed since the input time.

XML time syntax:

  • YYYY-MM-DDThh:mm:ss
  • YYYY-MM-DDThh:mm:ss.ssssZ
  • 2002-10-10T12:00:00.ssss-00:00
  • 2002-10-10T12:00:00+00:00

Non-XML time syntax:

  • 2002/12/25 23:59:58.123
String
out_feature_class

The feature class containing the areas that have changed.

Feature Class

Code sample

ComputeDirtyArea example 1 (Python window)

A Python sample for ComputeDirtyArea.

import arcpy
arcpy.ComputeDirtyArea_management("c:/workspace/fgdb.gdb/md", "#", 
                                  "2010-01-12T18:00:00.00-08:00", "dirtyarea.shp")
ComputeDirtyArea example 2 (stand-alone script)

A Python script sample for ComputeDirtyArea.

##===========================
##Compute Dirty Area
##Usage: ComputeDirtyArea_management in_mosaic_dataset {where_clause} timestamp
##                                   out_feature_class

import arcpy
arcpy.env.workspace = "c:/workspace"

# Find the area changed after 6:00pm Jan 12th 2010
arcpy.ComputeDirtyArea_management("fgdb.gdb/md", "#", "2010-01-12T18:00:00.00-08:00", "dirtyarea.shp")

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics