OData Edm.Geography和Edm.Geometry基本类型

         OData 4.0规范 中定义了一系列地理空间和平面空间相关的基本类型,用于表示地理和平面空间数据,如下表所示。但奇怪的是,OData的文档却没有给出这些类型的详细定义。

Edm.Geography

Abstract base type for all Geography types

Edm.GeographyPoint

A point in a round-earth coordinate system

Edm.GeographyLineString

Line string in a round-earth coordinate system

Edm.GeographyPolygon

Polygon in a round-earth coordinate system

Edm.GeographyMultiPoint

Collection of points in a round-earth coordinate system

Edm.GeographyMultiLineString

Collection of line strings in a round-earth coordinate system

Edm.GeographyMultiPolygon

Collection of polygons in a round-earth coordinate system

Edm.GeographyCollection

Collection of arbitrary Geography values


Edm.Geometry

Abstract base type for all Geometry types

Edm.GeometryPoint

Point in a flat-earth coordinate system

Edm.GeometryLineString

Line string in a flat-earth coordinate system

Edm.GeometryPolygon

Polygon in a flat-earth coordinate system

Edm.GeometryMultiPoint

Collection of points in a flat-earth coordinate system

Edm.GeometryMultiLineString

Collection of line strings in a flat-earth coordinate system

Edm.GeometryMultiPolygon

Collection of polygons in a flat-earth coordinate system

Edm.GeometryCollection

Collection of arbitrary Geometry values


       OData所定义的这些基本类型,在Microsoft.Spatial中都有实现, Microsoft.Spatial nuget 专门实现了地理空间和几何平面空间操作的类型和方法。Microsoft.Spatial支持 OData v4.0。


        除了Microsoft.Spatial之外,微软在System.Data.Spatial类库中也实现了用于支持SQL空间数据的类型, How to consume SQL Spatial Data with Web API V2.2 for OData V4 》一文介绍了如何使用OData Web API来暴露SQL的空间和平面数据。OData WebApi的实例中也包括了如何使用Microsoft.Spatical类库 - ODataSpatialSample


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值