Question

How to properly use indices{} in CoordinateExtractor ?

  • 25 February 2021
  • 5 replies
  • 14 views

Badge

I have run into some quirky polygons and wanted to see how many nodes/points they consist of.

 

In SQL Server, I can do:

Select [SHAPE].STNumPoints()
FROM <mytable>
where id = 'abc'
 
-- result: 45

 When I use the CoordExtractor, I'm prompted to specify the indices of x-coordinates and y-coordinates I want to extract, or I can choose "All Coordinates' and then later extract those I'd like to take a look at.

 

indicesBut it turns out, I can ask for index 100,000, and FME will return something that looks like coordinates. Am I not doing this right, or misinterpreting the nature of these indices?

100000 


5 replies

Badge +22

If all you want it the number of coordinates you can use the VertexCounter.

If you want to look at the values of a specific coordinate, you can use Specify Coordinate and enter the index and the coordinates will be stores as regular attributes (_x,_y_z).

If you specify All Coordinates it will generate a complex list of all the x,y,z values of all the vertices. You can then access them like any other list element.

 

Badge

If all you want it the number of coordinates you can use the VertexCounter.

If you want to look at the values of a specific coordinate, you can use Specify Coordinate and enter the index and the coordinates will be stores as regular attributes (_x,_y_z).

If you specify All Coordinates it will generate a complex list of all the x,y,z values of all the vertices. You can then access them like any other list element.

 

@jdh​ Thanks for your feedback. So I guess I would use the VertexCounter to figure out how many indices to use retrieve. Good to know.

 

What still puzzles me though is that SQL Server says there are 45 points, yet FME CoordinateExtractor will let me retrieve X and Y for node 250.

 

points250Where are those values coming from?

Badge +22

@jdh​ Thanks for your feedback. So I guess I would use the VertexCounter to figure out how many indices to use retrieve. Good to know.

 

What still puzzles me though is that SQL Server says there are 45 points, yet FME CoordinateExtractor will let me retrieve X and Y for node 250.

 

points250Where are those values coming from?

You don't need to know the number of vertices to retrieve all indices.

 

If you set all coordinates and then send the results to an inspector, you won't see them in the table, but when you click on a feature the Feature information pane will show the full list.

 

Badge

Hey thanks again. The feature info pane shows me all the coordinates indeed. Still getting used to 2020 after upgrading from 2018.

 

Why FME see this many points (4525) where SQL sees 46 I don't know. Does it interpolate somehow and create some kind smoothing points along the boundary? Weird.

 

4524Might be one of those things where ESRI creates a polygon speaking Mongolian and FME only reads a Bolivian dialect.

Userlevel 1
Badge +21

Hey thanks again. The feature info pane shows me all the coordinates indeed. Still getting used to 2020 after upgrading from 2018.

 

Why FME see this many points (4525) where SQL sees 46 I don't know. Does it interpolate somehow and create some kind smoothing points along the boundary? Weird.

 

4524Might be one of those things where ESRI creates a polygon speaking Mongolian and FME only reads a Bolivian dialect.

Does your polygon contain arcs? Possibly FME is stroking the arcs which is why you see the different number of points.

Reply