Using FieldMap and FieldMappings

Up until this point in the chapter, we've covered how to use Python with the ArcGIS REST API to access ArcGIS Server services. Now, we're going to switch gears and go back into the ArcPy module and discuss the FieldMap and FieldMappings classes.

Getting ready

A common GIS operation is to merge several disparate datasets into a single dataset of a larger area. Often, the fields in the datasets to be merged will be the same and there won't be any problems. However, there will be times when the fields of the various datasets do not match. In this case, you will need to map the relationship between fields in one dataset to fields in another dataset.

The preceding diagram displays the relationship between the various ArcPy ...

Get Programming ArcGIS with Python Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.