ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

GenerateCheckSum

  • Summary
  • Discussion
  • Syntax
  • Code sample

Summary

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

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.

Syntax

GenerateCheckSum (input_string)
ParameterExplanationData Type
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.

(The default value is None)

String

Return Value

Data TypeExplanation
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.

Code sample

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

Related topics

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

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal