There should be a way, but specifically depending on the source data structure. Could you please share a sample source dataset with us?
45-lfbd-2-1.png
Here is a short sample of the dataset
45-lfbd-2-1.png
Here is a short sample of the dataset
hmm, it's hard to understand what the XML snippet means without any explanation on the meaning of each element. I guess:
- The Abd element represents the boundary of a polygon.
- Each Avx element represents a vertex with the coordinates (geoLong, geoLat).
- codeType = CWA means that this Avx and the next Avx should be connected by an arc with the center (geoLongArc, geoLatArc) and the radius valRadiusArc.
- codeType = GRC means that this Avx and the next Avx should be connected by a straight line segment.
- geoLat(Arc) and geoLong(Arc) are DMS coordinates. e.g. 450724.00N = 45 degrees 7 minutes 24.00 seconds north latitude, 0010341.00W = 0 degrees 3 minutes 41.00 seconds west longitude.
Am I right?
The missing information is what the coordinate system WGE is, and what the unit NM of the arc radius is. Unless those are clarified, the arc cannot be created anyway.
45-lfbd-2-1.png
Here is a short sample of the dataset
And please attach an XML document (text file) that contains at least one complete Adb element (polygon), rather than screenshots.
45-lfbd-2-1.png
Here is a short sample of the dataset
One more missing information. How can you identify the orientation of each arc segment?
Perhaps does the codeType "CWA" mean "ClockWise Arc"?
If so, is there the code "CCWA" - "Counter-ClockWise Arc" too?
Hi
I confirm you are right with all.
CWA means ClockWise Arc.
CCA means Counter Clockwise Arc.
NM means Nautical Miles ( 1 NM = 1852 m)
The initial format is in XML
WGE is for WGS 84.
<abd> is for the record of one boundary
<avx> is the set of vertices for one boundary.
I can send you tomorrow a more complete dataset. I'm not at office today.
One more missing information. How can you identify the orientation of each arc segment?
Perhaps does the codeType "CWA" mean "ClockWise Arc"?
If so, is there the code "CCWA" - "Counter-ClockWise Arc" too?
oops, the information regarding orientation was not necessary, since the orientation of an arc can be determined by start, end, and center points. Ignore the comment above.
Hi
I confirm you are right with all.
CWA means ClockWise Arc.
CCA means Counter Clockwise Arc.
NM means Nautical Miles ( 1 NM = 1852 m)
The initial format is in XML
WGE is for WGS 84.
<abd> is for the record of one boundary
<avx> is the set of vertices for one boundary.
I can send you tomorrow a more complete dataset. I'm not at office today.
Thanks for your confirmation. I wait for the dataset.
Hi,
As discussed yesterday, i send you a short dataset in XML format.
Let me know if you have some advices for the drawing of such geometries.
Thanks in advance
airspace45.xml
Hi @philippe33, thanks for sharing the XML document. If I understood the requirement correctly, this workspace would work as expected.
xml2none.fmwt (FME 2017.1)
Hi Takashi
Your workbench is wonderfull !!! It gives me really a good approching result.
After attaching a geometryExtractor at the end of the workbench the GML Description obtained is < gml: Curve> with properties like radius , startAngle,sweepAngle ....
For the drawing of airspaces in the ellipsoid representation of Earth the correct geometry to represent them is an Ellipse.
I obtained a formula which seems to be correct (known as Vincenty inverse iterative formula ) to obtain such accurate geometries.
With this iterative formula ( 2 points geolat geolong in input and the coordinates of the center) we obtain the azimuth for the first point (startAngle ) with a very nice accuracy and the azimuth of the second point (endAngle ).the sweepAngle is the sum of the two angles obtained .
In FME representation this arc is an ellipsoid arc with the definition of the radius ,startAngle,sweepAngle ,and the beginning and ending points.
I have to put this formula written in C # probably in the Python transformer to replace your initial calculation or in different FME transformers
If you can help me to translate this formula in Python script. ...
Many many thanks in advance for your help
Hi @takashi
I have this formulae to insert in a PythonCaller transformer to retrieve the value of startAngle and EndAngle in order to have the correct bearing indication (maximum of accurate ) for the arc. And then construct the arc with only these values ( center, startAngle, endAngle radius ).
I find the formulae in Python and i would like to know if i have to copy/paste this one in a transformer to match with the desired result.
I know i have to call the FMEarc() function with center, startAngle, endAngle, radius to obtain in output a geometry "arcbycenterpoint " but i don't know Python language at all ...
Can you give me an advice please ?
Thanks .
-init.py