Question

Arcbycenterpoint to draw with FME and output in gml format

  • 5 November 2017
  • 3 replies
  • 5 views

Badge

Hi

I have too many problems to solve this question. So any help would be appreciated.

I have a point (centerpoint ) defined in geolat and geolong coordinates. No problem for me to have this point in decimal degrees or in radian coordinates.

I have also a radius (23 NM ). I found a way to output this radius in 2 coordinates of meters (primary axis x is East -West and secondary axis is North -South ) because i draw this circle with a ellipsoidal représentation. It's an airspace and when i project this airspace with FME i have to obtain an ellipse.

Formulae here : https://knowledge.safe.com/articles/725/calculating-accurate-length-in-meters-for-lat-long.html

( the excel file do the job )

In input i gave the latitude of the centerpoint in décimal degrees. For my example ( 44°49'37"N - 0°43'16"W) and in decimal degrees (44,82694444 ; -0,72111111). I obtained 2 values with the Excel file.

For latitude : 0,0089986 degrees per 1000 m

For longitude : 0,0126448 degrees per 1000 m

I multiplied these values per 42,596 ( the value of 23 NM in km) and i obtained :

For longitude : 0,5386179 ( x axis)

For latitude : 0,3833044 ( y axis)

These 2 last values are for the primary axis (x) and the secondary axis (y) of the final arcbycenterpoint.

This is for the first step. ...

In a second step i have to calculate the beginning and the ending of the arc. The beginning is obtained with an angle measured from the center to the direction of the starting point ( fictious point). Same way for the ending angle. No problem to obtain the startangle and the endangle and to measured them with the origin of the measures on the axis East-West with positive value in counterclockwise.

I obtained :

startangle : 129,05663

endangle : - 6,278174

The sweepAngle ( endangle - Startangle ) gives me -135.

All is nice. So i want now to draw this arc with FME. I saw a function in the FME objects api - Fmearc () and i would like to know how to set my parameters in a Python Caller transformer ( primary radius, secondary radius, center point , startangle, sweepAngle ) and if i'm on the correct way to do this job.

In the workbench shall i use some reprojector transformers before going in the Python caller. Before this transformer my coordinates are LL84 ( my famous center) and i have all the coordinates of the arcbycenterpoint in meters - ground unit . Am i on the true way ?

I have to obtain a structure like this one

In output i want obtained a gml description with the geometryExtractor

Any help in Pyhon and with reprojector would be nice

And if it exists an other way to obtain my arc. .....

Thanks a lot


3 replies

Userlevel 2
Badge +17

Since the parameters are given already, you can create an arc with the 2DArcReplacer transformer easily.

0684Q00000ArKXPQA3.png

If you need to create the arc in a Python script, the fmeobjects.FMEArc class with this constructor might help you.

init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)

According to the documentation, startPoint and endPoint are optional, so can be omitted. See the Python FME Objects API Reference to learn more.

Badge

Since the parameters are given already, you can create an arc with the 2DArcReplacer transformer easily.

0684Q00000ArKXPQA3.png

If you need to create the arc in a Python script, the fmeobjects.FMEArc class with this constructor might help you.

init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)

According to the documentation, startPoint and endPoint are optional, so can be omitted. See the Python FME Objects API Reference to learn more.

Hi,

 

 

Do you think my parmeters are correct ?

 

Do i need to have a "reprojector " transformer before the Python caller  or the 2Darcreplacer ( such as CSmapreprojector you gave me in a previous workbench ) 

 

I will try 2Darcreplacer. 

 

Is there any other way to construct this arc ?

 

Thanks a lot 

 

Userlevel 2
Badge +17

Since the parameters are given already, you can create an arc with the 2DArcReplacer transformer easily.

0684Q00000ArKXPQA3.png

If you need to create the arc in a Python script, the fmeobjects.FMEArc class with this constructor might help you.

init(centerPoint, rotation, primaryRadius, secondaryRadius, startAngle, sweepAngle, startPoint, endPoint)

According to the documentation, startPoint and endPoint are optional, so can be omitted. See the Python FME Objects API Reference to learn more.

I don't know if the parameters are correct.

 

In my personal view, I think a circular arc determined by the radius and start / end coordinates reprojected to an appropriate projected coordinate system is closer to the shape of the real feature.

 

Reply