Select to view content in your preferred language

ArcGIS Pro 3.1.5: How to insert cell size into a field in the attribute table of the raster using a tool in model builder?

383
5
Jump to solution
08-09-2024 11:45 PM
JamalNUMAN
Legendary Contributor

ArcGIS Pro 3.1.5: How to insert cell size into a field in the attribute table of the raster using a tool in model builder?

 

In the screenshot below, I couldn’t figure out how to insert the cell size into a field in the attribute table of the raster. I don't want to type it manually; instead, I want it to be read automatically.

 

Clip_1212.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

Basic model is this:

DuncanHornby_0-1723455540570.png

The output of get raster properties is a precondition to the calculate field tool to ensure the cell size is known before the tool is run. You simply use inline  variable substitution to run the field calculate.

 

View solution in original post

5 Replies
Faiez
by
Frequent Contributor

Hello!

Try resample tool!

Faiez_0-1723298036178.png

Best,

Faiez

JamalNUMAN
Legendary Contributor

I'm not sure how the Resample tool can automatically insert the raster cell size into a specific field in its attribute table. I don't need to change the cell size here but want it to be automatically entered in a specific field so that the area can be calculated.

Area = Count * cell size * cell size

 

Clip_1214.jpgClip_1215.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
JamalNUMAN
Legendary Contributor

 

 

 

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
DuncanHornby
MVP Notable Contributor

Basic model is this:

DuncanHornby_0-1723455540570.png

The output of get raster properties is a precondition to the calculate field tool to ensure the cell size is known before the tool is run. You simply use inline  variable substitution to run the field calculate.

 

JamalNUMAN
Legendary Contributor

Thank you for the help. It works fine

 

Clip_1224.jpgClip_1225.jpgClip_1226.jpgClip_1227.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos