Vegetation Perpendicular Distance Index

709
3
02-11-2012 01:38 PM
by Anonymous User
Not applicable
Original User: edi1511

Hello,

Does anyone have a tool or arcpy script for calculating the Vegetation Perpendicular Distance Index from satellite imagery such as SPOT, Landsat or MODIS?

I need to calculate indices of the spectral distance the vegetation reflectance is away from the soil reflectance.

The published method is to use ERMapper to create the scattergrams from which you can get the slope, intercept and Perp Dist variables and then plug them into the ERMapper algorithm for Vegn Perp Dist, select the bands and out comes the result. Well that works but ERMapper won't allow me to save the resulting virtual file. Can visualise it but can't saev it.

Why explain this. As an alternative I built an ArcTool (using Raster Calculator) that should do the same thing as the Vegn Perp Dist Algorithm. Just rewrote the same formulae from ERMapper in Raster Calculator. Copy attached.

Won't work. Can't work out how to fix.

Here is formulae:
Abs((((-1 * (Raster(r"sc2_box_landsat_20051126.img - Layer_2") * 1.3033)) + Raster(r"sc2_box_landsat_20051126.img - Layer_3") - 24.569) / (SquareRoot((1.3033 * 1.3033) + 1))) * 254 /25.91)


Here is error message:
ERROR 000539: Error running expression: rcexec() <type 'exceptions.RuntimeError'>: No CellSize and Extent set
Failed to execute (Raster Calculator).

How do I satisfy the rrequirement to "set a cell size and extent"? It seems to me these are set by the image input bands. They are fairly small, Extent is 760 columns by 520 rows and cell size is 25m. All defined in the image band properties. Tried it with 16 bit and 8 bit unsigned data. Still no go.

Any Model Builders expert advice would be very much appreciated.

Thank you very much.

edi1511
0 Kudos
3 Replies
AlexeyTereshenkov
Regular Contributor III
Hi Ernest,

Have not worked with Raster Calculator that much though, but I suggest you to explicitly specfify the cell size and extent which you can set in the Environments of the geoprocessing tool you add into a model.

There is just one forum post I've found which have a very similar issue. Maybe of some use: http://forums.arcgis.com/threads/25578-Raster-Calculator-Requires-Cell-Size-and-Extent-with-Trig-Fun...
0 Kudos
by Anonymous User
Not applicable
Original User: edi1511

Hi Ernest,

Have not worked with Raster Calculator that much though, but I suggest you to explicitly specfify the cell size and extent which you can set in the Environments of the geoprocessing tool you add into a model.

There is just one forum post I've found which have a very similar issue. Maybe of some use: http://forums.arcgis.com/threads/25578-Raster-Calculator-Requires-Cell-Size-and-Extent-with-Trig-Fun...



Thank you Alex,

That was the information I needed to fix the problem. Should have realised it myself.
The Link to the earlier discussion on setting cell sizes and extents was also excellent.
Very much appreciate your prompt and accurate help.
Now I'm freed from ERMappers quirks.

Sincerely,
Ernest
0 Kudos
AlexeyTereshenkov
Regular Contributor III
Awesome. Glad it worked out well 🙂
0 Kudos