ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Convert Raster Function Template

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts a raster function template between formats (rft.xml, json, and binary).

Usage

  • Raster function templates can be stored in XML, JSON, or binary format.

  • Since some formats work better on the web, you can convert your raster function template between formats. For example, you may want to convert your rft.xml function template to JSON so that you can use the template in an image service REST API.

Syntax

arcpy.management.ConvertRasterFunctionTemplate(in_raster_function_template, out_raster_function_template_file, {format})
ParameterExplanationData Type
in_raster_function_template

The input raster function template file. The input template file can be XML, JSON, or binary format.

File; String
out_raster_function_template_file

The output raster function template file path and file name.

File
format
(Optional)

The output function template file format.

  • XML —XML output format.
  • JSON —JSON output format. This is the default.
  • BINARY —Binary output format.
String

Code sample

ConvertRasterFunctionTemplate example 1 (Python window)

This is a Python sample for the ConvertRasterFunctionTemplate tool.

##Convert Raster Function Template

## Usage: ConvertRasterFunctionTemplate_management(in_raster_function_template,
##                   out_raster_function_template_file, {JSON | XML | BINARY})


import arcpy

#Convert rft.xml to json

arcpy.ConvertRasterFunctionTemplate_management("c:\\test\\NDVI.rft.xml", "C:\\Test\\json_NDVI.rft.json")
ConvertRasterFunctionTemplate example 2 (stand-alone script)

This is a Python script sample for the ConvertRasterFunctionTemplate tool.

#import arcpy module
import arcpy

#Set input parameters
in_json = "c:\\test\\aspect.json"
out_rftxml = "c:\\test\\aspect.rft.xml"
out_file_type = "XML"

#Convert json to rft.xml
arcpy.ConvertRasterFunctionTemplate_management(in_json, out_rftxml, out_file_type)

Environments

  • Current Workspace
  • Scratch Workspace

Licensing information

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

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal