Solved

Splitting features from GML

  • 20 January 2022
  • 3 replies
  • 2 views

Badge +1

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.

icon

Best answer by takashi 20 January 2022, 11:51

View original

3 replies

Userlevel 2
Badge +17

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.

Badge +1

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.

 

Userlevel 2
Badge +17

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.

Reply