ArcGIS Desktop

  • Documentation
  • Support

  • 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 for 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

ST_Raster.crop

  • Definition
  • Syntax
  • Returns
  • Parameters
  • Examples

Definition

The ST_Raster.crop function crops an existing ST_Raster object to the specified extent. The extent can be specified in either geographic or pixel coordinates. The function can only be applied within a SQL UPDATE statement. A database error is returned if it is used anywhere else, such as a SELECT statement or a WHERE clause. To obtain the same sort of functionality within the select list of the SQL SELECT statement, refer to the ST_Raster.subset function.

Syntax

Oracle

crop (extent IN VARCHAR2) RETURN ST_RASTER

crop (extent IN VARCHAR2, 
      unit IN VARCHAR2) RETURN ST_RASTER

PostgreSQL

crop (raster IN ST_RASTER, 
      extent IN TEXT) RETURN ST_RASTER

crop (raster IN ST_RASTER, 
      extent IN TEXT, 
      unit IN TEXT) RETURN ST_RASTER

SQL Server

crop (extent IN NVARCHAR, 
      unit IN NVARCHAR) RETURN ST_RASTER

Returns

ST_Raster

Parameters

ParametersDescription

extent <minx,miny,maxx,maxy>

The extent of the ST_Raster to be cropped, specified in geographic coordinates

raster

The ST_Raster value to be cropped

unit <'pixel'>

When the pixel keyword is included, the extent is entered as pixel coordinates. Omitting the pixel argument indicates that the extent shall be entered as geographic coordinates.

Examples

The following examples crop the existing raster with the specified crop region of (0,0,100,100):

Oracle

UPDATE IMAGE2 i 
SET image = i.image.crop ('0,0,100,100', 'pixel');

PostgreSQL

UPDATE image2 
SET image = crop (image, '0,0,100,100', 'pixel');

SQL Server

UPDATE image2 
SET image = image.crop ('0,0,100,100', 'pixel');

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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