Flip (Data Management)

Summary

Reorients the raster by turning it over, from top to bottom, along the horizontal axis through the center of the raster. This may be useful to correct raster datasets that are upside down.

Illustration

Flip illustration

Usage

  • This tool flips the grid from top to bottom along the horizontal axis through the center of the region.

  • You can save your output to BIL, BIP, BMP, BSQ, DAT, Esri Grid , GIF, IMG, JPEG, JPEG 2000, PNG, TIFF, MRF, CRF, or any geodatabase raster dataset.

  • When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression Type and Compression Quality in the Environments.

  • This tool supports multidimensional raster data. To run the tool on each slice in the multidimensional raster and generate a multidimensional raster output, be sure to save the output to CRF.

    Supported input multidimensional dataset types include multidimensional raster layer, mosaic dataset, image service, and CRF.

Parameters

LabelExplanationData Type
Input Raster

The input raster dataset.

Mosaic Layer; Raster Layer
Output Raster Dataset

The output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension:

  • .bilEsri BIL
  • .bipEsri BIP
  • .bmp—BMP
  • .bsqEsri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • .mrf—MRF
  • .crf—CRF
  • No extension for Esri Grid

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.

When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.

Raster Dataset

arcpy.management.Flip(in_raster, out_raster)
NameExplanationData Type
in_raster

The input raster dataset.

Mosaic Layer; Raster Layer
out_raster

The output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension:

  • .bilEsri BIL
  • .bipEsri BIP
  • .bmp—BMP
  • .bsqEsri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • .mrf—MRF
  • .crf—CRF
  • No extension for Esri Grid

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.

When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a Compression Type and Compression Quality in the geoprocessing Environments.

Raster Dataset

Code sample

Flip example 1 (Python window)

This is a Python sample for the Flip tool.

import arcpy
arcpy.Flip_management("c:/data/image.tif", "c:/data/flip.tif")
Flip example 2 (stand-alone script)

This is a Python script sample for the Flip tool.

##====================================
##Flip
##Usage: Flip_management in_raster out_raster
    
import arcpy

arcpy.env.workspace = r"C:/Workspace"

##Flip a TIFF format image
arcpy.Flip_management("image.tif", "flip.tif")

Licensing information

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

Related topics