Skip to main content

Hello,

I want to run a translation from GML to MS Spatial. There are two geometries (xml_geometry) in the feature collection feature type of my GML: TileExtent and BoundedBy. I would like to write either of them into a polygon.

If I inspect my GML with the FME Inspector, neither geometry is being picked up - BoundedBy example:

<gml:boundedBy>

<gml:Box srsName='osgb:BNG'>

<gml:coordinates>405000.00,205000.00 410000.00,210000.00</gml:coordinates>

</gml:Box>

</gml:boundedBy>

Could you please point me in the right direction?

Thanks

Hi @honkovam, since the xml fragment (<gml:boundedBy> element) is written in GML format, you can create the box geometry using the GeometryRepalcer transformer (Geometry Encoding: GML).


Hi @takashi,

thank you for your suggestion. I added the Geometry Replacer but it errored:

ERROR |The @GMLGeometry function failed to parse the GML text from the specified 'boundedBy' attribute, check the attribute for valid XML data.

Maybe the boundedBy element should have envelope inside instead of box?

Could I extract only the gml coordinates and build geometry out of these?

Thanks.


Hi @takashi,

thank you for your suggestion. I added the Geometry Replacer but it errored:

ERROR |The @GMLGeometry function failed to parse the GML text from the specified 'boundedBy' attribute, check the attribute for valid XML data.

Maybe the boundedBy element should have envelope inside instead of box?

Could I extract only the gml coordinates and build geometry out of these?

Thanks.

The GeometryRepalcer (Encoding: GML) can create a geometry only when the specified attribute has a GML fragment like you posted first. What value does the 'boundedBy' attribute have actually?

 

 


The GeometryRepalcer (Encoding: GML) can create a geometry only when the specified attribute has a GML fragment like you posted first. What value does the 'boundedBy' attribute have actually?

 

 

As I posted -

 

 

<gml:boundedBy>

 

<gml:Box srsName='osgb:BNG'>

 

<gml:coordinates>405000.00,205000.00 410000.00,210000.00</gml:coordinates>

 

</gml:Box>

 

</gml:boundedBy>

 

 


As I posted -

 

 

<gml:boundedBy>

 

<gml:Box srsName='osgb:BNG'>

 

<gml:coordinates>405000.00,205000.00 410000.00,210000.00</gml:coordinates>

 

</gml:Box>

 

</gml:boundedBy>

 

 

strange, I was able to create a box from the GML fragment...

 


Hi, reading the xml/gml as text and fragmenting it with the xml fragmenter transformer will automatically create an xml_fragment attribute that can be used in the geometryreplacer


strange, I was able to create a box from the GML fragment...

 

@takashi

 

yeah, I tried your workflow of creating ... and it worked but it wouldn't work for the actual GML file...

 

I don't understand why both xml_geometry fields have <missing> value?

 


Reply