Extended functionality for Esri's ArcPy site-package
Project description
========
arcpyext
========
arcpyext provides a collection of helper functions that make common tasks performed with the Esri ArcPy site-package
easier to accomplish. It was chiefly developed to service a command-line tool set (agstools) for managing ArcGIS
environments, but can readily be used within other scripts.
Features
===============
Currently, arcpyext has functionality for changing data sources for map document layers, preparing map documents for
publishing, and performing CRUD operations within an edit session on a geo-database.
arcpyext.data
-------------
The *data* module wraps the basic create, update and delete operations in an edit session, automatically starting/
stoping/aborting an edit operation as appropriate. The functions simply wrap the appropriate *arcpy.da* cursors, so
functionally they work identically. Also provided is a handy function for reading rows into a list.
Example:
.. code-block:: python
import arcpy
import arcpyext.data
#WORKSPACE = "path/to/sde_database.sde"
WORKSPACE = "path/to/geodatabase.gdb"
TABLE = "Countries"
edit_session = arcpy.da.Editor(WORKSPACE)
edit_session.startEditing()
try:
arcpyext.data.delete_rows(edit_session, TABLE, "Name LIKE 'A%'", ('Name'))
except RuntimeError, re:
edit_session.stopEditing(False)
edit_session.stopEditing(True)
del edit_session
See the associated tests for more code examples.
arcpyext.mapping
----------------
The *mapping* module provides features for changing the data sources of a layer (or layers) in a map document. Data
source changes can be templated (with simple match criteria) and then applied across an entire map document.
See the associated tests for code examples.
arcpyext.publishing
-------------------
The *publishing* modules provides features for publishing map, image and geo-processing services. This currently
includes functionality for creating and/or editing Service Definition Drafts for each service type.
The following classes are provided in order to edit most of the common Service Definition Draft settings:
- arcpyext.publishing.MapSDDraft
- arcpyext.publishing.ImageSDDraft
- arcpyext.publishing.GPSDDraft
See the associated test for code examples.
arcpyext
========
arcpyext provides a collection of helper functions that make common tasks performed with the Esri ArcPy site-package
easier to accomplish. It was chiefly developed to service a command-line tool set (agstools) for managing ArcGIS
environments, but can readily be used within other scripts.
Features
===============
Currently, arcpyext has functionality for changing data sources for map document layers, preparing map documents for
publishing, and performing CRUD operations within an edit session on a geo-database.
arcpyext.data
-------------
The *data* module wraps the basic create, update and delete operations in an edit session, automatically starting/
stoping/aborting an edit operation as appropriate. The functions simply wrap the appropriate *arcpy.da* cursors, so
functionally they work identically. Also provided is a handy function for reading rows into a list.
Example:
.. code-block:: python
import arcpy
import arcpyext.data
#WORKSPACE = "path/to/sde_database.sde"
WORKSPACE = "path/to/geodatabase.gdb"
TABLE = "Countries"
edit_session = arcpy.da.Editor(WORKSPACE)
edit_session.startEditing()
try:
arcpyext.data.delete_rows(edit_session, TABLE, "Name LIKE 'A%'", ('Name'))
except RuntimeError, re:
edit_session.stopEditing(False)
edit_session.stopEditing(True)
del edit_session
See the associated tests for more code examples.
arcpyext.mapping
----------------
The *mapping* module provides features for changing the data sources of a layer (or layers) in a map document. Data
source changes can be templated (with simple match criteria) and then applied across an entire map document.
See the associated tests for code examples.
arcpyext.publishing
-------------------
The *publishing* modules provides features for publishing map, image and geo-processing services. This currently
includes functionality for creating and/or editing Service Definition Drafts for each service type.
The following classes are provided in order to edit most of the common Service Definition Draft settings:
- arcpyext.publishing.MapSDDraft
- arcpyext.publishing.ImageSDDraft
- arcpyext.publishing.GPSDDraft
See the associated test for code examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
arcpyext-0.5.27-py2-none-any.whl
(55.7 kB
view hashes)
Close
Hashes for arcpyext-0.5.27-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 104a500c52b7295e81b41a8fdbafbed388d227a43b67547141fa30db5a6de131 |
|
MD5 | 1ee27a1c4d3adf76c23725d0937bb75b |
|
BLAKE2b-256 | 3c8928ae585dc5dd1f763ad65717811191ecca676c4a3a1b2c3f818eb56a86c9 |