Clip (Data Management) is broken.

326
5
11-06-2018 04:16 PM
NathanFleischman
New Contributor III

I am trying to use the Clip in the Raster Processing toolset, which is in the Raster toolset of the Data Management toolbox to clip some rasters I created using the Mosaic To New Raster Tool in the in the Raster Dataset toolset, which is in the Raster toolset of the Data Management toolbox. Unfortunately, I am having a problem. I am doing this in Python, and when the shell calls the the clip tool, it restarts the shell. What could be causing the problem?

0 Kudos
5 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Your script?  It could be in the code.

0 Kudos
NathanFleischman
New Contributor III

It only happens once it gets to here:

arcpy.Clip_management(in_raster, rectangle, out_raster, in_template_dataset, "#",
                                              clipping_geometry, maintain_clipping_extent)

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

This looks like an exact copy from the help topic.

What is the value for:

in_raster, rectangle, out_raster, in_template etc etc?

Those are what you are supposed to provide as outlined in the help topic

Clip—Data Management toolbox | ArcGIS Desktop 

Clip_management (in_raster, rectangle, out_raster, {in_template_dataset}, {nodata_value}, {clipping_geometry}, {maintain_clipping_extent})

The stuff in curly brackets are optional parameters, so if you don't have values for them you don't need to provide them.

So what are the values and your maybe your code could be checked to see if they are appropriate.

In the interim, you can clip manually using the  tool from arctoolbox

0 Kudos
NathanFleischman
New Contributor III

The script is supposed to call a json file. By the way, I decided I will use ModelBuilder instead for this.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

modelbuilder will give you the opportunity to provide the parameters for the tool during the validation process

0 Kudos