Skip to main content
Solved

Why do CoordinateExtractor and CenterPointExtractor give me different coordinates?


Forum|alt.badge.img

I have a sphere geometry floating in the air. When using CE and CPE (both options Boundingbox and Gravity produce the same result), I end up with different XYZ coordinates, with CPE being apparently correct. Why does this happen?

 

 

Edit: furthermore, when I use the Offsetter with the CPE-Coordinates to offset the sphere as well as the coordinate to 0/0/0, the sphere doesn't move to the expected spot either. See screenshots:

(transparent grid: Hub3DBufferer)

 

Best answer by caracadrian

The CoordinateExtractor transformer outputs the coordinates of all the vertex as a list while the CenterPointExtractor outputs the coordinates of a single point (by Point extraction mode selection).

What you uploaded isn't a sphere but a collection of faces. I aggregated them to obtain a "sphere" to test out your situation in Inspector. Please give us more detail regarding your results (list of coordinates attributes, values)

View original
Did this help you find an answer to your question?

10 replies

david_r
Celebrity
  • February 6, 2020

How have you configured the CoordinateExtractor (coordinate index)? Can you post the geometry as .ffs here?


Forum|alt.badge.img
david_r wrote:

How have you configured the CoordinateExtractor (coordinate index)? Can you post the geometry as .ffs here?

It's Specify Coordinate, Index 0.

ohffs.zip


Forum|alt.badge.img
  • February 6, 2020
clickingbuttons wrote:

It's Specify Coordinate, Index 0.

ohffs.zip

That's a brilliant file name! :-D


david_r
Celebrity
  • February 6, 2020
clickingbuttons wrote:

It's Specify Coordinate, Index 0.

ohffs.zip

I cannot open it, FME says it's missing the OhFFS.fts file. Is there one?


Forum|alt.badge.img
david_r wrote:

I cannot open it, FME says it's missing the OhFFS.fts file. Is there one?

There is!

OhFFS (2).zip


david_r
Celebrity
  • February 6, 2020

So I had a quick look at the data, but it's a collection of 7596 polygons, not a sphere, so I'm not sure how you used the CoordinateExtractor to get something meaningful?


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • Best Answer
  • February 6, 2020

The CoordinateExtractor transformer outputs the coordinates of all the vertex as a list while the CenterPointExtractor outputs the coordinates of a single point (by Point extraction mode selection).

What you uploaded isn't a sphere but a collection of faces. I aggregated them to obtain a "sphere" to test out your situation in Inspector. Please give us more detail regarding your results (list of coordinates attributes, values)


Forum|alt.badge.img
caracadrian wrote:

The CoordinateExtractor transformer outputs the coordinates of all the vertex as a list while the CenterPointExtractor outputs the coordinates of a single point (by Point extraction mode selection).

What you uploaded isn't a sphere but a collection of faces. I aggregated them to obtain a "sphere" to test out your situation in Inspector. Please give us more detail regarding your results (list of coordinates attributes, values)

Yes the initial "sphere" is a collection of faces. I used the Aggregator transformer first (I did write the aggregate out as FFS and it loads as one feature so I didn't mention that step). I assumed since it's one object, the coordinate extractor's point would be the center of the sphere and if it wasn't, it would be on the surface.

The surface part is right and the reason I couldn't find the vertex was because it stuck to a smaller sphere inside that I discovered later by zooming into the outer sphere. Mystery solved, I guess. The offsetting problem came apparently from connecting to a wrong transformer, the workspace ended up a bit messy from testing.


Forum|alt.badge.img
david_r wrote:

So I had a quick look at the data, but it's a collection of 7596 polygons, not a sphere, so I'm not sure how you used the CoordinateExtractor to get something meaningful?

See above answer :)


david_r
Celebrity
  • February 10, 2020
clickingbuttons wrote:

See above answer :)

That explains it then, in this case the CoordinateExtrator would give you the first vertex of the first face in the aggregate, and not the center point. Which, given the circumstances, is quite correct :-)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings