z-Gewichtungs-Rendering (Räumliche Statistiken)

Lizenzstufe:BasicStandardAdvanced

Zusammenfassung

Wendet ein Cold-to-Hot-Farbrendering-Schema auf ein Feld mit z-Ergebnissen an (Cold ist dabei Blau, Hot ist Rot).

Bild

Abbildung "z-Gewichtungs-Rendering"

Verwendung

Syntax

ZRenderer_stats (input_feature_class, field_to_render, output_layer_file)
ParameterErläuterungDatentyp
input_feature_class

Die Feature-Class, die ein Feld mit standardisierten Z-Ergebnissen enthält.

Feature Layer
field_to_render

Der Name des Felds, das die Z-Ergebnisse enthält.

Field
output_layer_file

Die neue Ausgabe-Layer-Datei zum Speichern der Rendering-Informationen. Sie müssen die Erweiterung .lyr als Teil des Dateinamens einschließen.

Layer File

Codebeispiel

z-Gewichtungs-Rendering – Beispiel (Python-Fenster)

Das folgende Skript im Python-Fenster veranschaulicht, wie Sie das Werkzeug "z-Gewichtungs-Rendering" verwenden.

import arcpy
arcpy.env.workspace = r"C:\data"
arcpy.ZRenderer_stats("hotspot_output.shp", "GiInvDst", "hotspot_output_rendered.lyr")
z-Gewichtungs-Rendering – Beispiel (eigenständiges Python-Skript)

Das folgende eigenständige Python-Skript veranschaulicht, wie Sie das Werkzeug "z-Gewichtungs-Rendering" verwenden.

# Perform Hot Spot Analysis for assault incidents
 
# Import system modules
import arcpy
 
# Local variables...
workspace = r"C:\data"
input = "assaults.shp"
collect_output = "collect_output.shp"
collect_count_field = "Count"
hotspot_output = "hotspot_output.shp"
hotspot_output_rendered = "hotspot_output_rendered.lyr"
z_score_field_name = "GiInvDst"
 
try:
    # Set the current workspace (to avoid having to specify the full path to the feature classes each time)
    arcpy.env.workspace = workspace
 
    # Convert assault incidents into weighted point data
    # Process: Collect Events...
    arcpy.CollectEvents_stats(input, collect_output)
 
    # Calculate Getis-Ord Gi* statistic
    # Process: Hot Spot Analysis (Getis-Ord Gi*)...
    arcpy.HotSpots_stats(collect_output, collect_count_field, hotspot_output, "INVERSE_DISTANCE", "EUCLIDEAN_DISTANCE", "NONE", "#", "#", "#")
 
    # Render hot spot analysis
    # Process: ZScore Rendering...
    arcpy.ZRenderer_stats(hotspot_output, z_score_field_name, hotspot_output_rendered)
 
except:
    # If an error occurred when running the tool, print out the error message.
    print arcpy.GetMessages(2)

Umgebung

Verwandte Themen

Lizenzierungsinformationen

ArcGIS for Desktop Basic: Ja
ArcGIS for Desktop Standard: Ja
ArcGIS for Desktop Advanced: Ja
6/5/2014