span8
span4
span8
span4
You can read GML and XML in FME using one of four approaches:predefined GML profilesfor specific GML formats,FME's GML readerwith or without an application schema,FME's XML readerwithFeature Paths或者XfMaps, orXML.to XML translationsusing XMLUpdater, XQuery and other XML processing transformers. If you have just started using FME for reading XML/GML we recommend reviewingReading XML - Simple Approach using Feature Pathsfirst.
在某些情况下,有一组应用程序模式被分组在一起并称为aGMLprofile. This essentially constitutes another GML format, since it would be rather complex to read and write data to one of these GML profiles without some custom development. Thus Top10 GML, German NAS, OS MasterMap and CityGML are all examples of GML profiles that we have implemented as separate formats.
In many cases, you can simply use theGML reader盒子外面。我们在最近的版本中对我们的GML阅读了很多改进,因此它比几年前更灵活。即使是FME支持的GML的范围,通常人们也可以忘记支持读取特定GML结构所需的文件。在许多情况下,存在超出标准GML的对象,因此您需要提供一个application schema file (.xsd). .xsd files are critical for interpreting GML since often it is not enough to have access to the GML 3.2.1 schemas. Most user or custom defined GML objects require the presence of an xsd or xml schema definition file in order to read them. In fact, you can import the GML schema from an .xsd file without even having any .gml data.
Even with the schema document, the GML reader may have trouble reading your schema. If you are reading complex gml, you may get list structures or xml_buffers which you need to use list functions and XQueries to deconstruct in order to access the content. InFME 2016+,Ignore Application Schema模式使GML读者能够在没有应用程序模式文件(.xsd)的情况下读取GML。通过忽略应用程序模式模式,模式是多么糟糕,或者是多么不可见,我们可以读取数据。默认情况下,此模式扫描查找GML功能的元素(通常是成员或Featuremember的即时子项),然后读取它们包含的任何属性和GML几何形状。
另一个选择是使用XML.Reader, and then use aFeature Path,XQuery或者Xfmap将XML映射到功能属性和几何图形中。推荐的方法是使用Feature Pathstoidentify the element tags to use for feature extraction. This approach also includes an option to flatten nested elements into parent.child attribute names making them easier to use in relational structures. Other options include the use ofXQueries,whichare something like SQL for XML and constitute XML expressions used to query and modify XML data sets.Xfmapscan be used to define the attribute and geometry components of the data structure. You can also use the XML Reader in conjunction with a wide range ofXML.transformerswe provide for XML processing such as XMLFlattener, XMLUpdater, XMLFeatureMapper, XMLFragmenter, and for XQueries. For more information, please start by reviewing the article onXML.Reading with Feature Paths.
For those with more background in XML and scripting, there are also articles onXQuery, XfMaps, and XML Processing.
You can also do GML to GML translations and useXQuery或者XML.Updaterto 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, and you just want to update or modify some component of the data but not create a new dataset.XQueryrequires knowledge of the XQuery scripting language which is something like SQL for XML. XQuery transformers include : XQueryExtractor, XQueryExploder, XQueryUpdater.XML.Updateris a new FME transformer that allows you to do insert, delete, update operations on XML while preserving the overall structure and without having to do any scripting. See articles onXQuery或者XML.Updaterfor more information.
FME supports reading from GML 2.1.2, 3.1.1 and 3.2.1.
The GML reader will scan the data, detect version, and call the correct reader version accordingly.
Now, just because we say we read a particular version of GML, it doesn't mean we can read froma particular GML schema盒子外面。It also does not mean we have implemented the entire schema of what is theoretically possible. Practically no one has done this. 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 only implemented simple feature profile level 0, which covers points, lines, polygons, but not arcs or ellipses, etc.
So are there GML datasets which are believed to comply with GML specs that we cannot read? This is entirely possible, but it may be that the user has not configured the reader correctly or is missing some of the .xsds required (xsds often have external or nested references). Or there may be complex structures that are interpreted as lists and need some involved list indexing and processing in order to extract the required information. In any case, the best thing to do would be to send some sample data toTechnical Supportand we can take a look.
WARNING - No explicit XML Schema specified (through the XSD_DOC keyword) nor an xsi:schemaLocation was found in dataset
...the problem is that GML has a very flexible structure that varies from file to file and is determined by a "schema" document.
FME基金支持的一些简单的GML结构ures, but for more complex or customized structures it can do nothing without the schema document.
读取GML时,FME将尝试将SRSName URI字符串转换为其FME等价物。如果坐标sys名称是“epsg:####”形式,那么所有应该是很好的,但失败了有一个有助于GML读者执行匹配的文件。该文件位于{FME installed dir}\xml\gml\xfmaps\gml_keywords.xml.
The other function served by this gml_keywords.xml file is to specify the axis order for the coordinate system; for example is it X/Y or Y/X. Right now, only EPSG:4326 and EPSG:4329 are listed:
<集团name="srsName-to-axisOrder">
Coordinate systems not listed default to x,y (1,2). Reading GML 2.1.2 is fine, because each axis is separated by a comma and each coordinate tuple is separated by whitespace, therefore we can at least calculate the dimension implicitly. However, this may cause trouble for GML 3.1.1 coordinates because coordinates axes and tuples are both whitespace separated so there's no implicit way to determine the dimension.
This could be a particular issue for custom coordinate systems (you can even have custom EPSG definitions) in which case change the axis order by updating the "srsName-to-axisOrder" portion in gml_keywords.xml. After adding the custom (EPSG) definition to FME, set axis order values to "1,2" for x,y, "2,1" for y,x, or use the equivalent 3Ds "1,2,3" for x,y,z or "2,1,3" for , y,x,z.
亚搏在线安全文档:
Readers and Writers - GML
Readers and Writers - XML
Blog - It's All About Data: Loving XML with FME 2012
The following links are provided for reference only and are not endorsed in whole or in part by Safe Software:
维基百科:
http://en.wikipedia.org/wiki/Geography_Markup_Language
From Legos to Varieties of GML Lite:
http://www.directionsmag.com/article.php?article_id=2408
Lost in Abstraction - What Went Wrong with GML
http://www.artima.com/forums/flat.jsp?forum=123&thread=204378
ESRI: "GML Profiling: Why It's Important for Interoperability"
http://www.esri.com/news/arcuser/0403/gml.html
Use Profiles to Overcome GML's Complexity
http://www.ogcnetwork.net/node/603
...to point to the location of the VMAP0.xsd on your machine.
2) Read the data using the reader XML. Under Settings, select 'Use XRS file' and browse to the modified natoxrs.xml file.
AIXM Airports to INSPIRE Air Transport Networks
INSPIRE GML Reading Writing and Validation Basics
Integration example for OGC CSW Data Catalog And Repository with FME Server
Converting CityGML to INSPIRE 3D Buildings (Annex III)
INSPIRE Protected Areas Demo (FME 2011 to 2013)
Reading Complex XML or GML using XfMap
AIXM 4.5 and 5.1 Reading, Writing and Validation - EU Airports Demo
© 2020 Safe Software Inc |Legal