Question

get single Points from OSM on Template

  • 21 August 2018
  • 8 replies
  • 0 views

Badge

Hallo guys!

I have again some problems which i hope anyone can help me. In the first picture i show my template where i try to get the points out of my lane. It works but i just want the points one by one (and not all as you can see on picture 2) and also that the template start new for every single point.

The next problem is that i get the value "0" sometimes between my coordinates and i have no idea why. How can i change that ? (also visible on the second picture)


8 replies

Userlevel 5
Badge +25

The 0 values are z-coordinates, is your template grabbing those as well?

As for your first question: what kind of geometry are you putting in? What happens if you chop it to individual points?

Badge

The 0 values are z-coordinates, is your template grabbing those as well?

As for your first question: what kind of geometry are you putting in? What happens if you chop it to individual points?

Ok z-coordinate make sense, i would just need x- and y-coordinates, how could i slice it ?

 

 

In the FME Data Inspector it is a line but the line have nodes and i want that nodes what the line build up. Individual points are not good because i want to use the imported data as much as i can.

 

 

 

Userlevel 4

Try using a 2DForcer to get rid of the Z-coordinate before the templater.

Badge

Try using a 2DForcer to get rid of the Z-coordinate before the templater.

Nothing changed if i do that. I think he generates the z-coodinates by using "{geom:get-points()}".

 

 

Userlevel 5
Badge +25
Ok z-coordinate make sense, i would just need x- and y-coordinates, how could i slice it ?

 

 

In the FME Data Inspector it is a line but the line have nodes and i want that nodes what the line build up. Individual points are not good because i want to use the imported data as much as i can.

 

 

 

Coud you post both the entire template and the entire result (as text, not as screenshots)?

 

 

Badge

The 0 values are z-coordinates, is your template grabbing those as well?

As for your first question: what kind of geometry are you putting in? What happens if you chop it to individual points?

 

Subtemplate:

<geometry q="{geom:get-points()}" s="{fme:get-attribute("s")}" x="{geom:get-start-x()}" y="{geom:get-start-y()}" hdg="@atan2(@YValue(),@XValue())" length="{fme:get-attribute("_length")}"> <line/> </geometry>

result:

<geometry q="534479.5085769484,5211763.0537863765,0 534514.871573565,5211686.678654794,0 534516.4251188312,5211683.3315199055,0" s="0" x="534479.50857694843" y="5.2117630537863765E6" hdg="1.4686010566851337" length="87.854829702218808">
                <line></line>
            </geometry>
            <geometry q="534516.4251188312,5211683.3315199055,0 534564.4075924826,5211708.18141793,0 534566.2854240009,5211709.148064895,0 534597.9922825961,5211730.102929116,0" s="87.854829702218808" x="534516.42511883122" y="5.2116833315199055E6" hdg="1.4685924945911548" length="94.153199894332289">
                <line></line>
            </geometry>
            <geometry q="534412.9472988568,5211648.158671195,0 534470.4027142564,5211663.538728009,0 534515.3872750037,5211682.880969166,0 534516.4251188312,5211683.3315199055,0" s="182.0080295965511" x="534412.9472988568" y="5.2116481586711947E6" hdg="1.4686114580856655" length="109.57639691498612">
                <line></line>
            </geometry><br>
Userlevel 4

Try specifying only the X and Y values as a parameter:

q="{geom:get-points("xy")}"

See also the documentation:

http://docs.safe.com/fme/2018.1/html/FME_Desktop_Documentation/FME_Transformers_HelpPane/XQuery/XQuery_functions.htm

Badge

Try specifying only the X and Y values as a parameter:

q="{geom:get-points("xy")}"

See also the documentation:

http://docs.safe.com/fme/2018.1/html/FME_Desktop_Documentation/FME_Transformers_HelpPane/XQuery/XQuery_functions.htm

K thanks it worked. Now i just want the points one by one for my template that the template starts as much as points i have.

 

 

Reply