Raster Clip Alternative Options

1632
6
Jump to solution
01-24-2022 04:05 PM
Labels (1)
ImmortanJoe
New Contributor II

Hello,

I am trying to clip a Raster file to fit within the boundaries of a shapefile but I do not have editing rights to the source of the Raster file. I cannot create a personal gdb because others throughout the company will need to access the map. I have tried setting the extent of the Raster file to fit within the specified layer but the only option I can choose with the boundary layer provides the option with "the rectangular extent of". When I choose this option the top of the Raster file gets cut but the layer continues to bleed over the boundary layer. is there an alternative option that will in a sense "cookie cut" the Raster file to fit within the boundary layer?

Thank you

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

If you don't have the spatial analyst extension, then you could could make a mask to hide the portion you want.  Just make a rectangle, and use remove overlap or union

If you have a basic license then you can remove the bits you don't want.  If you have an advance license there are more tools that simplify the process

This is for Pro, but Map uses the same tools

An overview of the Overlay toolset—ArcGIS Pro | Documentation

If you need the raster itself, then without an advanced license your options are limited, but there are methods using arcpy and NumPy and their functions to do the work (eg. NumPyArrayToRaster etc).  If you are comfortable with python, I could walk you through it (it is quite simple in any event)


... sort of retired...

View solution in original post

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

do you have an image of what you want to accomplish?

Rasters will always be rectangular.  You can "clip" via several means and just show the data within an irregular bounded polygon  using tools in the spatial analyst extension such as

Extract by Mask (Spatial Analyst)—ArcGIS Pro | Documentation

for instance

 


... sort of retired...
ImmortanJoe
New Contributor II

Raster Clip Project.png

I would like to remove the area surrounding the white Polygon and keep the area that would fall within it.

0 Kudos
ImmortanJoe
New Contributor II

This method would be ideal but I am not licensed to use the extract by mask tool. Perhaps if there is a way to create a mask that would cover the surrounding area.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Clip (Data Management)  should also work for you. You could save the output Raster as a TIFF file (*.tif) in a basic folder on your local machine.

JayantaPoddar_0-1643094987121.png

In Environment settings, you could define the Snap Raster to your original Raster data.



Think Location
DanPatterson
MVP Esteemed Contributor

If you don't have the spatial analyst extension, then you could could make a mask to hide the portion you want.  Just make a rectangle, and use remove overlap or union

If you have a basic license then you can remove the bits you don't want.  If you have an advance license there are more tools that simplify the process

This is for Pro, but Map uses the same tools

An overview of the Overlay toolset—ArcGIS Pro | Documentation

If you need the raster itself, then without an advanced license your options are limited, but there are methods using arcpy and NumPy and their functions to do the work (eg. NumPyArrayToRaster etc).  If you are comfortable with python, I could walk you through it (it is quite simple in any event)


... sort of retired...
0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Another way is to use Clip Function (Image Analysis).

Windows > Image Analysis

JayantaPoddar_0-1643167124850.png

Ensuring the Raster layer is selected, click "Add Function" icon.

JayantaPoddar_1-1643167326209.png

Right-click the Raster layer under Function Chain > Insert Function > Clip Function.

JayantaPoddar_2-1643167548840.png

JayantaPoddar_4-1643168313431.png

 



Think Location
0 Kudos