Skip To Content

Use ArcPy in a notebook

Several ArcPy modules are available in ArcGIS Notebooks through the Advanced notebook runtime.

With the ArcPy site package, you can perform geographic data analysis, conversion, and management. ArcPy allows you to programmatically run all ArcGIS standard geoprocessing tools and provides helper functions and classes.

Learn more about ArcPy

To use ArcPy in a notebook, ArcGIS Notebook Server must be licensed with the Advanced license, and users must have the privilege to create and run ArcPy notebooks.

ArcPy modules

The modules described below are included with ArcPy in ArcGIS Notebook Server.

Data Access

The data access module, arcpy.da, is a Python module for working with data. It allows control of the edit session, edit operation, improved cursor support (including faster performance), functions for converting tables and feature classes to and from NumPy arrays, and support for versioning, replicas, domains, and subtypes workflows.

Learn more about the Data Access module

Geocoding

تسمح لك وحدة التكويد الجغرافي، arcpy.geocoding، باستكشاف خصائص محدد المواقع وتعيينها وأتمتة مهام سير عمل التكويد الجغرافي. التكويد الجغرافي هو عملية تحويل وصف الموقع - مثل زوج من الإحداثيات أو عنوان أو اسم مكان - لموقع على سطح الأرض. محدد الموقع هو الأداة المستخدمة لإجراء عمليات التكويد الجغرافي. باستخدام هذه الوحدة، يمكنك عرض الخصائص وتعديلها على محدد المواقع لضبطها وفقًا لاحتياجاتك المحددة في مجال التكويد الجغرافي عن طريق تخصيصها للأداء أو الجودة. يمكنك أيضًا استخدام هذه الوحدة لإجراء العديد من عمليات التكويد الجغرافي، بما في ذلك العثور على موقع مكان أو عنوان ما، أو العثور على أقرب مكان أو عنوان لموقع معين، أو إنشاء مجموعة من اقتراحات الإكمال التلقائي للإدخال الجزئي.

Learn more about the Geocoding module

Image Analysis

The Image Analysis module, arcpy.ia, is a Python module for managing and processing imagery and raster data. The module also includes functionality provided by the ArcGIS Image Analyst extension, such as all of the geoprocessing functions, as well as advanced functions and classes that allow you to automate your raster processing workflows.

Learn more about the Image Analysis module

Mapping

Arcpy.mp هذ وحدة Python فرعية التي تشكل جزءًا من حزمة موقع ArcPy. يتم تثبيتها باستخدام ArcGIS Pro وتتوفر لجميع التراخيص. تم تصميمها في الأساس للتعامل مع محتويات المشاريع الحالية (.aprx) وملفات الطبقة (.lyr أو .lyrx). وتوفر أيضًا وظائف للتشغيل التلقائي للاستيراد والطباعة. Arcpy.mp يمكن استخدامها للتشغيل التلقائي لإنتاج الخرائط وهي مطلوبة لإنشاء كتب خرائط لأنها تحتوي على دوال للتصدير إلى مستندات PDF وإنشائها وإدارتها.

Learn more about the Mapping module

ملاحظة:‏
The arcpy.mp module is used in ArcGIS Pro; the arcpy.mapping module is used in ArcGIS Desktop.

Metadata

وحدة البيانات التعريفية، arcpy.metadata، هي وحدة Python المستخدمة للوصول إلى البيانات التعريفية للعنصر وإدارتها. يمكنك استكشاف المعلومات التي تصف خرائطك وبياناتك وأتمتة مهام سير عملك، لا سيما لإدارة البيانات التعريفية الجغرافية المكانية المتوافقة مع المعايير.

Learn more about the Metadata module

Network Analyst

وحدة Network Analyst، arcpy.nax، هي وحدة Python حديثة سهلة الاستخدام للتعامل مع وظائف تحليل الشبكة المتوفرة مع ملحق ArcGIS Network Analyst. توفر الوصول إلى ما يلي:

  • التصنيفات التي تتيح لك إجراء جميع تحليلات الشبكة
  • التصنيفات التي تتيح لك التعامل مع المعلومات المرتبطة باتصال العناصر المختلفة التي تشكل مجموعة بيانات شبكة
  • أدوات معالجة البيانات الجغرافية التي تتيح لك معالجة المدخلات مسبقًا أو مشاركة نتائج التحليل أو التعامل مع مجموعة بيانات الشبكة
  • دوال المُساعد والتصنيفات التي يمكنك استخدامها للتعامل مع أنواع بيانات معينة تستخدمها التصنيفات التي تتيح لك إجراء تحليل الشبكة

Learn more about the Network Analyst module

The legacy module arcpy.na is not included with ArcGIS Notebooks.

Sharing

The arcpy.sharing module shares web layers using Python.

تتيح لك وحدة المشاركة إنشاء مسودة مشاركة من خريطة في مشروع ArcGIS Pro، والتي يمكن مشاركتها بعد ذلك إلى ArcGIS Enterprise أو ArcGIS Online أو ArcGIS Server. مسودة المشاركة عبارة عن مجموعة خصائص قابلة للتكوين لطبقة ويب. يعد إنشاء مسودة مشاركة الخطوة الأولى في النشر التلقائي لخريطة أو طبقة أو جدول أو قائمة طبقات وجداول إلى طبقة ويب باستخدام Python. يمكن حفظ مسودة المشاركة بعد ذلك كملف مسودة تعريف خدمة (.sddraft).

Learn more about the Sharing module

Spatial Analyst

The Spatial Analyst module is a Python module for analyzing raster data with the functionality provided by the ArcGIS Spatial Analyst extension. It provides access to all the geoprocessing tools available in the Spatial Analyst toolbox as well as other helper functions and classes that allow you to more easily automate your workflows using Python.

Learn more about the Spatial Analyst module

ملاحظة:‏

The Workflow Manager (arcpy.wmx) module is not included with ArcGIS Notebook Server.

Get started with ArcPy in a notebook

To use ArcPy in a notebook, import its library by running a cell with the following lines:

import arcpy
arcpy.GetInstallInfo()['Version']

View the sample notebooks that are included with ArcGIS Notebook Server to learn how ArcPy can be used in your notebooks.

To learn more about how to prepare the workspace environments forArcPy, see Manage content in the user workspace and Upload datasets to use with ArcPy.