I could not visualize the boundry of the polygon and extract the geograhphic location
Dear FME community.
I got xml data with geographic location, I tried to use coordinateExtractor but I could not get x and y coordinates and I could not also visualize the polygon using FME inspector. How do Extract the X and y attribute?
Any idea would be apricated and thank you in advance.
Page 1 / 1
You can extract the GML data in the XMLFragmenter, followed by a GeometeryReplacer to convert the GML to a geometry.
You can also use a StringSearcher to search for the GML part of the XML. The regular expression in the StringSearcher could be something like
(<gml:Surface .*?</gml:Surface>)
The exact implementation depends on your XML data.
Thank you for your prompt replay. I don’t know if I have formulated my question good. FME is not understanding the list of coordinates in my XML. I tried to use the transformer
"GeometeryReplacer "like you said, still I am getting error.
Hi, seems to work fine on 2023.2, could the workspace attached help you?
Entered the gml from your screenshot as an attribute, makes a geometry of it!
I think the question behind the question is how to extract the GML data from the XML.
Thank you. I am using data Interoperability ,I guess it is has same transformers as FME. Still I am not getting Geometric attributeT
GeometryReplacer_<Rejected> (TeeFactory): GeometryReplacer_<Rejected>: Termination Message: 'GeometryReplacer output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''
You use the whole XML in the GeometryExtractor, but you should first create an attribute that contains only the GML part of the XML.
The exact implementation depends on your XML data.
I’m not familiar with data interoparability, but it should be the same transformers indeed.
Thanks for your workspace, but the sourcefile is missing (test.xml), if you could share it might be easier to help?
I see you use an attribute “vlaklocatie.surfaceMember.Polygon.exterior.LinearRing.posList” in the geometryreplacer, but that should be “vlaklocatie.surfaceMember” (I think, as geomancer mentioned it should be the gml-part of the xml)
I really appreciate for your help. Indeed it is easier if I send the example of XMl I am dealing with. Hooping you will get some time to look at it.
Once again Thank you!!
Thanks, if in the XML-reader you set ‘Elements to Match’ to (based on the xml you just send):
Thank you for your help. Now it is working . The probleem was with the workspace Parameter. It was rejecting it now i changed the setting to continue Translation