Skip to main content
Solved

Extracting measurements from a line

  • November 28, 2018
  • 9 replies
  • 373 views

I am trying to create a process that will do a few things:

1. I need to create mile points between a beginning mile point and an ending mile point.

2. I need to be able to pull the nearest mile point from a line closest to the point feature.

I feel like I'm on the right track to successfully make this work, but something must be missing because the MeasureExtractor transformer is rejecting all measurements.

Click here to download a template of my workspace.

Any help is appreciated! Thank you!

Best answer by hollyatsafe

Hi @gallowayra,

In your MeasureExtractor you have set the type to point but you are using the Line input from the geometry filter. Instead in the Measure Extractor set Type = Whole Line and this will extract the measures as a List Feature. You can then use the ListExploder transformer to pull this information out into an attribute.

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

9 replies

notmyname
Participant
Forum|alt.badge.img
  • Participant
  • November 28, 2018

There are a few different approaches. The point on line overlayer will work: https://knowledge.safe.com/questions/31903/calculate-measures-on-a-specific-point-on-a-line.html

Or

another approach is with the chopper, neighbourfinder and measure extractor

https://knowledge.safe.com/questions/3244/snap-points-to-measured-lines-and-assign-measureme.html


  • Author
  • November 29, 2018
notmyname wrote:

There are a few different approaches. The point on line overlayer will work: https://knowledge.safe.com/questions/31903/calculate-measures-on-a-specific-point-on-a-line.html

Or

another approach is with the chopper, neighbourfinder and measure extractor

https://knowledge.safe.com/questions/3244/snap-points-to-measured-lines-and-assign-measureme.html

Thank you for the information. I am still having an issue with the MeasureExtractor Transformer unfortunately. The measurements are still being rejected.

 

I tried a few different snipping modes to see if it would help. I'm not sure what I am doing wrong.


Forum|alt.badge.img+2
  • Best Answer
  • November 29, 2018

Hi @gallowayra,

In your MeasureExtractor you have set the type to point but you are using the Line input from the geometry filter. Instead in the Measure Extractor set Type = Whole Line and this will extract the measures as a List Feature. You can then use the ListExploder transformer to pull this information out into an attribute.


notmyname
Participant
Forum|alt.badge.img
  • Participant
  • November 29, 2018

Your workflow is very close to ones that work for me:

1.GISTRANS* does not look like it is reading anything

2. I just realized out of the PointOnLine you can take the point output which is the same as the points you input (with a measure attached to the geometry), attach the measure extractor and you are done, no neighbourfinder. If this works it will be much quicker than the neighbourfinder method.

 


  • Author
  • November 29, 2018
notmyname wrote:

Your workflow is very close to ones that work for me:

1.GISTRANS* does not look like it is reading anything

2. I just realized out of the PointOnLine you can take the point output which is the same as the points you input (with a measure attached to the geometry), attach the measure extractor and you are done, no neighbourfinder. If this works it will be much quicker than the neighbourfinder method.

 

I tried this method, but my _point_measure results are all "nan". Do you know why it is doing this?


  • Author
  • November 29, 2018
hollyatsafe wrote:

Hi @gallowayra,

In your MeasureExtractor you have set the type to point but you are using the Line input from the geometry filter. Instead in the Measure Extractor set Type = Whole Line and this will extract the measures as a List Feature. You can then use the ListExploder transformer to pull this information out into an attribute.

It worked, thank you! My only issue now is that it creates 8030 rows when there are only 742 points.


notmyname
Participant
Forum|alt.badge.img
  • Participant
  • November 29, 2018
gallowayra wrote:

I tried this method, but my _point_measure results are all "nan". Do you know why it is doing this?

I can't check the exact workflow right now, but my first guess is do the points and lines intersect exactly, and are in same coordinate system? If you are using 2018, there is a automatic tolerance setting in the overlayer (this handles slight differences in non intersecting data). If you are using an older version or the points are further away, I would snap the points to the line. I'll send a working example when I can.


Forum|alt.badge.img+2
gallowayra wrote:

It worked, thank you! My only issue now is that it creates 8030 rows when there are only 742 points.

Hi @gallowayra,

Other than the changes suggested are you still using the template you linked above. I just ran it and only got 742 features through the Matched port as expected? The key parameter controlling this would be the Number of Neighbours to Find = 1.


  • Author
  • November 30, 2018
hollyatsafe wrote:

Hi @gallowayra,

Other than the changes suggested are you still using the template you linked above. I just ran it and only got 742 features through the Matched port as expected? The key parameter controlling this would be the Number of Neighbours to Find = 1.

I got it working! Thank for the help. :)


Reply


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