斯潘8
span4
您可以使用以下五种方法之一在FME中写入GML或XML:为国家格式等标准预定义的GML配置文件,FME's default GML for simple schemas,带有xmlTemplater的模板,用于更复杂的XML以符合应用程序模式,XQuery / XMLUpdater,or XSLT style sheets.然而,since most XML does need to comply with an application schema,除非您正在写入我们已经支持的XML或GML配置文件,您很可能需要使用xmlTemplater来编写XML。
在某些情况下,有一组应用程序模式组合在一起,称为gml profile.这基本上构成了另一种GML格式,since it would be rather complex to read and write data to one of these GML profiles without some custom development.Thus Top10 GML,德国NAS,OS MasterMap and CityGML are all examples of GML profiles that we have implemented as separate formats.
对于简单的GML,您可能只需要设置默认翻译,然后根据需要修改目标模式。This can work for flat data structures where each feature is composed of a geometry and a set of attributes but doesnt have nested child elements or abstract types.In these cases the GML writer has an option to generate an xsd when writing GML to facilitate reading it later on.You can also import the destination GML schema from an XSD,although there are limits to the extent that we will support nested structures.These are usually modeled as lists.
You can also do GML to GML translations and useXQuery或XMLUpdaterto modify existing xml structures without mapping them to relational ones.This may be the best approach when your source data is already in XML or GML,您只需要更新或修改数据的某些组件,而不创建新的数据集。See articles onXQuery或XMLUpdater更多信息。
In other cases the type of GML schema may be complex and involve nesting,abstract types,多个命名空间等。Writing to complex application schemas usually requires the use of XMLTemplater or XSLT stylesheets.
是否有GML数据集被认为符合我们无法写入的GML规范?这是可能的,但我还没有遇到我们无法写入的GML结构。然而,some schemas are so complex that transforming the data to populate them can take a lot of work.The best thing to do in such cases is to send some sample data to技术支持and we can take a look.
As our GML developer puts it,“编写任意的GML应用程序模式不是一个小问题”!The reason is that an application schema essentially represents a unique format.因此,当您想要写入特定的应用程序模式时,您实际上需要一个新的GML概要文件编写器。
将数据转换为用户定义的模式的一种方法是创建样式表并使用它通过XSLT .一种更简单的方法是基于模式定义一个XML模板,并使用新的XMLTemplater to merge your data into that schema.For more information on each of these approaches see the fmepedia documentation on:
FME支持读写GML 2.1.2,3.1.1 and 3.2.1.
Basically,GML读卡器将扫描数据,detect version,and call the correct reader version accordingly.For writing you need to add the writer associated with what GML version you want.
Now,就因为我们说我们读写了一个特定版本的GML,这并不意味着我们可以读或写a particular GML schemaout of the box.这也不意味着我们已经实现了理论上可能实现的整个模式。实际上没有人这样做。This is because the specification for what can be defined in GML is hundreds of pages long (500+),and so every software developer needs to decide what subset of this they want to implement and support.For example,ESRI只实现了简单的功能概要级别0,包括点,lines,polygons,but not arcs or ellipses,等。
Even with the range of GML that FME supports (see the GML Quick Facts section for an overview),often people can forget that there are supporting files required to read a specific GML structure.与任何XML文档一样,GML可以用不同的方式解释。This is why application schemas - .xsd files are critical to reading a gml file.通常,访问GML 3.2.1模式是不够的。大多数用户或自定义的GML数据结构都需要有XSD或XML模式定义文件才能读取.gml文件。In fact,您可以从.xsd文件导入gml模式,而不需要任何.gml数据。
srsname=“epsg:”
我们选择这种方法是最明智的,但令人欣慰的是,它似乎也正在成为此类信息的事实标准。
当我们无法将用户的坐标系与EPSG等效物匹配时——当用户有自定义坐标系定义时,匹配的可能性很小——我们只需从FME中写出坐标系的名称。This is not much use to whomever gets the file - unless,当然,他们也碰巧使用了FME,并且拥有任何自定义定义——但总比什么都没有要好。
The XML writer on its own is not commonly used.That is because it has no ability to write out geometry,unless you combine it with XSLT.一般来说,除非你能使用GML编写器,we most often recommend using the XMLTemplater with the Text File writer to write out your GML or XML.
有关详细信息,请参阅以下参考资料:
FME文档:
Readers and Writers - GML
以下链接仅供参考,并非全部或部分由安全软件签署:亚搏在线
Wikipedia:
http://en.wikipedia.org/wiki/Geography_Markup_Language
从乐高积木到各种GML Lite:
http://www.directionsmag.com/article.php?article_id=2408
在抽象中迷失-GML出了什么问题
http://www.artima.com/forums/flat.jsp?forum=123&thread=204378
ESRI:“GML分析:为什么它对互操作性很重要”
http://www.esri.com/news/arcuser/0403/gml.html
Use Profiles to Overcome GML's Complexity
http://www.ogcnetwork.net/node/603
© 2019 亚搏在线Safe Software Inc |Legal