Skip to main content
Question

Transforming donut polygon to GML


Forum|alt.badge.img

Hi,

How do I transform donut polygons with a variable amount of holes from ESRI database to GML?

So far I have only succeeded in transforming one hole per polygon. Below is the code inside my XMLTemplater transformer.

<hy-p:geometry>

 

<gml:Polygon gml:id="id{fme:get-attribute("OBJECTID")}">

 

<gml:exterior>

 

<gml:LinearRing>

 

<gml:coordinates>{fme:get-attribute("_coord_outer")}</gml:coordinates>

 

</gml:LinearRing>

 

</gml:exterior>

 

<gml:interior>

 

<gml:LinearRing>

 

<gml:coordinates>{fme:get-attribute("_coord_hole")}</gml:coordinates>

 

</gml:LinearRing>

 

</gml:interior>

 

</gml:Polygon>

 

</hy-p:geometry>

Kind regards

Kristina Danielsson

4 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 6, 2017

Use the GeometryExtractor to create an attribute for the GML definition and insert that in the XMLTemplater.


Forum|alt.badge.img
  • Author
  • November 9, 2017

Thanks for the tip erik_jan, it works perfectly in the FME-inspector.

 

However when I read the GML-file with QGIS my polygons turn out all twisted and mirrored?

FME-Inspector

QGIS

//Kristina


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 9, 2017
krda123 wrote:

Thanks for the tip erik_jan, it works perfectly in the FME-inspector.

 

However when I read the GML-file with QGIS my polygons turn out all twisted and mirrored?

FME-Inspector

QGIS

//Kristina

Not sure. I do not use QGis.

 

Could it be the version of GML.

 

The GeometryExtractor has a number of GML versions you can choose.

 

You might want to try the different options.

 

 


Forum|alt.badge.img
  • Author
  • November 13, 2017
krda123 wrote:

Thanks for the tip erik_jan, it works perfectly in the FME-inspector.

 

However when I read the GML-file with QGIS my polygons turn out all twisted and mirrored?

FME-Inspector

QGIS

//Kristina

Thankyou again,

 

I examined the different versions of GML which led me to realize that I had two swap X,Y with the CoordinateSwapper before extracting the geometry.

 

 

//Kristina

 

 


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