Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Lefebvre committed Jul 14, 2017
1 parent 0a7dedc commit bd677ff
Show file tree
Hide file tree
Showing 31 changed files with 1,604 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
ignore=test
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 Exelis Visual Information Solutions, Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

include *.txt

include envipyengine/test/*

include doc/source/*.py
include doc/source/*.rst
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


**************************
ENVI Py for ArcGIS Library
**************************

Installation
============

Install envipyengine using pip::

pip install envipyengine
12 changes: 12 additions & 0 deletions compliance/3rdpartyinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"None": {
"version": "",
"procurement": "",
"description": "",
"productFeature": "",
"copyright": "",
"licenseType": "",
"encryption": "no",
"notes": "No 3rd party libraries are distributed with ENVI Py."
}
}
163 changes: 163 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# -*- coding: utf-8 -*-
#
# envipyengine documentation build configuration file, created by
# sphinx-quickstart on Mon May 15 15:40:12 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'envipyengine'
copyright = u'2017 Exelis Visual Information Solutions, Inc.'
author = u'Exelis Visual Information Solutions, Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u''
# The full version, including alpha/beta/rc tags.
release = u''

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'envipyenginedoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'envipyengine.tex', u'envipyengine Documentation',
u'Exelis VIS', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'envipyengine', u'envipyengine Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'envipyengine', u'envipyengine Documentation',
author, 'envipyengine', 'One line description of project.',
'Miscellaneous'),
]




# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
19 changes: 19 additions & 0 deletions doc/source/envipyengine_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. envipyengine documentation file
ENVI Py Engine
==============

.. automodule:: envipyengine.engine
:members:

ENVI Py Engine Task
===================

.. automodule:: envipyengine.task
:members:

ENVI Py Engine Config
=====================
.. automodule:: envipyengine.config
:members:
59 changes: 59 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. _envipyengine:

**************
ENVI Py Engine
**************

ENVI Py Engine provides a client Python package, named envipyengine, to run ENVI analytics provided by ENVI Desktop.
The Python package provides the ability to query for available tasks, retrieve task information, and execute tasks on the desktop.

There is an additional client Python package available, named envipyarc, to provide the ability to run ENVI analytics through ArcMap and ArcGIS Pro.

See http://www.harrisgeospatial.com/ for more details on product offerings.


Usage
=====

Before using ENVI Py Engine, you must first configure the package so it can find your Engine executable within your ENVI/IDL installation. To do this make sure the "engine" config option is set::

>>> import envipyengine
>>> engine = envipyengine.config.get('engine')
If the above command throws an error, then you will need to set the 'engine' property to the the full path of the 'taskengine' executable in your ENVI installation::

>>> envipyengine.config.set('engine', <path-to-executable>)

Note: When specifying paths in Python strings on Windows, be sure to use two backslashes as your directory separator.

To connect to the ENVI Task Engine and list the available tasks, create a new instance of the Engine class with the engine name from the Python command line::

>>> from envipyengine import Engine
>>> envi_engine = Engine('ENVI')
>>> envi_engine.tasks()

Note: You must have write permissions for Python's current working directory in order to run the examples.

To get an ENVI task object, use the :code:`task()` method on the Engine object::

>>> task = envi_engine.task('SpectralIndex')
To get a list of task parameter information, use the :code:`parameters` property on the Task object::
>>> task.parameters

To execute a task, use the :code:`execute()` method on the Task object. A GSF Job object is returned after the job has been submitted::

>>> input_raster = dict(url='<path_to_input_raster>', factory='URLRaster')
>>> parameters = dict(INPUT_RASTER=input_raster,
INDEX='Normalized Difference Vegetation Index')
>>> task.execute(parameters)


API Documentation
=================

.. toctree::
:maxdepth: 2

envipyengine_api
9 changes: 9 additions & 0 deletions envipyengine/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'''
Created on Feb 1, 2016
@author: elefebvre
'''

# Define the gsf implementation you want to use here.
from .taskengine.task import Task
from .taskengine.engine import Engine

0 comments on commit bd677ff

Please sign in to comment.