Skip to main content
Question

Transforming donut polygon to GML

  • November 6, 2017
  • 4 replies
  • 40 views

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

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.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • 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
  • 2 replies
  • 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+22
  • Contributor
  • 2179 replies
  • 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

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
  • 2 replies
  • November 13, 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

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