Extract Multi Values to Points: correct values in GUI, incorrect values with Python

Discussion created by joffrey_baratheon on Sep 2, 2013
Latest reply on Sep 11, 2013 by joffrey_baratheon

I just ran into a strange problem, which surely has a logical explanation and an easy workaround, but I just can't seem to find it.

Let's assume I have a raster "raster1.tif" (Pixel type: unsigned integer, Pixel depth: 8 bit, 6 bands) and a point shapefile "points.shp". Both layers have the same projection.

I now want to extract point values of raster1 at locations specified by "points". I can do this in the GUI with the Extract Multi Values to Point-Tool and the result is as expected. For example, band 1 of "raster1.tif" has values in a range between 60 and 100, and points.shp has a column called "b1_raster1" with a range of 70-90.

However, I need to do this in Python. I write the corresponding code and execute it. No errors are given. However, when I check the values in points.shp, the column "b1_raster1" has values in a range between 9-12.

Here's the python code:

in_shp = "points.shp"
in_raster = "raster1.tif"
ExtractMultiValuesToPoints(in_shp, in_raster, "NONE")

I'd be grateful for any input. :)