Skip to main content
Solved

create points with measure attribute


franco69
Contributor
Forum|alt.badge.img+6

Hi Guys,

 

i know many users ask something in that way (myself too) but its a little bit different, bcause i didnt find the exact answer to my question.

 

 

i have a polyline, gave a measure on it and produced vertices (PolylineAnalyzer) with an attribute where the extracted measure (MeasureExtractor,etc..) is saved and an attribute with the route_ID on it.

Then i have produced a flat line with the same length as my polyline and also an attribute with the route_ID on it.

 

 

How can i set my points (vertices) on this flat line (with the extracted measure attribute)?

 

 

I've read some answers from other linear referencing questions and tried some things but:

 

now I'm here!

but i don't think its too complicated.......merge, list, explode,....?!?

Thx and Greetz

Franco

Best answer by takashi

Hi @franco69, if I understand your requirement correctly, this workflow might help you.

Result:

View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

16 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • October 25, 2016

Hi @franco69, If these points are on the produced line, I would try (or maybe you already did?) the PointOnLineOverlayer, which will effectively, slice up your produced line and by doing this introduce start end vertices.

After that its a matter of joining the newly produced line segments (route_ID) into a longer line with the LineJoiner.

Hope this helps.


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 25, 2016

Hi itay,

 

the points (vertices) are not on the produced line......

 

the produced is now a flat line with same length as the polyline where i've extracted the vertices and i want them measures now on the flat line as points.

Greetz

Franco


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • October 25, 2016
franco69 wrote:

Hi itay,

 

the points (vertices) are not on the produced line......

 

the produced is now a flat line with same length as the polyline where i've extracted the vertices and i want them measures now on the flat line as points.

Greetz

Franco

Maybe it was a bit confusing, what I mean by 'are on the produced line' is do they have a spatial relationship with the produced line.

 

What do you mean by 'flat' line? no 3D? or a straight line?

 

 


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 25, 2016

with flat line i meant its a straight line and the vertices and the straight line have only the route_ID in an attribute as common.


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • October 25, 2016
franco69 wrote:

with flat line i meant its a straight line and the vertices and the straight line have only the route_ID in an attribute as common.

Ok, that means you can recreate (or extract) the vertices and merge them to the straight line with the route_ID

 

 

create-points-with-measure-attribute.fmw

 


takashi
Evangelist
  • Best Answer
  • October 25, 2016

Hi @franco69, if I understand your requirement correctly, this workflow might help you.

Result:


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016

Hi Takashi,

so u mean the MeasureExtractor after the MeasureGenerator which is set after original polyline?

then I get measure values like this (table view: all _measures are 0), (info view: _measures attriutes have 1.#QNAN)

?

what is my fault?

Greetz Franco


takashi
Evangelist
  • October 28, 2016
franco69 wrote:

Hi Takashi,

so u mean the MeasureExtractor after the MeasureGenerator which is set after original polyline?

then I get measure values like this (table view: all _measures are 0), (info view: _measures attriutes have 1.#QNAN)

?

what is my fault?

Greetz Franco

I assumed that you have generated measure already. If the original polyline did not have measure, of course generate measure with the MeasureGenerator before the MeasuerExtractor.

 


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016

Hi Takashi ....yes I have generated measure and after that I set your workflow.....the result is mentioned in my post above.

 

 

 

Greetz

Franco


takashi
Evangelist
  • October 28, 2016
franco69 wrote:

Hi Takashi ....yes I have generated measure and after that I set your workflow.....the result is mentioned in my post above.

 

 

 

Greetz

Franco

hmm... Please check if there is any difference between your workflow and the attached demo (FME 2016.1.2): flat-line-with-measure-vertices.fmw

 


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016

I've checked it...I didn't find the error....your workflow is working...not mine...but here a screenshot of results..... the measure attribute is strange....


takashi
Evangelist
  • October 28, 2016
franco69 wrote:

I've checked it...I didn't find the error....your workflow is working...not mine...but here a screenshot of results..... the measure attribute is strange....

Connect Inspectors to the MeasureGenerator and MeasureExtractor to check if the measure values have been generated correctly.

 


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016

I've checked it again and I found the error.....it was my fault of course ;-)

I had a destination measure name on my "old" Measure Generator (which I need for other processes inside the workflow) and it was also _measure....that collided with the destination attribute in the MeasureExtractor of course .....now it does function....thx a lot

Greetz

Franco


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016

But I have an additional task for the future maybe:

now the polyline is from left to right....what if the polyline runs from right to left and I want the flat line also do so?

Greetz

Franco


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • October 28, 2016
franco69 wrote:

But I have an additional task for the future maybe:

now the polyline is from left to right....what if the polyline runs from right to left and I want the flat line also do so?

Greetz

Franco

maybe only a "-" in the attribute that creates then the X coordinate?

 

 


takashi
Evangelist
  • October 28, 2016
franco69 wrote:

But I have an additional task for the future maybe:

now the polyline is from left to right....what if the polyline runs from right to left and I want the flat line also do so?

Greetz

Franco

Yes, if you set -@Value(_measure) (the negative measure value) to the X Value parameter in the VertexCreator, the resulting line starts at (0,0) and goes to the left direction.

 

You can also use the Rotator to rotate the line with any angle.

 


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