Skip to main content
Question

BoundedBy to geometry

  • August 19, 2016
  • 7 replies
  • 63 views

Forum|alt.badge.img

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

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.

7 replies

takashi
Celebrity
  • August 19, 2016

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).


Forum|alt.badge.img
  • Author
  • August 19, 2016

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.


takashi
Celebrity
  • August 19, 2016

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?

 

 


Forum|alt.badge.img
  • Author
  • August 19, 2016
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>

 

 


takashi
Celebrity
  • August 19, 2016
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...

 


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • August 19, 2016

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


Forum|alt.badge.img
  • Author
  • August 19, 2016
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?