Skip to main content
Solved

Splitting features from GML


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

kumarkannan1980 wrote:

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.

View original
Did this help you find an answer to your question?

3 replies

takashi
Celebrity
  • 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
takashi wrote:

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
  • Best Answer
  • January 20, 2022
kumarkannan1980 wrote:

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


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