forked from NERC-CEH/arcapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
56 lines (55 loc) · 2.52 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""
#-------------------------------------------------------------------------------
# Name: arcapi
# Purpose: Convenient API for arcpy
#
# Authors: Filip Kral, Caleb Mackey
#
# Created: 01/02/2014
# Licence: LGPL v3
#-------------------------------------------------------------------------------
# Wrapper functions, helper functions, and aliases that make ArcGIS Python
# scripting easier.
#
# Arcapi is a Python package of functions that simplify common tasks, are easy
# on the programmer, and make prototyping faster. However, Arcapi is intended
# for skilled Python coders with solid experience with ArcPy and ArcGIS.
#
# While the code should work with all types of workspaces, ESRI File Geodatabase
# was adopted as primary format. Most functions were designed for and tested
# with plain tables and feature classes with basic field types like SHORT, LONG,
# TEXT, DOUBLE, FLOAT. If you work with feature datasets, topologies,
# relationship classes, annotation feature classes, TINs, BLOBs, and other
# complex objects, you will likely need to use core arcpy functions.
#
# Exception handling
# ------------------
# Because arcapi functions are generally wrappers around arcpy functions, input
# checking and exception handling is used sporadically. This allows invalid
# input to reach core (arcpy etc.) functions and raised errors propagate back
# the calling functions.
# In rare cases, to distinguish Exceptions raised in arcapi, an Exception
# of type arcapi.ArcapiError is raised.
#
# Package structure
# -----------------
# Arcapi is a Python package which allows for modular structure. The core
# module is called aracpi and all its content is imported when you import
# the arcapi package.
# Another module is called custom. All content of the custom module gets
# imported when you import the arcapi package, but the custom module is
# distributed as an empty script. You can paste your own custom functions
# into this module when you download new version of arcapi. That way, you
# can access all your python helper functions via a single package - arcapi.
#
# ArcGIS Extensions modules
# -------------------------
# Some functions use extensions modules (e.g. Spatial Analyst's arcpy.sa).
# Bodies of these functions are wrapped in try-except(ImportError) statements.
# The extension-dependent functions will return string if the extensions is not
# installed, but rest of arcapi will still work normally.
#
#-------------------------------------------------------------------------------
"""
from arcapi import *
from custom import *