Add Images From Custom Input Type (Oriented Imagery)

Summary

Adds images to an oriented imagery dataset from the input data defined by a custom input type.

Usage

  • The tool uses custom input types, implemented in Python, to define how complex or nonstandard metadata and images will be added to an oriented imagery dataset.

    The Python module must be in a folder with the same name as the module. Place the folder in [InstallDirectory]\Resources\OrientedImagery\CustomInputTypes to list the type in the Custom Input Type parameter drop-down menu. If the input type folder is in a different location, select the Folder option, and provide the folder location in the Custom Input Type Folder parameter.

  • To automate data management workflows or to work with nonstandard imagery frequently and to simplify the data management processes, define a custom input type for the data. Then use the tool to add images to an oriented imagery dataset.

  • The tool is an alternative to the Add Images To Oriented Imagery Dataset tool, which creates a .csv file with the imagery metadata in the oriented imagery table schema to add images to an oriented imagery dataset.

Parameters

LabelExplanationData Type
Oriented Imagery Dataset

The path and name of the oriented imagery dataset where the images will be added.

Oriented Imagery Layer
Custom Input Type

The name of the custom input type.

To select an input type that is not listed, use the Folder option. This parameter value will activate the Custom Input Type Folder parameter.

String
Custom Input Type Folder

The path to the custom input type folder. The folder must contain a Python module with the same name as the folder and the required public functions.

Folder
Input Data

The name and the path or value of the input data. The selected custom input type determines the available options.

Value Table
Auxiliary Parameters

The names and values of any auxiliary parameters defined in the input type schema.

Value Table

Derived Output

LabelExplanationData Type
Output Oriented Imagery Dataset

The updated output oriented imagery dataset.

Oriented Imagery Dataset

arcpy.oi.AddImagesFromCustomInputType(in_oriented_imagery_dataset, input_type, in_type_folder, in_data, auxiliary_parameters)
NameExplanationData Type
in_oriented_imagery_dataset

The path and name of the oriented imagery dataset where the images will be added.

Oriented Imagery Layer
input_type

The name of the custom input type.

If the custom input type folder is not in [InstallDirectory]\Resources\OrientedImagery\CustomInputTypes, specify the parameter value as Folder and provide the folder path in the in_type_folder parameter.

String
in_type_folder

The path to the custom input type folder. The folder must contain a Python module with the same name as the folder and the required public functions.

Folder
in_data
[in_data,...]

The name and the path or value of the input data. The selected custom input type determines the available options.

Value Table
auxiliary_parameters
[auxiliary_parameters,...]

The names and values of any auxiliary parameters defined in the input type schema.

Value Table

Derived Output

NameExplanationData Type
out_oriented_imagery_dataset

The updated output oriented imagery dataset.

Oriented Imagery Dataset

Code sample

AddImagesFromCustomInputType example 1 (stand-alone script)

The following Python script demonstrates how to use the AddImagesFromCustomInputType function in a stand-alone script.

# Import system modules
import arcpy
import os

arcpy.env.workspace = "C:/OrientedImageryExample"

# Set local variables
fld = r"C:\OrientedImagerySamples"
oi_dataset = "C:\OrientedImageryExample\Sample.gdb\oi_dataset"
in_file = os.path.join(fld, "sampleinput.csv")
in_folder = os.path.join(arcpy.GetInstallInfo()['InstallDir'], 'Resources',
                         'OrientedImagery', 'CustomInputTypes',
                         'SampleInputType')
img_folder = os.path.join(fld, "Images")
img_ext = "mrf"
in_data= f'"CSV File" {in_file};"Image Folder" {img_folder};"Image Extension" {img_ext}'

# Run Add Images From Custom Input Type
arcpy.oi.AddImagesFromCustomInputType(
    oi_dataset, input_type="SampleInputType", in_type_folder="in_folder",
    in_data=in_data)

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics