Select to view content in your preferred language

Extract Multi Values to Points

4274
4
09-02-2014 03:34 AM
DimitrisPoursanidis
Deactivated User

As in the title, is any way to have the  "Extract Multi Values to Points" but for polygons in zonal statistics ?

In multiband raster to have zonal statistics for each band of the file.

0 Kudos
4 Replies
NtriankosIoannis
Deactivated User

Hi

I don't know if I get this right... you want to execute zonal statistics and take as zone polygons in a feature class for every band in a multiband raster and then add the statistics of each band in a field in the polygons layer? this will probably make a result like Extract Multi Values to Point...

I don't think that there is any single tool to do that... but it can be done writing a script.

let me know if I get I understood correctly what you are trying to do.

Greetings,

John

0 Kudos
DimitrisPoursanidis
Deactivated User

Hi John,

That is exactly what i need. The simple is to split the multiband to singlebands and run for each one the zonal, etc.

BUT, if i have MODIS data with 270 bands this is the hard way to do (only in loop will work).

Do you have any script for it ? Is easy to be written down ? Am little dummy in scripting .....

0 Kudos
NtriankosIoannis
Deactivated User

Hi Dimitris,

You can use the script below.

Consider that the script runs on windows only and is for only one zonal statistic type (no eg Min_Max), if you would like for more, a small adjustment is needed.

I am new in python, so the code is unconventional... but the result is correct.

The script loop through a list of band defined by a multiband raster and executed zonal statistics table, join only the field with the statistics from the table to the specified polygon layer, add a new field with the band name and values equal to the joined field and then delete the joined field.

The polygon is saved to the desired location when the loop run as many times as the band number is.

Let me know if this works.

P.S. Raki is expected when I will be at Heraklion

DimitrisPoursanidis
Deactivated User

Appriciate the script !!!!

I will use it tommorow and let you know.

Raki is waiting for you.

Just let me know

0 Kudos