Select to view content in your preferred language

How to validate data in ArcPy or Model Builder ?

2796
2
Jump to solution
08-17-2015 03:44 AM
AmeyaNatu1
Deactivated User

Hi All,

I am crating tool in ArcGIS Desktop 10.1 using model builder where first I have to validate data for the tool.

- All files like raster layers and feature classes should have same coordinate system else prompt warning message should be there so that user can repair.

- If vertical coordinate system is present in data then it should be also same else prompt warning message should be there so that user can repair.

- Raster layer should be from ESRI grid type Or GeoTiff.

0 Kudos
1 Solution

Accepted Solutions
FreddieGibson
Honored Contributor

Hi Ameya,

Have you tried implementing a script tool and within it using a tool validator to validate what you're needing? You should be able to parse the information you're needing from the Describe object in python. This logic would not be available in ModelBuilder from the GPDialog and would require either a script tool or python toolbox. If you wanted to do this during execution you could use If-The-Logic in ModelBuilder, but I don't believe this would provide the user experience you're wanting.

View solution in original post

2 Replies
FreddieGibson
Honored Contributor

Hi Ameya,

Have you tried implementing a script tool and within it using a tool validator to validate what you're needing? You should be able to parse the information you're needing from the Describe object in python. This logic would not be available in ModelBuilder from the GPDialog and would require either a script tool or python toolbox. If you wanted to do this during execution you could use If-The-Logic in ModelBuilder, but I don't believe this would provide the user experience you're wanting.

AmeyaNatu1
Deactivated User

Thank you 🙂

0 Kudos