ArcGIS Desktop

  • Documentación
  • Soporte

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

GenerateCheckSum

  • Resumen
  • Debate
  • Sintaxis
  • Muestra de código

Resumen

Creates a checksum value from a list of values determined by an organization or specification requirements.

Licencia:

This function requires an ArcGIS for Aviation license.

Debate

The checksum value is used to ensure the integrity of the data based on the Cyclic Redundancy Check 32Q (CRC32Q) logic. The checksum value originates when the data is digitized and is used to verify the data's validity as it is transferred to the aeronautical information service. The value generated by this function must match the expected result so the data can be considered reliable and uncorrupted. If the checksum value does not match the value in the data, the data is considered corrupted.

For Aeronautical Information Exchange Model (AIXM) data, the checksum value includes the latitude and longitude. However, the values included in the checksum can vary by organization and specification.

Sintaxis

GenerateCheckSum (input_string)
ParámetroExplicaciónTipo de datos
input_string

The concatenated list of values from various fields for which the checksum will be generated. For example, the input string 0103039.3381E522942.8704N contains the concatenated value for the LAT_TXT and LONG_TXT fields.

(El valor predeterminado es None)

String

Valor de retorno

Tipo de datosExplicación
String

The concatenated list of values specified in the script as part of the checksum values. For example, if the latitude and longitude values are part of the checksum, they are returned as part of the string.

Muestra de código

GenerateCheckSum example

This sample script generates checksum for a shapefile with ADHP points and reports whether they match the value in the database.

# Name: GenerateCheckSumExample.py
# Description: Generates the checksum values for ADHP features and prints
#   report indicating whether they match the database value.
# Author: Esri
# Date: June 2014

# Import arcpyproduction and aviation modules
import arcpy
import arcpyproduction


# Check out Aviation license
arcpy.CheckOutExtension("Aeronautical")

# Define variables
worksp = "c:/data/ADHP_EC_CRC.shp"
fields = ['LAT_TXT','LONG_TXT', 'CRC_TXT', 'FID']
crcFld = 'CRC_TXT'

# For each row, print the CRC_TXT value
with arcpy.da.SearchCursor(worksp, fields) as cursor:
    for row in cursor:
        val = str(row[0] + row[1])
        # print val
        crcFldValue = str(row[2]).upper()
        checksum = arcpyproduction.aviation.charting.GenerateCheckSum(val)
        if (checksum.upper() == crcFldValue):
            print("Checksum for feature {} matches".format(row[3]))
        else:
            print("Checksum for feature {} does not match.\n   Db= {} || Calculated value = {}"
            .format(row[3], row[2], checksum.upper()))

# Check in Aviation license
arcpy.CheckInExtension("Aeronautical")

Temas relacionados

  • Introduction to arcpyproduction.aviation.charting
  • Creating a Python script to perform cartographic tasks on aeronautical charts

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog interno
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacidad | Legal