GIS,WKT是什么

GIS,WKT是什么其中 表示线的第一个点的坐标 表示线的第二个点的坐标 以此类推

大家好,欢迎来到IT知识分享网。

👨‍⚕️ 主页: gis分享者
👨‍⚕️ 感谢各位大佬 点赞👍 收藏⭐ 留言📝 加关注✅!
👨‍⚕️ 收录于专栏:gis工程师



一、🚀概念

WKT格式是一种文本格式,用于描述二维和三维几何对象的空间特征。WKT是“Well-Known Text”的缩写,是一种开放的国际标准,由Open Geospatial Consortium(OGC)定义和维护。WKT格式通常用于在计算机系统之间交换空间数据,例如在GIS(地理信息系统)软件和数据库之间。WKT格式包括一些基本的几何对象,例如点、线、多边形和圆形,以及一些复合对象,例如多边形集合和几何对象集合。

二、🚀WKT的应用

  • 描述空间实体
  • 描述空间坐标系参数

三、🚀WKT描述空间实体

<geometry tag> <wkt data> <geometry tag> ::= POINT | LINESTRING | POLYGON | MULTIPOINT | MULTILINESTRING | MULTIPOLYGON | GEOMETRYCOLLECTION <wkt data> ::= <point> | <linestring> | <polygon> | <multipoint> | <multilinestring> | <multipolygon> | <geometrycollection> 
POINT (<x> <y>) POINT(6 10) 
LINESTRING (<x1> <y1>, <x2> <y2>, ...) LINESTRING(3 4,10 50,20 25) 

其中, 表示线的第一个点的坐标, 表示线的第二个点的坐标,以此类推。注意,点坐标对采用逗号隔开。

多边形
多边形的WKT格式如下:

POLYGON ((<x1> <y1>, <x2> <y2>, ..., <x1> <y1>)) POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2)) 
MULTIPOINT ((<x1> <y1>, <x2> <y2>, ...)) MULTIPOINT(3.5 5.6, 4.8 10.5) 
MULTILINESTRING ((<x1> <y1>, <x2> <y2>, ...), (<x1> <y1>, <x2> <y2>, ...)) MULTILINESTRING((3 4,10 50,20 25),(-5 -8,-10 -8,-15 -4)) 
MULTIPOLYGON (((<x1> <y1>, <x2> <y2>, ..., <x1> <y1>)), ((<x1> <y1>, <x2> <y2>, ..., <x1> <y1>))) 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 (<geometry tag> <wkt data>, <geometry tag> <wkt data>, ...) GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) 
# 三维 POINT ZM (1 1 5 60) # 带M值 POINT M (1 1 80) # 空数据 POINT EMPTY MULTIPOLYGON EMPTY 

四、🚀WKT 描述空间坐标系参数

WKT格式的基本语法如下:

<coordinate system> = <horz cs> | <geocentric cs> | <vert cs> | <compd cs> | <fitted cs> | <local cs> <horz cs> = <geographic cs> | <projected cs> <projected cs> = PROJCS["<name>", <geographic cs>, <projection>, { 
    <parameter>,}* <linear unit> {,<twin axes>}{,<authority>}] <projection> = PROJECTION["<name>" {,<authority>}] <geographic cs> = GEOGCS["<name>", <datum>, <prime meridian>, <angular unit> {,<twin axes>} {,<authority>}] <datum> = DATUM["<name>", <spheroid> {,<to wgs84>} {,<authority>}] <spheroid> = SPHEROID["<name>", <semi-major axis>, <inverse flattening> {,<authority>}] <semi-major axis> = <number> <inverse flattening> = <number> <prime meridian> = PRIMEM["<name>", <longitude> {,<authority>}] <longitude> = <number> <angular unit> = <unit> <linear unit> = <unit> <unit> = UNIT["<name>", <conversion factor> {,<authority>}] <conversion factor> = <number> <geocentric cs> = GEOCCS["<name>", <datum>, <prime meridian>, <linear unit> {,<axis>, <axis>, <axis>} {,<authority>}] <authority> = AUTHORITY["<name>", "<code>"] <vert cs> = VERT_CS["<name>", <vert datum>, <linear unit>, { 
    <axis>,} {,<authority>}] <vert datum> = VERT_DATUM["<name>", <datum type> {,<authority>}] <datum type> = <number> <compd cs> = COMPD_CS["<name>", <head cs>, <tail cs> {,<authority>}] <head cs> = <coordinate system> <tail cs> = <coordinate system> <twin axes> = <axis>, <axis> <axis> = AXIS["<name>", NORTH | SOUTH | EAST | WEST | UP | DOWN | OTHER] <to wgs84s> = TOWGS84[<seven param>] <seven param> = <dx>, <dy>, <dz>, <ex>, <ey>, <ez>, <ppm> <dx> = <number> <dy> = <number> <dz> = <number> <ex> = <number> <ey> = <number> <ez> = <number> <ppm> = <number> <fitted cs> = FITTED_CS["<name>", <to base>, <base cs>] <to base> = <math transform> <base cs> = <coordinate system> <local cs> = LOCAL_CS["<name>", <local datum>, <unit>, <axis>, {,<axis>}* {,<authority>}] <local datum> = LOCAL_DATUM["<name>", <datum type> {,<authority>}] 

比如我们要定义一个WGS84地理坐标系。

GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",,298., AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.094328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] 

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/119578.html

(0)
上一篇 2025-11-04 15:00
下一篇 2025-11-04 15:15

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信