Skip to main content
Question

Writing OS Mastermap

  • January 9, 2020
  • 4 replies
  • 111 views

jaslee
Participant

I would like to know if it is possible to import OS Mastermap Topography layers in GML, clip an area of interest and then export that in exactly the same format as the input?

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.

4 replies

mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • January 10, 2020

In 2019.2 it looks like we have two versions of that format supported:

As long as the version you use has a Writer (which one of them has) then it should be OK to export it back to the same format.


jaslee
Participant
  • Author
  • Participant
  • January 10, 2020

In 2019.2 it looks like we have two versions of that format supported:

As long as the version you use has a Writer (which one of them has) then it should be OK to export it back to the same format.

Thanks for your reply Mark. I have tried importing a small 5x5km chunk of Mastermap data and straight output again (i.e. no transformers used) using the "OS_MASTERMAP_TOPOGRAPHY_GML" Reader and Writer. But I only get an output GML file with a lot of "<!-- orphaned feature ..>" features.

If I tried either the GML or GML2 writer, making sure to set the schema to the latest "https://www.ordnancesurvey.co.uk/xml/schema/v9/OSDNFFeatures.xsd" from OS, I at least get meaningful output GML but unfortunately the syntax is not exactly the same as the source GML.


Forum|alt.badge.img+2

Hi @jaslee,

In order to avoid outputting a GML File with orphaned features you will need to define the Feature Collection Feature Type as well as the topography layer you are working with.

If you are working with existing Mastermap data you can simply read in the Feature Collection along with your Desired Layer:

Then write both these Feature Types out to the same writer and you should achieve the desired result.

Alternatively there are parameters to define the Feature Collection in the Advanced Parameters section of the Writer (http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_ReadersWriters/os_mastermap_topography_gml/os_mastermap_topo_gml_writer.htm).


jaslee
Participant
  • Author
  • Participant
  • January 13, 2020

Hi @jaslee,

In order to avoid outputting a GML File with orphaned features you will need to define the Feature Collection Feature Type as well as the topography layer you are working with.

If you are working with existing Mastermap data you can simply read in the Feature Collection along with your Desired Layer:

Then write both these Feature Types out to the same writer and you should achieve the desired result.

Alternatively there are parameters to define the Feature Collection in the Advanced Parameters section of the Writer (http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_ReadersWriters/os_mastermap_topography_gml/os_mastermap_topo_gml_writer.htm).

Many thanks Holly. Including the FeatureCollection layer, as you say, helps in outputting the GML correctly.