Skip to main content
Question

How to properly use indices{} in CoordinateExtractor ?

  • February 25, 2021
  • 5 replies
  • 116 views

agelfert
Contributor
Forum|alt.badge.img+8

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

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 25, 2021

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.

 


agelfert
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • February 25, 2021
jdh wrote:

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?


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 25, 2021
agelfert wrote:

@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.

 


agelfert
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • February 26, 2021

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.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • February 26, 2021
agelfert wrote:

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.


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