WKT – 概念
WKT(Well-known text)是一种文本标记语言,用于表示矢量几何对象、
空间参照系统 及空间参照系统之间的转换。它的二进制表示方式,亦即
WKB (well-known binary)则胜于在传输和在数据库中存储相同的信息。该格式由开放地理空间联盟(OGC)制定。
WKT可以表示的几何对象包括:点,线,多边形,TIN(
不规则三角网 )及多面体。可以通过几何集合的方式来表示不同维度的几何对象。
几何物体的坐标可以是2D(x,y),3D(x,y,z),4D(x,y,z,m),加上一个属于线性参照系统的m值。
以下为几何WKT字串样例:
Type | Examples | |
---|---|---|
Point | POINT (30 10) |
|
LineString | LINESTRING (30 10, 10 30, 40 40) |
|
Polygon | POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10)) |
|
POLYGON ((35 10, 10 20, 15 40, 45 45, 35 10), |
Type | Examples | |
---|---|---|
MultiPoint | MULTIPOINT ((10 40), (40 30), (20 20), (30 10)) |
|
MULTIPOINT (10 40, 40 30, 20 20, 30 10) |
||
MultiLineString | MULTILINESTRING ((10 10, 20 20, 10 40), |
|
MultiPolygon | MULTIPOLYGON (((30 20, 10 40, 45 40, 30 20)), |
|
MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), |
POINT(6 10)
LINESTRING(3 4,10 50,20 25)
POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))
MULTIPOINT(3.5 5.6, 4.8 10.5)
MULTILINESTRING((3 4,10 50,20 25),(-5 -8,-10 -8,-15 -4))
MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2)),((6 3,9 2,9 4,6 3)))
GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10))
POINT ZM (1 1 5 60)
POINT M (1 1 80)
POINT EMPTY
MULTIPOLYGON EMPTY
根据图可以清晰的看出一个点(point)只需要一个(x,y)坐标即可,同理线串(linestring)需要三个点。
WKT在许多GIS程序中被广泛采用。ESRI亦在其shape文件格式(*.prj)中使用WKT。
以下是空间参照系统的WKT表示样例:
COMPD_CS[“OSGB36 / British National Grid + ODN”,
PROJCS[“OSGB 1936 / British National Grid”,
GEOGCS[“OSGB 1936”,
DATUM[“OSGB_1936”,
spheroid[“Airy 1830”,6377563.396,299.3249646,AUTHORITY[“EPSG”,”7001″]],
TOWGS84[375,-111,431,0,0,0,0],
AUTHORITY[“EPSG”,”6277″]],
PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,”8901″]],
UNIT[“DMSH”,0.0174532925199433,AUTHORITY[“EPSG”,”9108″]],
AXIS[“Lat”,NORTH],
AXIS[“Long”,EAST],
AUTHORITY[“EPSG”,”4277″]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,49],
PARAMETER[“central_meridian”,-2],
PARAMETER[“scale_factor”,0.999601272],
PARAMETER[“false_easting”,400000],
PARAMETER[“false_northing”,-100000],
UNIT[“metre”,1,AUTHORITY[“EPSG”,”9001″]],
AXIS[“E”,EAST],
AXIS[“N”,NORTH],
AUTHORITY[“EPSG”,”27700″]],
VERT_CS[“Newlyn”,
VERT_DATUM[“Ordnance Datum Newlyn”,2005,AUTHORITY[“EPSG”,”5101″]],
UNIT[“metre”,1,AUTHORITY[“EPSG”,”9001″]],
AXIS[“Up”,UP],
AUTHORITY[“EPSG”,”5701″]],
AUTHORITY[“EPSG”,”7405″]]
PROJCS[“OSGB 1936 / British National Grid”,
GEOGCS[“OSGB 1936”,
DATUM[“OSGB_1936”,
spheroid[“Airy 1830”,6377563.396,299.3249646,AUTHORITY[“EPSG”,”7001″]],
TOWGS84[375,-111,431,0,0,0,0],
AUTHORITY[“EPSG”,”6277″]],
PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,”8901″]],
UNIT[“DMSH”,0.0174532925199433,AUTHORITY[“EPSG”,”9108″]],
AXIS[“Lat”,NORTH],
AXIS[“Long”,EAST],
AUTHORITY[“EPSG”,”4277″]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,49],
PARAMETER[“central_meridian”,-2],
PARAMETER[“scale_factor”,0.999601272],
PARAMETER[“false_easting”,400000],
PARAMETER[“false_northing”,-100000],
UNIT[“metre”,1,AUTHORITY[“EPSG”,”9001″]],
AXIS[“E”,EAST],
AXIS[“N”,NORTH],
AUTHORITY[“EPSG”,”27700″]],
VERT_CS[“Newlyn”,
VERT_DATUM[“Ordnance Datum Newlyn”,2005,AUTHORITY[“EPSG”,”5101″]],
UNIT[“metre”,1,AUTHORITY[“EPSG”,”9001″]],
AXIS[“Up”,UP],
AUTHORITY[“EPSG”,”5701″]],
AUTHORITY[“EPSG”,”7405″]]
今天的文章WKT_wkT是什么部门分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/77922.html