ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Справка
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Картографическая платформа вашей организации

ArcGIS Desktop

Полноценная профессиональная ГИС

ArcGIS Enterprise

ГИС предприятия

ArcGIS Developers

Инструменты для встраивания приложений с местоположениями

ArcGIS Solutions

Бесплатные шаблоны карт и приложений для отрасли

ArcGIS Marketplace

Получение приложения и данных для вашей организации.

  • Документация
  • Поддержка
Esri
  • Войти
user
  • Мой профиль
  • Выход

ArcMap

  • На главную
  • Начало работы
  • Карта
  • Анализ
  • Управление данными
  • Инструменты
  • Дополнительные модули

GenerateCheckSum

  • Сводка
  • Описание
  • Синтаксис
  • Пример кода

Сводка

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

Описание

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.

Синтаксис

GenerateCheckSum (input_string)
ПараметрОбъяснениеТип данных
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.

(Значение по умолчанию — None)

String

Значение отраженного сигнала

Тип данныхОбъяснение
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.

Пример кода

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

Связанные разделы

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

ArcGIS Desktop

  • На главную
  • Документация
  • Поддержка

ArcGIS

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

Об Esri

  • О нас
  • Карьера
  • Блог Esri
  • Конференция пользователей
  • Саммит разработчиков
Esri
Расскажите нам, что вы думаете.
Copyright © 2022 Esri. | Конфиденциальность | Правовая информация