Skip to main content
Solved

GML: CircleByCenterPoint

  • April 18, 2014
  • 3 replies
  • 75 views

Hello,

 

 

I have a GML in WGS84 coordinate system (EPSG:4326). The GML contains CircleByCenterPoint element, which has its radius set in kilometers. However, if I open the file with Universal Viewer, FME interprets the radius in degrees of latitude/longitude and the circle is therefore extremely huge.

 

 

I would appreciate a suggestion how to convince FME to take the units of measure into account. Thanks

 

 

Example:

 

 

<gml:patches>

 

                                    <gml:PolygonPatch interpolation="planar">

 

                                       <gml:exterior>

 

                                          <gml:Ring>

 

                                             <gml:curveMember xlink:type="simple">

 

                                                <gml:Curve>

 

                                                   <gml:segments>

 

                                                      <gml:CircleByCenterPoint interpolation="circularArcCenterPointWithRadius" numArc="1">

 

                                                         <gml:pos>47.36388888888889 17.500555555555554</gml:pos>

 

                                                         <gml:radius uom="KM">10</gml:radius>

 

                                                      </gml:CircleByCenterPoint>

 

                                                   </gml:segments>

 

                                                </gml:Curve>

 

                                             </gml:curveMember>

 

                                          </gml:Ring>

 

                                       </gml:exterior>

 

                                    </gml:PolygonPatch>

 

                                 </gml:patches>

Best answer by takashi

Hi Vincent,

 

 

The GML reader seems to always assume unit of radius as same unit of coordinates. A workaround I can think of is:

 

Read the source with the XML reader to extract coordinate of center and radius as attribute values,

 

Reproject the coordinate value into UTM etc. (AttributeReprojector),

 

Create circle geometry based on the coordinate and radius (2DEllipseReplacer),

 

Reproject the circle into WGS84 (LL) (Reprojector).

 

 

Hope this helps.

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • Best Answer
  • April 20, 2014
Hi Vincent,

 

 

The GML reader seems to always assume unit of radius as same unit of coordinates. A workaround I can think of is:

 

Read the source with the XML reader to extract coordinate of center and radius as attribute values,

 

Reproject the coordinate value into UTM etc. (AttributeReprojector),

 

Create circle geometry based on the coordinate and radius (2DEllipseReplacer),

 

Reproject the circle into WGS84 (LL) (Reprojector).

 

 

Hope this helps.

 

Takashi

webservicessia
Contributor
Forum|alt.badge.img+1
Hi Vincent,

 

 

The GML reader seems to always assume unit of radius as same unit of coordinates. A workaround I can think of is:

 

Read the source with the XML reader to extract coordinate of center and radius as attribute values,

 

Reproject the coordinate value into UTM etc. (AttributeReprojector),

 

Create circle geometry based on the coordinate and radius (2DEllipseReplacer),

 

Reproject the circle into WGS84 (LL) (Reprojector).

 

 

Hope this helps.

 

Takashi
Hello,

 

How to create a GML circle when UnitOfMeasure is an attribute that can be meters, kilometrers or nautical Miles ?

 

The ouptut is XML file that need to keep the CircleByCenterPoint type and the initial UOM.

 

 


Forum|alt.badge.img
  • November 4, 2017
Hello,

 

How to create a GML circle when UnitOfMeasure is an attribute that can be meters, kilometrers or nautical Miles ?

 

The ouptut is XML file that need to keep the CircleByCenterPoint type and the initial UOM.

 

 

La solution est là :

 

 

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