arcgis-python-api
Use ArcGIS API for Python for GIS administration, spatial dataframes, feature/raster analysis, mapping, location services, geospatial deep learning, app automation, and Knowledge Graph workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- arcgis-python-api
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use ArcGIS API for Python for GIS administration, spatial dataframes, feature/raster analysis, mapping, location services, geospatial deep learning, app automation, and Knowledge Graph workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/deployment-and-sample-operations.md5.2 KB
- 参考文档references/installation-and-runtime.md5.0 KB
- 参考文档references/repo-provenance.md3.8 KB
- 参考文档references/repo-routing-metadata.json499 B
- 参考文档references/troubleshooting.md5.0 KB
- 脚本scripts/check_arcgis_environment.py6.3 KB
03 SKILL.md 正文
ArcGIS API for Python repo skill
Use this skill when a task involves the arcgis Python package, ArcGIS Online or ArcGIS Enterprise automation, GIS content administration, spatially enabled dataframes, feature layers, maps, geocoding, routing, geoenrichment, imagery/raster analysis, arcgis.learn, StoryMaps, Experience Builder, item dependency graphs, Knowledge Graphs, or ArcGIS AI-powered services.
This repository is a documentation and sample-gallery checkout for the separately distributed arcgis package. Use the bundled references and scripts here instead of reopening the original checkout's notebooks or scripts.
Start safely
- Read installation and runtime notes before choosing a package/runtime.
- Run
python scripts/check_arcgis_environment.pyfor a local import/signature smoke. The script never opens credentials, calls ArcGIS services, downloads data, trains models, or mutates content. - Identify whether the user task is read-only, service-backed, credentialed, credit-consuming, or destructive.
- If credentials, target portal, service privileges, data, or hardware are missing, provide a dry-run plan or local validation only.
- Route to exactly the sub-skill that owns the main workflow, then combine sub-skills only for cross-workflow tasks.
Install baseline
The repository version evidence pins the 2.4.1 family. For a local user-managed environment:
python -m pip install "arcgis==2.4.1.*"
python -m pip install "arcgis-mapping==4.31.*" # needed for map widget workflows
python scripts/check_arcgis_environment.py
Prefer conda/Pixi or ArcGIS Pro-managed environments when the workflow depends on compiled geospatial libraries, ArcGIS Pro, local geodatabases, or notebook widgets. Never mutate a user's ArcGIS Pro or conda base environment without approval.
Route map
| User task | Use this sub-skill | Read first |
|---|---|---|
| Connect to ArcGIS Online/Enterprise, manage profiles, content, items/resources, users/groups, org admin, servers, collaboration, clone/offline backups | gis-admin-content | Its admin/content workflow and troubleshooting references |
Query/edit/append feature layers, work with FeatureSet, Spatially Enabled DataFrames, geometry, replicas/sync, branch versioning, or feature/spatial analysis services |
features-dataframes-analysis | Its workflows reference and local_geometry_smoke.py |
| Build maps/web maps/scenes, configure symbols/renderers/popups, geocode/reverse/batch geocode, route/VRP/service areas/OD matrices, or enrich/report demographics | mapping-location-services | Its service API reference and import smoke |
Use image services, ImageryLayer, raster functions/chains, raster analytics jobs, multidimensional rasters, or orthomapping |
imagery-raster-analysis | Its workflow guide and raster import smoke |
Use arcgis.learn for imagery/text/tabular/time-series/point-cloud geospatial ML, choose model families, train/infer/export/deploy, or fix torchvision/GPU dependency issues |
deep-learning | Its optional dependency probe and model catalog |
| Automate StoryMaps, Experience Builder, Hub, dashboards, Tracker/Workforce/Survey URLs, item dependency graphs, Knowledge Graphs, or AI-powered ArcGIS services | apps-knowledge-ai-services | Its module probe and app/Knowledge workflow reference |
Shared references
- Repository provenance: source commit, package versions, evidence paths, and refresh baseline.
- Installation and runtime notes: package names, runtime choices, optional dependencies, credentials, services, and backend limitations.
- Deployment and sample operations: distilled Docker, Lambda, Azure Functions, notebook gallery, and unsafe sample-maintenance script guidance.
- Cross-cutting troubleshooting: import/version, optional dependency, credentials, service, and cross-sub-skill failure handling.
- Router metadata: structured placement for managed repo-skill routing.
Non-negotiable safety rules
- Never fabricate ArcGIS credentials, profiles, item ids, organization URLs, service privileges, or credit availability.
- Treat create, publish, update, delete, clone, share, analyze, route, enrich, raster, app save, Knowledge Graph edit, and model publish calls as potentially mutating, billable, or both.
- Do not run credentialed or destructive source sample scripts as a shortcut. Their safe patterns are distilled into this skill's references.
- Do not claim that imports prove hosted service support, widget rendering, GPU training, raster analytics, network analysis, geoenrichment, Knowledge Graph service access, or ArcGIS AI services.
- Use
verify_cert=Trueby default. Only useverify_cert=Falsefor a controlled diagnostic against a known non-production/self-signed endpoint after warning the user. - Keep passwords, tokens, API keys, OAuth secrets, certificate passwords, and profile contents out of code, logs, and final answers.
Cross-workflow patterns
- CSV to hosted feature layer to map: content/publish with
gis-admin-content, schema/edit validation withfeatures-dataframes-analysis, visualization withmapping-location-services. - Imagery model inference and publishing: dependency/GPU/model checks with
deep-learning, image-service/raster output decisions withimagery-raster-analysis, portal publish/share withgis-admin-content. - StoryMap clone with dependent layers: app relationship logic with
apps-knowledge-ai-services, item ownership/resources/sharing withgis-admin-content, feature-layer schema only if data edits are needed. - Enriched routing or territory analysis: geocode/network/enrich with
mapping-location-services, local geometry/SEDF or hosted feature prep withfeatures-dataframes-analysis.
Verification status to preserve
The generated skill was verified for base CPU/import/signature behavior of the installed arcgis and arcgis-mapping packages. No live ArcGIS service calls, destructive admin scripts, cloud deployments, notebook executions, large downloads, or GPU model training were run during production. Optional surfaces such as arcgis.learn, arcgis.ai, and dashboard module names are explicitly probed by sub-skill scripts before use.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).