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 your 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

وحدة الوصول إلى البيانات، arcpy.da، هي وحدة Python للتعامل مع البيانات. وتتيح الوصول إلى جلسة التحرير وعملية التحرير ودعم المؤشر المحسّن (بما في ذلك زيادة سرعة الأداء)، ودوال تحويل الجداول وتصنيفات المعالم إلى صفائف NumPy والعكس ودعم الإصدار والنسخ المماثلة والمجالات ودورات سير عمل الأنواع الفرعية.

Learn more about the Data Access module

Geocoding

The Geocoding module, arcpy.geocoding, allows you to explore and set locator properties and automate geocoding workflows. Geocoding is the process of transforming a description of a location—such as a pair of coordinates, an address, or a name of a place—to a location on the earth's surface. A locator is the tool used to perform geocoding operations. With this module, you can view and modify properties on the locator to tune it to your specific geocoding needs by customizing it for performance or quality. You can also use this module to perform various geocoding operations, including finding the location of a place or address, finding the closest place or address to a given location, or generating a set of autocomplete suggestions for partial input.

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

The Metadata module, arcpy.metadata, is a Python module for accessing and managing an item's metadata. You can explore information describing your maps and data and automate your workflows, particularly for managing standards-compliant geospatial metadata.

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

وحدة Spatial Analyst، arcpy.sa، عبارة عن وحدة Python لتحليل البيانات النقطية باستخدام الوظائف التي يوفرها ملحق تطبيق ArcGIS Spatial Analyst. وتوفر الوصول إلى جميع أدوات معالجة البيانات الجغرافية المتوفرة في مربع الأدواتمربع أدوات Spatial Analyst بالإضافة إلى الدوال والتصنيفات الأخرى التي تتيح لك أتمتة دورات سير عمل معالجة البيانات النقطية.

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 own notebooks.