This project is read-only.

ToRaster method - result not plausible

Oct 29, 2012 at 8:47 AM


as I'm still trying to find a fast way to convert a shapefile to a grid / array, I used the ToRaster method to create a raster file and the copy the cell values to a 2D-array.

Performance is quite good, but unfortunately the result is not plausible:

I have Integer / Byte values from 1 to 6. On the edge between two features with different values it seems that the smaller value is promoted, so that areas with smaller values spread wider in the raster while areas with higher values seem to decrease. It's a bit difficult for me to explain. If I could attach a screenshot here, you'd see, what I mean.

I looked in the source code. So I roughly  know how the method works. Probably the cause is in the interpolation section?

I'm looking forward to your feedback.