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
Usage
-
The Flip 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, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, 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 within the Environment Settings.
Syntax
Parameter | Explanation | Data Type |
in_raster |
Input raster dataset. | Raster Layer |
out_raster |
Output raster dataset. When storing the raster dataset in a file format, you need to specify the file extension:
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. | Raster Dataset |
Code Sample
This is a Python sample for the Flip tool.
import arcpy arcpy.Flip_management("c:/data/image.tif", "c:/data/flip.tif")
This is a Python script sample for the Flip tool.
##==================================== ##Flip ##Usage: Flip_management in_raster out_raster try: import arcpy arcpy.env.workspace = r"C:/Workspace" ##Flip a TIFF format image arcpy.Flip_management("image.tif", "flip.tif") except: print "Flip example failed." print arcpy.GetMessages()