Skip to main content
Solved

Splitting features from GML

  • January 20, 2022
  • 3 replies
  • 30 views

kumarkannan1980
Participant
Forum|alt.badge.img+6

Dear All,

 

I have GML with various types features like building, stream, road etc. In building feature member there are sub types like representation_point, roof_outline , roof_surface. My task is to extract only representation_point from building feature member. Kindly advice which transformer I have to use or steps to achieve the task. I tried xmlflattener but ended up with failure.

Best answer by takashi

Hi @Takashi Iijima​ 

 

Thanks for the reply, please find the attached sample GML file.

 

Thank you for sharing the sample data.

I think using the XML reader would be an easy way in this case.

 

Open the Add Reader dialog (Workbench Menu: Readers > Add Reader).

Select "XML (Extensible Markup Language)" as format, set the source dataset, click [Parameters] button to open the parameters dialog, then select the "representationPoint" element as a feature path as in:

 

xml-reader-parameters 

Close the Add Reader with [OK], then a feature type called "representationPoint" will appear on the canvas.

You can then add the GeometryReplacer to create point geometry from the XML fragment read by the reader.

geometryreplacer 

Hope this helps.

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
  • 7843 replies
  • January 20, 2022

Hi @kumarkannan1980​ , depending on whether you have the XML Schema or not.

If you have the XML Schema file(s) (*.xsd) for the dataset or the XML document contains appropriate schema location and can access there automatically via Internet, try reading the dataset with OGC GML reader.

Otherwise, consider using the GMLnoSchema reader or the regular XML reader. In that case, the reader parameters setting depends of the data structure, so it would be better you could share the dataset sample here.


kumarkannan1980
Participant
Forum|alt.badge.img+6
  • Author
  • Participant
  • 39 replies
  • January 20, 2022

Hi @kumarkannan1980​ , depending on whether you have the XML Schema or not.

If you have the XML Schema file(s) (*.xsd) for the dataset or the XML document contains appropriate schema location and can access there automatically via Internet, try reading the dataset with OGC GML reader.

Otherwise, consider using the GMLnoSchema reader or the regular XML reader. In that case, the reader parameters setting depends of the data structure, so it would be better you could share the dataset sample here.

Hi @Takashi Iijima​ 

 

Thanks for the reply, please find the attached sample GML file.

 


takashi
Celebrity
  • 7843 replies
  • Best Answer
  • January 20, 2022

Hi @Takashi Iijima​ 

 

Thanks for the reply, please find the attached sample GML file.

 

Thank you for sharing the sample data.

I think using the XML reader would be an easy way in this case.

 

Open the Add Reader dialog (Workbench Menu: Readers > Add Reader).

Select "XML (Extensible Markup Language)" as format, set the source dataset, click [Parameters] button to open the parameters dialog, then select the "representationPoint" element as a feature path as in:

 

xml-reader-parameters 

Close the Add Reader with [OK], then a feature type called "representationPoint" will appear on the canvas.

You can then add the GeometryReplacer to create point geometry from the XML fragment read by the reader.

geometryreplacer 

Hope this helps.