WKT格式--OGC well-known text,是OGC制定的空间数据的组织规范,wkt是以文本形式描述。
使用wkt能够很好到和其他系统进行数据交换,目前大部分支持空间数据存储的数据库构造空间数据都采用这两种方式。
wkt的组织结构如下:
Geometry type | Text description | Comment |
ST_Point | 'point empty' | empty point |
ST_Point | 'point z empty' | empty point with z-coordinate |
ST_Point | 'point m empty' | empty point with measure |
ST_Point | 'point zm empty' | empty point with z-coordinate and measure |
ST_Point | 'point ( 10.05 10.28 )' | point |
ST_Point | 'point z( 10.05 10.28 2.51 )' | point with z-coordinate |
ST_Point | 'point m( 10.05 10.28 4.72 )' | point with measure |
ST_Point | 'point zm(10.05 10.28 2.51 4.72 )' | point with z-coordinate and measure |
ST_LineString | 'linestring empty' | empty linestring |
ST_LineString | 'linestring z empty' | empty linestring with z-coordinates |
ST_LineString | 'linestring m empty' | empty linestring with measures |
ST_LineString | 'linestring zm empty' | empty linestring with z-coordinates and measures |
ST_LineString | 'linestring (10.05 10.28 , 20.95 20.89 )' | linestring |
ST_LineString | 'linestring z(10.05 10.28 3.09, 20.95 31.98 4.72, 21.98 29.80 3.51 )' | linestring with z-coordinates |
ST_LineString | 'linestring m(10.05 10.28 5.84, 20.95 31.98 9.01, 21.98 29.80 12.84 )' | linestring with measures |
ST_LineString | 'linestring zm(10.05 10.28 3.09 5.84, 20.95 31.98 4.72 9.01, 21.98 29.80 3.51 12.84)' | linestring with z-coordinates and measures |
ST_Polygon | 'polygon empty' | empty polygon |
ST_Polygon | 'polygon z empty' | empty polygon with z-coordinates |
ST_Polygon | 'polygon m empty' | empty polygon with measures |
ST_Polygon | 'polygon zm empty' | empty polygon with z-coordinates and measures |
ST_Polygon | 'polygon ((10 10, 10 20, 20 20, 20 15, 10 10))' | polygon |
ST_Polygon | 'polygon z((10 10 3, 10 20 3, 20 20 3, 20 15 4, 10 10 3))' | polygon with z-coordinates |
ST_Polygon | 'polygon m((10 10 8, 10 20 9, 20 20 9, 20 15 9, 10 10 8 ))' | polygon with measures |
ST_Polygon | 'polygon zm((10 10 3 8, 10 20 3 9, 20 20 3 9, 20 15 4 9, 10 10 3 8 ))' | polygon with z-coordinates and measures |
ST_MultiPoint | 'multipoint empty' | empty multipoint |
ST_MultiPoint | 'multipoint z empty' | empty multipoint with z-coordinates |
ST_MultiPoint | 'multipoint m empty' | empty multipoint with measures |
ST_MultiPoint | 'multipoint zm empty' | empty multipoint with z-coordinates and measures |
ST_MultiPoint | 'multipoint (10 10, 20 20)' | multipoint with two points |
ST_MultiPoint | 'multipoint z(10 10 2, 20 20 3)' | multipoint with z-coordinates |
ST_MultiPoint | 'multipoint m(10 10 4, 20 20 5)' | multipoint with measures |
ST_MultiPoint | 'multipoint zm(10 10 2 4, 20 20 3 5)' | multipoint with z-coordinates and measures |
ST_MultiLineString | 'multilinestring empty' | empty multilinestring |
ST_MultiLineString | 'multilinestring z empty' | empty multilinestring with z-coordinates |
ST_MultiLineString | 'multilinestring m empty' | empty multilinestring with measures |
ST_MultiLineString | 'multilinestring zm empty' | empty multilinestring with z-coordinates and measures |
ST_MultiLineString | 'multilinestring ((10.05 10.28 , 20.95 20.89 ),( 20.95 20.89, 31.92 21.45))' | multilinestring |
ST_MultiLineString | 'multilinestring z((10.05 10.28 3.4, 20.95 20.89 4.5),( 20.95 20.89 4.5, 31.92 21.45 3.6))' | multilinestring with z-coordinates |
ST_MultiLineString | 'multilinestring m((10.05 10.28 8.4, 20.95 20.89 9.5), (20.95 20.89 9.5, 31.92 21.45 8.6))' | multilinestring with measures |
ST_MultiLineString | 'multilinestring zm((10.05 10.28 3.4 8.4, 20.95 20.89 4.5 9.5), (20.95 20.89 4.5 9.5, 31.92 21.45 3.6 8.6))' | multilinestring with z-coordinates and measures |
ST_MultiPolygon | 'multipolygon empty' | empty multipolygon |
ST_MultiPolygon | 'multipolygon z empty' | empty multipolygon with z-coordinates |
ST_MultiPolygon | 'multipolygon m empty' | empty multipolygon with measures |
ST_MultiPolygon | 'multipolygon zm empty' | empty |
ST_MultiPolygon | 'multipolygon (((10 10, 10 20, 20 20, 20 15 , 10 10), (50 40, 50 50, 60 50, 60 40, 50 40)))' | multipolygon |
ST_MultiPolygon | 'multipolygon z(((10 10 7, 10 20 8, 20 20 7, 20 15 5, 10 10 7), (50 40 6, 50 50 6, 60 50 5, 60 40 6, 50 40 6)))' | multipolygon with z-coordinates |
ST_MultiPolygon | 'multipolygon m(((10 10 2, 10 20 3, 20 20 4, 20 15 5, 10 10 2), (50 40 7, 50 50 3, 60 50 4, 60 40 5, 50 40 7)))' | multipolygon with measures |
ST_MultiPolygon | 'multipolygon zm(((10 10 7 2, 10 20 8 3, 20 20 7 4, 20 15 5 5, 10 10 7 2), (50 40 6 7, 50 50 6 3, 60 50 5 4, 60 40 6 5, 50 40 6 7)))' | multipolygon with z-coordinates and measures |