span8
第4排
使用FME,可以在一个小工作空间内获得符合inspire的GML。For this demo,a single feature is created with polygon geometry and attributes.然后,该功能的结构与“激励自然风险区”核心模式相匹配。最后,inspire gml writer用于编写危险区域功能,part of Annex III's Natural Risk Zones theme.该演示演示了基于应用程序模式创建有效的inspire GML的简单性。This 亚搏在线workflow can be adapted to suit other INSPIRE themes,since workspaces to write INSPIRE GML usually contain similar steps.
Source data is read with the appropriate reader.In this example,for simplicity,创建一个多边形来表示一个样本特征,in this case a flood risk area,using the Creator transformer.This is also a good way to create a reproduction case when reporting bugs to support.
Unique IDs are generated,根据Inspire的要求。有时数据将包含唯一的标识符,这些标识符可以根据需要使用和格式化。If no unique IDs are available they can be generated with FME as we do here using the UUIDGenerator transformer.Remember to validate the INSPIRE GML which will ensure uniqueness of IDs,或者使用复印机来检测它们。请注意,某些ID(如GML ID)必须以字母开头,不是数字,因此,在attributeCreator(U_u@value(uid))中添加前缀。
创建必要的属性,populated and schema is mapped.源数据可能包含可以重命名以匹配inspire目标属性的属性,a process referred to as schema mapping.However,在源数据中,inspire数据规范所需的某些属性通常是缺乏的,例如日期和区域信息。这些属性可以被赋予默认值,生成,或从模式映射中获取。A variety of transformers may be involved in attribute addition and modification,includingAttributeCreator,请AttributeCopier,请模式映射器,请as well as a number of calculator transformers.
The AttributeCreator structures data to meet the INSPIRE data model requirements:
Data is reprojected to the INSPIRE specified coordinate system.The INSPIRE Directive requires that data be published in ETRS89 (EPSG:4258),or for systems outside of ETRS89,in the ITRS reference system.
Source geometry is named to match the appropriate xml_geometry name(s) in the destination feature type.经常,multiple xml_geometry names will exist,但通常只写出一个XML几何体是可以接受的。For this demo,我们要填充的几何体称为“几何体”。其他XML几何图形是可选的,such as gml_boundedBy or gml_location.几何变换也可能包括组合,restructuring,generalizing or simplifying geometries.在FME中,the transformers most commonly used for this include几何特性分析器为了命名几何图形和定义特征,聚合器对于嵌套几何图形,和GeometryCoercerfor changing geometry types.
这个几何特性分析器用于将几何体名称设置为“几何体”,要匹配危险区域的XML_几何类型之一:
Inspire GML编写器用于编写危险区域目标特征类型。XML模式文档(XSD)可以通过选择inspire主题来指定。或者指定XSD的文件路径。In this example,使用内置的应用程序模式自然风险区核心。Source attributes with the same name as destination attributes are implicitly mapped directly to the destination fields.请注意,即使已映射几何体本身,XML_几何体字段仍保持红色。
使用以下写入程序设置:
在写了激励GML之后,it is important to validate it to ensure that it complies with XML syntax and XSD standards.您可以使用XMLvalidator转换器根据语法和模式检查GML。如果XML无效,in the log the error or errors will be briefly reported,包括线路等细节,列号和错误的简要描述。对于激励数据,错误通常是缺少属性或值的结果。Once an error is corrected,可以再次验证数据以检查修复是否有效。
XML错误似乎有些误导。例如,an error such as the following may be reported: "element 'namespace' is not allowed for content model '(localId,namespace,versionId?)'" In fact,this is often caused by a missing element which is expected earlier,因为命令很重要。在这种情况下,必须在命名空间元素之前定义“InspireID.Identifier.LocalID”,即使两者都是必需的。尝试删除“InspireID.Identifier.LocalID”字段以重现上述验证错误。You can also get similar errors if the schema expects an element to be contained within a parent and you have not defined the correct gml_parent_id.其他常见错误包括缺少ID,日期字段格式不正确,null values without the required xsi_nil set to 'true',and invalid values or improper case for fields with restricted domains such as nilReason set to 'unknown'.
请注意,验证最初会产生许多错误的列表。通过将输出限制到几个典型特性,然后逐个处理错误,简化诊断过程。Again,在像记事本++这样的好的XML编辑器中打印和查看输出gml将使查找问题变得容易得多,因为错误列表包含行和行的编号。
使用XML验证程序转换器的验证工作区:
还可以使用Inspire编写器验证XML输出。在导航器窗口中,validation of the output file can be specified in the writer parameters.请注意,一旦您对输出满意,关闭验证有助于提高写入性能。
INSPIRE GML Writer parameters in the Navigator,其中包括验证输出文件的选项:
FME Server can be used to provide an online INSPIRE data validation service driven by a workspace similar to the one shown above.Ademois available where you can upload data corresponding to any of the Annex I themes and validate the schema.The source code and workspace used in this demo can be downloaded from the网站并修改为在您自己的FME服务器上部署。您可以根据需要使用FME变压器添加其他验证测试。
In the Data Inspector,view the INSPIRE GML result using the INSPIRE GML Reader.For quicker display time,在“读卡器参数”下,按主题选择要素类型,with no INSPIRE themes selected,或者只选择NaturaliskZoneScore主题。
In the Data Inspector,按主题选择功能类型,with no INSPIRE theme selected,or only NaturalRiskZonesCore:
注意:此示例仅用于演示目的。The resulting data is not to be used for any operational purposes.* INSPIRE or Infrastructure for Spatial Information in Europe,是一项旨在建立欧盟数据空间数据基础设施的欧盟指令,用于制定政策。该指令还旨在改善公众对空间信息的获取。有关更多信息,请访问激励网站.
?2019安全亚搏在线软件公司|Legal