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

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Extracting a raster subset from an ST_Raster value

The ST_Raster subset function returns a subset of itself as an ST_Raster value. This function can be useful for creating a new ST_Raster value from an old one in which you want only part of the ST_Raster value such as the pixels that fall within an extent defined by either geographic or pixel coordinates. Alternatively, you may want only a particular band of an ST_Raster value, or perhaps you want to restrict the output to a particular band and the pixels defined by an extent.

In the following examples, the subset function is used to extract the extent of the City of Paris by geographic coordinates. The result is inserted into a new record of the same table under the name of Paris. The subset result is compressed with JPEG compression and has pyramids built with bilinear interpolation before being inserted.

  1. Use the SQL statement for your database management system.

    Oracle

    INSERT INTO URBAN_AREA (sde.st_raster, name)
    SELECT t.raster.subset(
    'extent=(2.313,48.825,2.381,48.891)',
    'compression=rgb,level=-1,bilinear'),'Paris'
    FROM URBAN_AREA t
    WHERE NAME = 'ALL_CITIES';
    

    PostgreSQL

    INSERT INTO urban_area (sde.st_raster, name)
    SELECT subset(raster,
    'extent=(2.313,48.825,2.381,48.891)',
    'compression=rgb,level=-1,bilinear'),'paris'
    FROM urban_area
    WHERE name = 'all_cities';
    

    SQL Server

    INSERT INTO urban_area (dbo.st_raster, name)
    SELECT raster.subset(
    'extent=(2.313,48.825,2.381,48.891)',
    'compression=rgb,level=-1,bilinear'),'Paris'
    FROM urban_area
    WHERE name = 'all_cities';
    

Related topics

  • ST_Raster.subset

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 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal