Programming for GIS: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


===The ESRI world===
===The ESRI world===
2017-12-- ESRI embraced Python some time ago... after I wrote this page.
Python is easy to learn and you can use it extensively both in the ESRI world and in the open source world.
You can learn one language and apply it everywhere, pretty much.
I have written countless scripts for supporting GIS in ArcGIS Desktop.
Using ESRI's arcpy python module works in standalone scripts. I currently rely heavily on [[Anaconda]] (Miniconda actually) and Spyder.
I have set up environments in 32- and 64-bit Anaconda + Spyder to allow direct use of arcpy.
You can use Jupyter (that's what ESRI promotes) but I find Spyder is a more familiar programming environment. Jupyter feels more like something a scientist would use.
You can write Python Toolboxes and Python Addins for ArcMap.
I have not explored Python in [[ArcGIS Pro]] yet.


[[ArcObjects]] is an API allowing you to extend ESRI software and to create new applications that use the same classes.
[[ArcObjects]] is an API allowing you to extend ESRI software and to create new applications that use the same classes.


[[Model Builder]] is a framework for handling [[Geoprocessing]] tasks.
[[Model Builder]] is ESRI's graphical flow chart style framework for handling [[Geoprocessing]] tasks.


===Everywhere else===
===Everywhere else===
Line 88: Line 104:
*Working with ArcPad Application Builder
*Working with ArcPad Application Builder
*Spatial statistics
*Spatial statistics
*Image classification
* [[Image classification]]
*Write a script to clean data
*Write a script to clean data
*Write a script to convert data from one format to another
*Write a script to convert data from one format to another
*Write a script to extract data from a set of layers using the same extent
*Write a script to extract data from a set of layers using the same extent
*Write a script to put all data into the same projection
*Write a script to put all data into the same projection

Latest revision as of 17:52, 25 July 2018

Programming for GIS

The ESRI world

2017-12-- ESRI embraced Python some time ago... after I wrote this page.

Python is easy to learn and you can use it extensively both in the ESRI world and in the open source world. You can learn one language and apply it everywhere, pretty much.

I have written countless scripts for supporting GIS in ArcGIS Desktop.

Using ESRI's arcpy python module works in standalone scripts. I currently rely heavily on Anaconda (Miniconda actually) and Spyder. I have set up environments in 32- and 64-bit Anaconda + Spyder to allow direct use of arcpy.

You can use Jupyter (that's what ESRI promotes) but I find Spyder is a more familiar programming environment. Jupyter feels more like something a scientist would use.

You can write Python Toolboxes and Python Addins for ArcMap.

I have not explored Python in ArcGIS Pro yet.

ArcObjects is an API allowing you to extend ESRI software and to create new applications that use the same classes.

Model Builder is ESRI's graphical flow chart style framework for handling Geoprocessing tasks.

Everywhere else

There is a rich set of tools outside the ESRI domain that can interoperate, or can be used completely separately.

Lately I have been using Geo::Shapelib with perl on both Windows and Linux platforms. I was able to whip up a geoprocessing tool quickly because of my perl past.

Proposal for a programming class

What classes are there out there? What do I think people should learn? Pre-requisite: any computer programming class, any GIS class

A bit beyond the basics

  • How data are stored (not just raster or vector! I've heard that already)

Things common to most programming languages

  • values and references
  • assignments and expressions
  • decisions and branches
  • loops and iterations
  • functions
  • modules
  • objects
  • linear, event-driven and mvc

Geometry for Geographers-- Calculations based on spatial features

  • extents and bounding boxes
  • length, perimeter, area, volume
  • midpoint, center, centroid
  • fuzziness
  • error

Working data from other sources

  • The nature of GPS data
  • Tabular data
  • Scanned paper maps and photos
  • Autocad drawings
  • Legacy data (Coverages, elevation data, other sources)

Working with very large data sets

ArcMap

  • Building Definition Queries
  • Building expressions for labelling.
  • Special symbologies?
  • Maplex?

ArcGIS Extensions

  • Spatial and 3D analyst
  • Network analyst

VB + ArcObjects

  • What does it take to get set up for VB programming in ArcGIS? Visual Studio?

The many faces of Microsoft, what can we safely ignore?
VBscript Jscript Java VBA VB C/C++/C# OLE COM DOM ActiveX .net

Python

  • Model Builder
    • ArcMap
    • ArcCatalog

SQL

  • Database design
  • Using access
  • Building reports with Crystal

Beyond ArcGIS

  • ArcIMS
  • GRASS
  • Mapserver
  • Exploring FWtools
  • SAS

Resources

  • Coping with change :-)

Projects

  • Creating a data entry page for attributing.
  • Finding the highest values in a field and displaying them; sub-selecting on type.
  • Working with ArcPad Application Builder
  • Spatial statistics
  • Image classification
  • Write a script to clean data
  • Write a script to convert data from one format to another
  • Write a script to extract data from a set of layers using the same extent
  • Write a script to put all data into the same projection