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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.