In my case I have two sources of data: a vector shapefile with a polyline (expressing the path) and a raster with some integer metadata values available for each cell.

What I would like to do is to query the metadata values from the raster cells for each segment of the polyline and then to create another column for this data in my shapefile, where this data would be finally stored. In other words, I want to perform a mapping between two different datasources. How can I perform such actions using ArcObjects?

I don't really need a code sample but rather a strategy of using available tools and functions.

  • Are you saying you want an un-normalized solution? i.e. a comma delimited list of integers in the shapefile column? Mar 11, 2016 at 15:10
  • No, the solution would be normalized. I would prefer to calculate an average value for the integers that are mapped to each polyline segment. Therefore such average value would be placed in the each cell of the shapefile column.
    – Konrad
    Mar 11, 2016 at 15:48

1 Answer 1


How about this strategy (untested, I just though it up):

  • Rasterize your polyline dataset using a unique ID (e.g. FID) and make sure you set snap raster to the the other raster dataset.
  • Run a zonal stats tool choosing your desired statistic
  • Join resulting table back to shapefile based upon ID.
  • Thank you very much, "Zonal statistics as table" helped me! Actually there was no need for rasterizing as this tool takes shapefile as a parameter. Hence, I just ran Zonal Statistics (it has a lot of functions, not only Mean!) and then I joined the table back and it works great.
    – Konrad
    Mar 14, 2016 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.