ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

GenerateCheckSum

  • Résumé
  • Discussion
  • Syntaxe
  • Exemple de code

Résumé

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

Licence :

This function requires an ArcGIS Aviation license.

Discussion

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.

Syntaxe

GenerateCheckSum (input_string)
ParamètreExplicationType de données
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.

(La valeur par défaut est None)

String

Valeur renvoyée

Type de donnéesExplication
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.

Exemple de code

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")

Rubriques connexes

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

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2021 Esri. | Confidentialité | Légal