# Get field data at locations based on point data

**URL:** https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [September 15, 2021, 10:38am UTC](https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003 "2021-09-15T10:38:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![massisenergy](https://discourse.paraview.org/user_avatar/discourse.paraview.org/massisenergy/32/6229_2.png) [@massisenergy](https://discourse.paraview.org/u/massisenergy)
#### Post date: [September 15, 2021, 10:38am UTC](https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003/1 "2021-09-15T10:38:54Z")

</div>

I have DEM (or LPT) simulation data as point data. I also have the underlying fluid data in field. I want to get values from the fluid where the particles resides (point locations). I would like to use the **ProgrammableFilter** but not sure how to do it.

To be more specific, I have `shearStress` field data (tensor) and I want to get the values of magnitude of `shearStress` at the positions of the particles (point data). I followed the example of subtracting two datasets as mentioned [here](https://www.paraview.org/Wiki/Python_calculator_and_programmable_filter#Programmable_Filter), but it is returning weird results (lots of column values in a single row).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 15, 2021, 10:57am UTC](https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003/2 "2021-09-15T10:57:05Z")

</div>

Just use RessampleWithDataset

---

<div class="post-metadata">

### Author: ![massisenergy](https://discourse.paraview.org/user_avatar/discourse.paraview.org/massisenergy/32/6229_2.png) [@massisenergy](https://discourse.paraview.org/u/massisenergy)
#### Post date: [September 15, 2021, 11:26am UTC](https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003/3 "2021-09-15T11:26:03Z")

</div>

Oh, how can I be so stupid! I knew this but used it the opposite way earlier 🙄

The correct way to apply in this case is: `RessampleWithDataset > Source data Arrays: cellData; Destination Mesh: pointData` with the options `Pass Field Arrays` & `Pass Point Arrays` enabled.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 31, 2021, 9:30am UTC](https://discourse.paraview.org/t/get-field-data-at-locations-based-on-point-data/8003/4 "2021-12-31T09:30:23Z")

</div>

A post was split to a new topic: [Get the position of the particle from .vtp file](https://discourse.paraview.org/t/get-the-position-of-the-particle-from-vtp-file/8718)
