模式管理

FeatureClass

<xs:element ...请参考 ClassDefinition (带有主键属性)...

</xs:element>

<xs:complexType name=“<className>Type”

abstract=“<true | false>“/>

{ 请参考FeatureClass.GeometryProperty }

<xs:complexContent>

<xs:extension base=“{baseClass}?{baseClass.schema.name}:{baseClass.name} :

‘gml:AbstractFeatureType’ “

>

<xs:sequence>

{属性列表请参考DataPropertyGeometric属性}

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

FeatureClass. GeometryProperty

<!--这些是xs:complexType元素的属性-->

fdo:geometryName=“<geometryPropertyName>

fdo:geometricTypes=“<list of FdoGeometricTypes>

fdo:geometryReadOnly=“<true | false>

fdo:hasMeasure=“<true | false>

fdo:hasElevation=“<true | false>

fdo:srsName=“<spatialContextName>“/>

DataProperty

(decimalstring类型)

<!--minOccurs属性仅当值是1的时候才生成;Default属性仅当存在默认值时才生成;fdo:readOnly属性仅当值是1的时候才生成。-->

<xs:element name=“<propertyName>

minOccurs=“{isNullable ? 0 : 1}

default=“<defaultValue>

fdo:readOnly=“<true | false>“>

<xs:simpleType>

{请参考 DataType StringDataType Decimal }

</xs:simpleType>

</xs:element>

DataProperty (其他类型)

<xs:element name=“<propertyName>

type=“<datatype>

minOccurs=“{isNullable ? 0 : 1}

default=“<defaultValue>

fdo:readOnly=“<true | false>“>

</xs:element>

DataType String

<xs:restriction base=“xs:string”>

<xs:maxLength value=“<length>“/>

</xs:restriction>

DataType Decimal

<xs:restriction base=“xs:decimal”>

<xs:totalDigits value=“<precision>“/>

<xs:fractionDigits value=“<scale>“/>

</xs:restriction>

GeometricProperty

<xs:element name=“<propertyName>

type=“gml:AbstractGeometryType”

fdo:geometryName=“<propertyName>

fdo:geometricTypes=“<list of FdoGeometricTypes>

fdo:geometryReadOnly=“<true | false>

fdo:hasMeasure=“<true | false>

fdo:hasElevation=“<true | false>

fdo:srsName=“<spatialContextName>“/>

>

</xs:element>

MetaData

<!--xs:schema元素中为FeatureSchema引用的模式-->

<xs:annotation>

<xs:documentation>

{FdoFeatureSchema::Create()的描述}

</xs:documentation>

</xs:annotation>

<!--xs:schema元素中为DataProperty引用的样式-->

<xs:annotation>

<xs:documentation>

{FdoDataPropertyDefinition::Create()的描述}

</xs:documentation>

</xs:annotation>

<!--xs:element元素为非要素GeometricProperty引用的模式-->

<xs:annotation>

<xs:documentation>

{FdoGeometricPropertyDefinition::Create()的描述}

</xs:documentation>

</xs:annotation>

<!--xs:complexType元素为FeatureClass引用的样式-->

<xs:annotation>

<xs:documentation>

{FdoFeatureClass::Create()的描述}

</xs:documentation>

<xs:appinfo source=“<uri>“/>

<xs:documentation>

{FdoGeometricPropertyDefinition::Create()的描述}

</xs:documentation>

</xs:annotation>

93 FDO模式元素和GML模式片段的对应关系

9‑4显示了Map FDO数据类型和GML数据类型对照关系。

FDO数据类型

GML数据类型

Boolean

xs:boolean

Byte

fdo:Byte

DateTime

xs:dateTime

Double

xs:double

Int16

fdo:Int16

Int32

fdo:Int32

Int64

fdo:Int64

Single

xs:float

BLOB

xs:base64Binary

CLOB

xs:string

94 FDO数据类型和GML数据类型对照表

1.1.1 GML 模式文件的创建

以下示例为“Buildings”要素定义了一个表格,这是Open GIS联盟的文档98-046r1中的一个示例。本节中,我们将通过为要素类“Buildings”创建GML模式文件来展示如何创建GML模式文件。

<ogc-sfsql-table>

<table-definition>

<name>buildings</name>

<column-definition>

<name>fid</name>

<type>INTEGER</type>

<constraint>NOT NULL</constraint>

<constraint>PRIMARY KEY</constraint>

</column-definition>

<column-definition>

<name>address</name>

<type>VARCHAR(64)</type>

</column-definition>

<column-definition>

<name>position</name>

<type>POINT</type>

</column-definition>

<column-definition>

<name>footprint</name>

<type>POLYGON</type>

<column-definition>

</table-definition>

1.1.1.1 添加模式

让我们从一个基本的GML框架开始添加一个模式。

<xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema

targetNamespace=“http://<customer_url>/<FeatureSchemaName>

xmlns:fdo=http://fdo.osgeo.org/schema

xmlns:gml=http://www.opengis.net/gml

xmlns:<FeatureSchemaName>=“http://<customer_url>/<FeatureSchemaName>

elementFormDefault=“qualified”

attributeFormDefault=“unqualified”>

<xs:annotation>

<xs:documentation>{FdoFeatureSchema::Create()的描述}</xs:documentation>

</xs:annotation>

{<每个中只能有一个 xs:element / xs:complexType >}

</xs:schema>

通过如下的替换,可以设置要素模式的名称和描述。

l fdo_customer代替“<customer_url>”。

l OGC980461FS代替“<FeatureSchemaName>”,从而设置要素模式名称。

l 设置要素模式描述:用OGC Simple Features Specification for SQL 代替“{FdoFeatureSchema::Create()的描述}”,从而设置要素模式描述。

1.1.1.2 添加要素类

在以上GML模式的基础上,让我们接着添加一个要素类。

<xs:schema xmlns:xs=“http://www.w3.org/2001/XMLSchema”

targetNamespace=“http://fdo_customer/OGC980461FS”

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值