Skip to main content
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>
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
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.

 

 


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

Reply