NGA Advanced Python Programming for GIS, GLGI 3001-1

Spatially Enabled Dataframes

PrintPrint

ArcGIS API for Python also includes a spatially enabled wrapper for dataframes and provides access to Python packages pyshp, shapely and fiona.  Full documenation can be seen here. This package enables you to translate data from multiple sources and diverse data types to perform geoprocessing tasks. This also provides a quick mechanism for translating the GeoJSON extracted from the KML to other formats such as Feature Layers, Feature Collections, Feature Sets, and Featueclasses.

The important thing to note is that it needs a special import into the script.  

import pandas as pd
from arcgis.features import GeoAccessor, GeoSeriesAccessor 

If you are using an intelligent IDE, you may notice that these imports will remain as ‘unused’, but they are essential for performing geoprocessing and error messages related to them being absent are not helpful in diagnosing their absence.

The package can read features from AGOL and Portal, as well as local file types such as shapefiles and featureclasses and I suggest you refer the documentation for its implimentation.

We will go over data manipulation through dataframes in the next lesson.