Skip to main content
Question

How to create a good geometry with coordinates x,y


Forum|alt.badge.img

Hello

I have a lot of points with coordinates x,y in latitude,longitude.

These points are grouped in records. Each record is identified with an unique identifier. Call it "Id". Each record can have multiple points

In a record each point must be joined to the next one following it by 2 means :

1- a straight line

2 - an arc of circle

When the arc of circle is used, we need to have the center point coordinates and the radius. An attribute is used for that with the coordinates of the 2 points which have to be joined to form the arc.

The end point has to be joined with the first one by a straight line.

I have to draw this geometry for each record and i don't know the way of doing this.

1 - polygones

2 - polygones with arc of circles.

Any help would be great

13 replies

takashi
Evangelist
  • October 21, 2017
There should be a way, but specifically depending on the source data structure. Could you please share a sample source dataset with us?

 

 


Forum|alt.badge.img
  • Author
  • October 22, 2017

45-lfbd-2-1.png

Here is a short sample of the dataset


takashi
Evangelist
  • October 22, 2017
philippe33 wrote:

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.

 

 


takashi
Evangelist
  • October 22, 2017
philippe33 wrote:

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.

 


takashi
Evangelist
  • October 22, 2017
philippe33 wrote:

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?

 


Forum|alt.badge.img
  • Author
  • October 22, 2017

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.


takashi
Evangelist
  • October 22, 2017
takashi wrote:
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.

 

 


Forum|alt.badge.img
  • Author
  • October 22, 2017

20171018-154525.png


takashi
Evangelist
  • October 22, 2017
philippe33 wrote:

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.

 

 


Forum|alt.badge.img
  • Author
  • October 23, 2017

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


takashi
Evangelist
  • October 23, 2017

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)


Forum|alt.badge.img
  • Author
  • October 25, 2017

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


Forum|alt.badge.img
  • Author
  • October 29, 2017

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


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