{"id":11180,"date":"2022-11-24T06:00:00","date_gmt":"2022-11-23T21:00:00","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=11180"},"modified":"2023-02-02T16:26:10","modified_gmt":"2023-02-02T07:26:10","slug":"%e7%ac%ac-4-%e7%ab%a0%e3%80%80%e7%a9%ba%e9%96%93%e3%83%87%e3%83%bc%e3%82%bf%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b-beginning-spatial-with-s","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=11180","title":{"rendered":"\u7b2c 4 \u7ae0\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b (Beginning Spatial with SQL Server 2008)"},"content":{"rendered":"\n<h2>\u7b2c 2 \u90e8\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b<\/h2>\n<p>\u3000\u672c\u66f8\u306e\u3053\u306e\u90e8\u3067\u306f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092 SQL Server 2008 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u69d8\u3005\u306a\u65b9\u6cd5\u3092\u8aac\u660e\u3059\u308b\uff0e\u7b2c 4 \u7ae0\u3067\u306f\uff0c\u65e2\u77e5\u306e\u5ea7\u6a19\u304b\u3089\u3044\u304b\u306a\u308b\u30a2\u30a4\u30c6\u30e0\u3092\u3082\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\u5b58\u5728\u3059\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u305d\u308c\u305e\u308c\u3092\u7d39\u4ecb\u3059\u308b\uff0e\u7b2c 5 \u7ae0\u3067\u306f\uff0c\u5916\u90e8\u8cc7\u6e90\u3092\u304b\u3076\u305b\u3066\u305d\u308c\u3089\u306e\u5ea7\u6a19\u3092\u6d3e\u751f\u3055\u305b\u308b\u306e\u3092\u52a9\u3051\u308b\u305f\u3081\u306e\u6280\u8853\u3092\u89e3\u8aac\u3059\u308b\uff0eMicrosoft \u306e Virtual Earth Map Control \u3092\u4f7f\u3046\uff0e\u7b2c 6 \u7ae0\u3067\u306f\uff0c\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u84c4\u7a4d\u3055\u308c\u308b\u4ed6\u306e\u4e00\u822c\u7684\u306a\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u3064\u3044\u3066\u8b70\u8ad6\u3057\uff0c\u3053\u308c\u3089\u306e\u84c4\u7a4d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092 SQL Server 2008 \u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u4f8b\u3092\u63d0\u4f9b\u3059\u308b\uff0e\u6700\u5f8c\u306b\uff0c\u7b2c 7 \u7ae0\u3067 SQL Server \u3092\u62e1\u5f35\u3057\u3066\u30b8\u30aa\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u6a5f\u80fd\u3092\u63d0\u4f9b\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3059\uff0e\u3064\u307e\u308a\uff0c.NET \u7d4c\u7531\u3067 Microsoft MapPoint Web Services \u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u81ea\u52d5\u7684\u306b\u4f4f\u6240\u304b\u3089\u5ea7\u6a19\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u524d\u7ae0\u3067\u306f\uff0c\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u6982\u5ff5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\uff0cgeography \u578b\u304a\u3088\u3073 geometry \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u305f\uff0e\u672c\u7ae0\u3067\u306f\u5404\u30c7\u30fc\u30bf\u578b\u3067\u5229\u7528\u3067\u304d\u308b\u7570\u306a\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u691c\u67fb\u3057\uff0c\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u65b0\u3057\u3044\u30a2\u30a4\u30c6\u30e0\u3092\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u6bd4\u8f03\u3059\u308b\uff0e<\/p>\n<p>\u6ce8\u8a18\u3000\u672c\u7ae0\u3067\u306e\u307b\u3068\u3093\u3069\u306e\u30b3\u30fc\u30c9\u30b5\u30f3\u30d7\u30eb\u306f\uff0c@Point \u306a\u3069\u306e\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3092\u5ba3\u8a00\u3057\uff0c\u305d\u306e\u7d50\u679c\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u84c4\u7a4d\u3059\u308b\uff0e\u3057\u304b\u3057\uff0cINSERT \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u30c6\u30fc\u30d6\u30eb\u306e geometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u5217\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\uff0e<\/p>\n<p><!--more--><\/p>\n<h3>\u9069\u5207\u306a\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u9078\u629e\u3059\u308b<\/h3>\n<p>\u3000geography \u578b\u304a\u3088\u3073 geometry \u578b\u306f\u5171\u306b\u591a\u304f\u306e\u7570\u306a\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\uff0c\u7a7a\u9593\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\uff0e\u7279\u5b9a\u306e\u72b6\u6cc1\u3067\u9069\u5207\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u306e\u306f\u6b21\u306b\u8ff0\u3079\u308b\u56e0\u5b50\u306b\u3088\u308b\uff0e<\/p>\n<h4>\u751f\u6210\u3057\u3088\u3046\u3068\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e<\/h4>\n<p>\u3000\u3044\u304f\u3064\u304b\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u5358\u306b\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u3060\u3051\u306b\u4f7f\u308f\u308c\u308b\uff0e\u4f8b\u3048\u3070\uff0cSTLineFromWKB() \u30e1\u30bd\u30c3\u30c9\u304a\u3088\u3073 STLineFromText() \u30e1\u30bd\u30c3\u30c9\u306f\u5358\u306b LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u3060\u3051\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u3053\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5c5e\u6027\u3092\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5<\/h4>\n<p>\u3000\u5168\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a7a\u9593\u53c2\u7167\u306e\u63d0\u4f9b\u3092\u5fc5\u8981\u3068\u3057\uff0c\u4e09\u3064\u306e\u7570\u306a\u308b\u6a19\u6e96\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u3046\u3061\u4e00\u3064\u3092\u4f7f\u3046\uff0e\u3064\u307e\u308a\uff0cWell-Known Text (WKT), Well-Known Binary (WKB) \u304a\u3088\u3073 Geometry Markup Language (GML) \u3067\u3042\u308b\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306b\u3044\u305a\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u9078\u3093\u3060\u304b\u306b\u3088\u308a\uff0c\u9069\u5207\u306a\u8868\u73fe\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u4f8b\u3048\u3070\uff0c\u4efb\u610f\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092 GML \u8868\u73fe\u304b\u3089\u751f\u6210\u3059\u308b\u306b\u306f GeomFromGML() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<h4>geometry \u578b\u307e\u305f\u306f geography \u578b\u3067\u751f\u6210\u3057\u305f\u3044\u30a2\u30a4\u30c6\u30e0\u306f\u4e00\u4f53\u4f55\u304b<\/h4>\n<p>\u3000geometry \u578b\u304a\u3088\u3073 geography \u578b\u5171\u306b\uff0c\u305d\u308c\u3089\u81ea\u8eab\u306e\u5404\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\uff0e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u30e1\u30bd\u30c3\u30c9\u81ea\u8eab\u3068\u540c\u4e00\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3067\u304d\u308b\u3060\u3051\u3067\u3042\u308b\u305f\u3081\uff0c\u751f\u6210\u3057\u305f\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u578b\u306b\u3088\u3063\u3066\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u9078\u629e\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u4f8b\u3048\u3070\uff0cgeometry \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 WKT \u8868\u73fe\u304b\u3089\u751f\u6210\u3059\u308b\u306b\u306f geometry::STPointFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3079\u304d\u3067\u3042\u308b\uff0egeography \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 WKT \u8868\u73fe\u304b\u3089\u751f\u6210\u3059\u308b\u306b\u306f\u4ee3\u308f\u308a\u306b\u540c\u7b49\u306e geography \u578b\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b geography::STPointFromText \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3079\u304d\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000Table 4-1 \u306b\u7570\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u7528\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3059\uff0e\u3053\u308c\u3089\u5168\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u306b\u3082 geometry \u578b\u306b\u3082\u5171\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\uff0e<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 287px;\"><caption>Table 4-1. \u7570\u306a\u308b\u8868\u73fe\u304b\u3089\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u306e\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u65b9\u6cd5<\/caption>\n<tbody>\n<tr style=\"height: 63px;\">\n<th style=\"width: 25%; height: 63px;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e<\/th>\n<th style=\"width: 25%; height: 63px;\">Well-Known Text<\/th>\n<th style=\"width: 25%; height: 63px;\">Well-Known Binary<\/th>\n<th style=\"width: 25%; height: 63px;\">Geography Markup Laguage<\/th>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">Point<\/td>\n<td style=\"width: 25%; height: 23px;\">STPointFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STPointFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">LineString<\/td>\n<td style=\"width: 25%; height: 23px;\">STLineFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STLineFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFormGml()<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">Polygon<\/td>\n<td style=\"width: 25%; height: 23px;\">STPolyFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STPolyFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">MultiPoint<\/td>\n<td style=\"width: 25%; height: 23px;\">STMPointFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STMPointFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">MultiLineString<\/td>\n<td style=\"width: 25%; height: 23px;\">STMLineFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STMLineFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 25%; height: 23px;\">MultiPolygon<\/td>\n<td style=\"width: 25%; height: 23px;\">STMPolyFromText()<\/td>\n<td style=\"width: 25%; height: 23px;\">STMPolyFromWKB()<\/td>\n<td style=\"width: 25%; height: 23px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 43px;\">\n<td style=\"width: 25%; height: 43px;\">Geometry Collection<\/td>\n<td style=\"width: 25%; height: 43px;\">STGeomCollFromText()<\/td>\n<td style=\"width: 25%; height: 43px;\">STGeomCollFromWKB()<\/td>\n<td style=\"width: 25%; height: 43px;\">GeoFromGml()<\/td>\n<\/tr>\n<tr style=\"height: 43px;\">\n<td style=\"width: 25%; height: 43px;\">Any supported type<\/td>\n<td style=\"width: 25%; height: 43px;\">STGeomFromText() Parse()<\/td>\n<td style=\"width: 25%; height: 43px;\">STGeomFromWKB()<\/td>\n<td style=\"width: 25%; height: 43px;\">GeoFromGml()<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u3044\u305a\u308c\u306e\u8a00\u8a9e\u3092\u4f7f\u3046\u306b\u305b\u3088\uff0c\u307e\u305f\uff0c\u3044\u305a\u308c\u306e\u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u306b\u305b\u3088\uff0c\u672c\u7ae0\u3067\u8b70\u8ad6\u3059\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u5168\u3066\u540c\u4e00\u306e\u69cb\u6587\u3092\u5171\u6709\u3059\u308b\uff0e\u3053\u306e\u6c4e\u7528\u69cb\u6587\u306f\u6b21\u306b\u793a\u3059\u901a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>datatype::method(geometryrepresentation, srid)<\/pre>\n<p>\u3000\u3053\u306e\u69cb\u6587\u306f\u6b21\u306b\u793a\u3059\u3068\u304a\u308a 4 \u3064\u306e\u69cb\u6210\u8981\u7d20\u304b\u3089\u306a\u308b\uff0e<\/p>\n<ul>\n<li>datatype \u306f\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u304c geography \u578b\u304b geometry \u578b\u306e\u3044\u305a\u308c\u306b\u5c5e\u3059\u308b\u304b\u3092\u6307\u5b9a\u3057\uff0c\u3086\u3048\u306b\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c7\u30fc\u30bf\u578b\u3092\u5b9a\u7fa9\u3059\u308b\uff0e<\/li>\n<li>method \u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u540d\u3067\u3042\u308b\uff0e\u3053\u308c\u306f\u5fc5\u305a Table 4-1 \u306b\u5217\u6319\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u3064\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/li>\n<li>geometryrepresentation \u306f\u751f\u6210\u3059\u3079\u304d\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6709\u52b9\u306a\u8868\u73fe\u3067\u3042\u308b\uff0e\u3053\u306e\u8868\u73fe\u306f\u9078\u629e\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u305f\u9069\u5207\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u304a\u3044\u3066\u8868\u73fe\u3055\u308c\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u305d\u306e\u8868\u73fe\u3068\u306f\uff08WKT \u304a\u3088\u3073 GML \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\uff09\u6587\u5b57\u5217\uff0c\u3042\u308b\u3044\u306f\u554f\u984c\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u5168\u60c5\u5831\u3092\u542b\u3093\u3060\u30d0\u30a4\u30ca\u30ea\u30fc\u30b9\u30c8\u30ea\u30fc\u30e0 (WKB) \u3067\u3042\u308b\uff0e<\/li>\n<li>srid \u306f\u7a7a\u9593\u53c2\u7167\u7cfb\u306e\u8b58\u5225\u5b50\u3092\u8868\u73fe\u3057\u305f\u6574\u6570\u5024\u3067\u3042\u308a\uff0c\u30e1\u30bd\u30c3\u30c9\u3092\u901a\u3057\u3066 geometryrepresentation \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u5185\u3067\u5ea7\u6a19\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u305d\u306e\u4e2d\u3067\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u8868\u73fe\u3055\u308c\u308b\u5404\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304a\u3088\u3073\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u305d\u308c\u3089\u306e\u8868\u73fe\u304b\u3089\u751f\u6210\u3055\u308c\u308b\u5404\u30e1\u30bd\u30c3\u30c9\u306f\uff0c\u305d\u308c\u305e\u308c\u5229\u70b9\u3068\u6b20\u70b9\u3092\u6709\u3059\u308b\uff0e\u3057\u304b\u3057\uff0cgeography \u578b\u30c7\u30fc\u30bf\u304b geometry \u578b\u30c7\u30fc\u30bf\u304b\uff0c\u3044\u305a\u308c\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30a2\u30a4\u30c6\u30e0\u3092\u751f\u6210\u3059\u308b\u304b\u306e\u6c7a\u5b9a\u306f\uff0c\u751f\u6210\u306e\u6642\u70b9\u3067\u306e\u307f\u91cd\u8981\u3067\u3042\u308a\uff0c\u30a2\u30a4\u30c6\u30e0\u306e\u751f\u6210\u5f8c\u306f\u7121\u95a2\u4fc2\u306b\u306a\u3063\u3066\u3044\u304f\uff0e\u7279\u5b9a\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u751f\u6210\u3057\u3066\u3057\u307e\u3048\u3070\uff0c\u305d\u306e\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306f\uff0c\u4ed6\u306e\u5229\u7528\u53ef\u80fd\u3060\u3063\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u751f\u6210\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u3066\u3082\uff0c\u5168\u304f\u540c\u4e00\u306e\u3082\u306e\u3068\u306a\u308b\uff0e<\/p>\n<h4>\u30ec\u30a4\u30c8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0<\/h4>\n<p>\u3000\u4efb\u610f\u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u6307\u5b9a\u3055\u308c\u305f geography \u578b\u3042\u308b\u3044\u306f geometry \u578b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167\u306f\uff0c\u5b9f\u884c\u4e2d\u306b\u306e\u307f\u89e3\u6c7a\u3055\u308c\uff0c\u305d\u308c\u306f\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3055\u308c\u308b\u6642\u3067\u3042\u308b\uff0e\u3053\u308c\u306f\u30ec\u30a4\u30c8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3068\u3057\u3066\u77e5\u3089\u308c\u3066\u3044\u308b\uff0e\u30ec\u30a4\u30c8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u306e\u4e00\u3064\u306e\u52b9\u679c\u3068\u3057\u3066\uff0c\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3055\u308c\u308b\u307e\u3067\u306f SQLCLR \u306f\u3069\u3093\u306a\u7a2e\u985e\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u308b\u304b\u3092\u77e5\u3089\u306a\u3044\uff0e\u7d50\u679c\u3068\u3057\u3066\uff0cSQL Server \u306f\u8868\u73fe\u3092\u89e3\u6790\u3057\u3066\u6709\u52b9\u306a\u30c7\u30fc\u30bf\u3067\u3042\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\uff0e\u4f8b\u3048\u3070\uff0c\u6b21\u306e\u30af\u30a8\u30ea\u306f\u3044\u304b\u306a\u308b\u89e3\u6790\u30a8\u30e9\u30fc\u3082\u767a\u751f\u3055\u305b\u305a\u306b SQL Server Management Studio \u306b\u304a\u3044\u3066\u6b63\u3057\u304f\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u308b\uff0e<\/p>\n<pre>SELECT  geometry::STGeomFromText('This is not a real geometry')<\/pre>\n<p>\u3000\u3057\u304b\u3057\uff0c\u5b9f\u884c\u306e\u969b\u306b\uff0c\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3055\u308c\u305f\u8868\u73fe\u304c\u6709\u52b9\u306a WKT \u3067\u306f\u306a\u3044\u305f\u3081\uff0c\u3053\u306e\u30af\u30a8\u30ea\u306f\u5931\u6557\u3059\u308b\uff0e\u6709\u52b9\u306a WKT \u3068\u306f\uff0cSTGeomFromText() \u30e1\u30bd\u30c3\u30c9\u306b\u5fc5\u8981\u306a\uff0c\u3068\u3044\u3046\u610f\u5473\u3067\u3042\u308b\uff0e\u3044\u304b\u306a\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3067\u3082\u8868\u73fe\u3092\u6307\u5b9a\u3057\u3066\u6e21\u3059\u6642\u306b\u306f\u6ce8\u610f\u3055\u308c\u305f\u3044\uff0e\u3068\u3044\u3046\u306e\u306f\uff0c\u3053\u308c\u3089\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u307e\u3067\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u304b\u3089\u3067\u3042\u308b\uff0e<\/p>\n<p><!--more--><\/p>\n<h3>Well-Known Text \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b<\/h3>\n<p>\u3000Well-Known Text \u306f Open Geospatial Consortium (OGC) \u306b\u3088\u308a\u7a7a\u9593\u60c5\u5831\u5909\u63db\u306e\u305f\u3081\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u6a19\u6e96\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4e00\u3064\u3067\u3042\u308b\uff0e\u305d\u308c\u306f\u7c21\u7d20\u3067\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308a\uff0c\u7c21\u5358\u306b\u30c6\u30b9\u30c8\u3057\u7406\u89e3\u3067\u304d\u308b\uff0e\u65e2\u306b WKT \u8868\u73fe\u3068\u3057\u3066\u7b2c 1 \u7ae0\u3067\u898b\u305f\u3068\u601d\u3046\uff0e\u305d\u308c\u306f SQL Server 2008 \u304c\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u84c4\u7a4d\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\uff0csys.spatial_reference_systems \u30c6\u30fc\u30d6\u30eb\u306e well_known_text \u5217\u5185\u306e\u6e2c\u5730\u7a7a\u9593\u53c2\u7167\u7cfb\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\uff0e\u305d\u306e\u6587\u8108\u3067\u306f\uff0cWKT \u306f\u7a7a\u9593\u53c2\u7167\u7cfb\u306e\u5c5e\u6027\u3092\u8a18\u8ff0\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e\u3057\u304b\u3057\uff0cWKT \u306f\u307e\u305f\u7a7a\u9593\u53c2\u7167\u7cfb\u5185\u90e8\u3067\u500b\u5225\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u884c\u306f WKT \u304c\u5ea7\u6a19 (12,20) \u304a\u3088\u3073 (30,44) \u5730\u70b9\u9593\u306e LineString \u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306b\u4f7f\u3046\u65b9\u6cd5\u3092\u793a\u3059\uff0e<\/p>\n<pre>LINESTRING(12 20,30 44)<\/pre>\n<p>\u3000WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u5229\u70b9\u306f\u3044\u304f\u3064\u304b\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u7c21\u7d20\u3067\u69cb\u9020\u5316\u3055\u308c\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308a\uff0c\u30b7\u30b9\u30c6\u30e0\u9593\u3067\u306e\u5171\u6709\u3068\u4fdd\u5b58\u304c\u5bb9\u6613\u3067\u3042\u308b\uff0e<\/li>\n<li>\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u305f\u3081\uff0cWKT \u8868\u73fe\u3067\u904b\u3070\u308c\u305f\u60c5\u5831\u3092\u8996\u899a\u3067\u8b58\u5225\u3059\u308b\u306e\u304c\u5bb9\u6613\u3067\u3042\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u3057\u304b\u3057\uff0cWKT \u306b\u306f\u6b21\u306e\u6b20\u70b9\u304c\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e\u8868\u73fe\u3067\u3042\u308c\uff0c\u30d0\u30a4\u30ca\u30ea\u30fc\u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3055\u308c\u305f\u78ba\u5b9f\u306a\u5c0f\u6570\u70b9\u306e\u5ea7\u6a19\u5024\u3092\u6b63\u78ba\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306f\u4e0d\u53ef\u80fd\u3067\u3042\u308b\uff0e\u4e38\u3081\u30a8\u30e9\u30fc\u306f\u4e0d\u53ef\u907f\u3067\u3042\u308a\uff0c\u7121\u7406\u306b\u305d\u3046\u3059\u308b\u3068\u7cbe\u5ea6\u304c\u5931\u308f\u308c\u308b\uff0e<\/li>\n<li>SQL Server \u306f WKT \u8868\u73fe\u5185\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u89e3\u6790\u3057\u3066\u540c\u7b49\u306e\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\uff0cWKT \u304b\u3089\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u751f\u6210\u306f\u4ed6\u306e\u65b9\u6cd5\u3088\u308a\u3082\u9045\u304f\u306a\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u53ef\u8aad\u6027\u3068\u76f8\u5bfe\u7684\u306a\u7c21\u6f54\u6027\u306b\u3088\u308a\uff0cWKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u5171\u6709\u3057\u56f3\u793a\u3059\u308b\u306e\u306b\u4e00\u822c\u7684\u306b\u4f7f\u308f\u308c\uff0c\u672c\u66f8\u306b\u304a\u3044\u3066\u6700\u3082\u4f7f\u308f\u308c\u308b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308b\uff0eSQL Server 2008 Books Online,\u00a0 Microsoft SQL Server \u30aa\u30f3\u30e9\u30a4\u30f3\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u4f7f\u308f\u308c\u308b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3082\u3042\u308b\uff0ehttp:\/\/msdn.microsoft.com\/en-us\/library\/ms130214.aspx<\/p>\n<p>\u3000SQL Server 2008 \u306f WKT \u304b\u3089\u57fa\u672c\u7684\u306a\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5f62\u614b\u306b\u7279\u5b9a\u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\uff0ePoint, LineString \u304a\u3088\u3073 Polygon \u3067\u3042\u308b\u304c\uff0c\u540c\u7a2e\u3067\u591a\u8981\u7d20\u304a\u3088\u3073\u7570\u7a2e\u306e Geometry Collection \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u578b\u306b\u5bfe\u3057\u3066\u3082\u540c\u69d8\u3067\u3042\u308b\uff0eWKT \u304b\u3089\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3067\u304d\u308b\u6c4e\u7528\u306e\u30e1\u30bd\u30c3\u30c9\u3082\u5b58\u5728\u3059\u308b\uff0e\u3055\u3066\uff0c\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u8a73\u7d30\u3092\u898b\u3066\u307f\u3088\u3046\uff0e<\/p>\n<h4>WKT \u304b\u3089 Point \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000\u30c7\u30ab\u30eb\u30c8\u5ea7\u6a19\u7cfb\u306b\u7531\u6765\u3059\u308b Point \u3092\u8868\u73fe\u3059\u308b WKT \u69cb\u6587\u3068\u306f\uff0c\u6295\u5f71\u5ea7\u6a19\u7cfb\u306b\u7531\u6765\u3059\u308b\u3088\u3046\u306a\u3082\u306e\u3067\u3042\u308b\u304c\uff0c\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>POINT(x y)<\/pre>\n<p>\u3000\u5730\u7406\u5ea7\u6a19\u7cfb\u3067\u6307\u5b9a\u3055\u308c\u305f Point \u306e\u305f\u3081\u306e\u540c\u7b49\u306e WKT \u69cb\u6587\uff0e<\/p>\n<pre>POINT(longitude latitude)<\/pre>\n<p>\u3000\u305d\u308c\u305e\u308c\u306e\u30b1\u30fc\u30b9\u3067\u306f\uff0cPOINT \u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f34\u3046\u8868\u73fe\u306f\uff0c\u305d\u306e\u5f8c\u306b\u30dd\u30a4\u30f3\u30c8\u306e\u5ea7\u6a19\u5024\u306b\u3042\u305f\u308b\u3068\u3053\u308d\u304c\u7d9a\u304d\uff0c\u4e38\u62ec\u5f27\u306b\u56f2\u307e\u308c\u3066\u3044\u308b\uff0e\u5ea7\u6a19\u5024\u306f\u30b3\u30f3\u30de\u3067\u306f\u306a\u304f\uff0c\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3055\u308c\u305f\u3044\uff0e<\/p>\n<p>\u6ce8\u610f\u3000\u65e5\u5e38\u8a00\u8a9e\u3067\u306f\u7def\u5ea6\u3068\u7d4c\u5ea6\u3092\u53c2\u7167\u3059\u308b\u306e\u306f\u666e\u901a\u3067\u3042\u308b\uff08\u305d\u306e\u9806\u5e8f\u3067\uff09\uff0e\u3057\u304b\u3057\uff0c\u4e00\u7d44\u306e\u5730\u7406\u5ea7\u6a19\u3092 WKT \u5185\u3067\u5b9a\u7fa9\u3059\u308b\u6642\u306b\u306f\uff0c\u7d4c\u5ea6\u5ea7\u6a19\u304c\u5148\u3067\uff0c\u7def\u5ea6\u5ea7\u6a19\u304c\u305d\u306e\u5f8c\u306b\u306a\u308b\uff0e\u6b63\u3057\u3044\u9806\u5e8f\u3067\u5ea7\u6a19\u3092\u6307\u5b9a\u3059\u308b\u3088\u3046\u306b\u6ce8\u610f\u3057\u3088\u3046\uff01<\/p>\n<p>\u3000WKT \u8868\u73fe\u304b\u3089 geography \u578b\u3042\u308b\u3044\u306f geometry \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u306b\u306f\uff0c\u9069\u5207\u306a\u30c7\u30fc\u30bf\u578b\u306e STPointFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u4f8b\u3048\u3070\uff0cgeography \u578b\u3092\u4f7f\u3063\u3066 Edinburgh \u3092\u8868\u73fe\u3059\u308b Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u305f\u3044\u3068\u3059\u308b\uff0e\u5ea7\u6a19\u304c\u7d4c\u5ea6 -3.19 \u5ea6\u306e\u7def\u5ea6 55.95 \u5ea6\uff0c\u7a7a\u9593\u53c2\u7167\u7cfb\u306b SRID 4326 \u3067\u8868\u73fe\u3055\u308c\u3066\u3044\u308b\u3068\u3059\u308b\uff0e\u6b21\u306e\u30af\u30a8\u30ea\u3092 SQL Server Management Studio \u3067\u5b9f\u884c\u3067\u304d\u308b\uff0e<\/p>\n<pre class=\"\">DECLARE @Edinburgh geography\nSET @Edinburgh = geography::STPointFromText('POINT(-3.19 55.95)', 4326)<\/pre>\n<p>\u3000\u6b21\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u3051\u53d6\u308b\u306b\u9055\u3044\u306a\u3044\uff0e<\/p>\n<pre>Command(s) completed successfully.<\/pre>\n<p>\u3000\u5909\u6570 @Edinburgh \u306f\u4eca\u5ea6\u306f\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u751f\u6210\u3055\u308c\u305f Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4fdd\u6301\u3059\u308b\uff0e\u5225\u306e\u4f8b\u3092\u8a66\u3057\u3066\u307f\u3088\u3046\uff0e\u4eca\u5ea6\u306f\uff0cGlasgow \u3092\u8868\u73fe\u3059\u308b Point \u3092\u751f\u6210\u3057\u3066\u307f\u3088\u3046\uff0e\u5ea7\u6a19\u306f (258647,665289) \u3067\u7a7a\u9593\u53c2\u7167\u7cfb\u306f 27700 \u3092\u4f7f\u3063\u3066\u3044\u308b\uff0e\u3053\u306e\u305f\u3081\u306b\uff0c\u6b21\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3055\u305b\u3066\u307f\u308b\uff0e<\/p>\n<pre>DECLARE @Glasgow geography\nSET@Glasgow = geography::STPointFromText('POINT(258647 665289)', 27700)<\/pre>\n<p>\u3000\u4f55\u3066\u3053\u3068\u3060\uff01\u4eca\u56de\u306f\u6b21\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u306b\u306a\u308b\uff0e<\/p>\n<pre class=\"\">Msg 6522, Level 16, State 1, Line 2\nA .NET Framework error occurred during execution of user-defined routine or aggregate \"geography\";\nSystem.ArgumentException: 24204: The spatial reference identifier (SRID) is not valid. The specified SRID must match one of the supported SRIDs displayed in the sys.spatial_reference_systems catalog view.<\/pre>\n<p>\u3000\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\uff0egeography \u578b\u306f\u5730\u7406\u5ea7\u6a19\u3092\u84c4\u7a4d\u3059\u308b\u305f\u3081\u3060\u3051\u306b\u3057\u304b\u4f7f\u3048\u305a\uff0c\u6e2c\u5730\u7a7a\u9593\u53c2\u7167\u7cfb\u7531\u6765\u3068\u8a8d\u8b58\u3055\u308c\u305f\u3082\u306e\u306b\u9650\u3089\u308c\u308b\u3068\u3044\u3046\u3053\u3068\u3092\uff0e\u3057\u304b\u3057\uff0c\u3053\u3053\u3067\u4f7f\u7528\u3057\u305f geography \u578b\u306e STPointFromText() \u30e1\u30bd\u30c3\u30c9\u306f SRID 27700 \u306b\u57fa\u3065\u304f\u5ea7\u6a19\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306f\u6295\u5f71\u5ea7\u6a19\u7cfb\u306b\u57fa\u3065\u304f\u7a7a\u9593\u53c2\u7167\u7cfb\u306a\u306e\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u3053\u308c\u3089\u306e\u5ea7\u6a19\u7cfb\u306b\u57fa\u3065\u3044\u305f\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u306b\u306f\uff0cWKT \u69cb\u6587\u3092\u307e\u3060\u4f7f\u3048\u308b\u304c\uff0c\u4ee3\u308f\u308a\u306b geometry \u578b\u306b\u6240\u5c5e\u3059\u308b STPointFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u308f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u6b21\u306e\u3088\u3046\u306b\uff0e<\/p>\n<pre class=\"\">DECLARE @Glasgow geometry\nSET @Glasgow = geometry::STPointFromText('POINT(258647 665289)', 27700)<\/pre>\n<p>\u3000\u4eca\u5ea6\u306f geometry \u578b\u3092\u4f7f\u7528\u3057\u305f\u305f\u3081\uff0c\u6295\u5f71\u7a7a\u9593\u53c2\u7167\u7cfb\u304b\u3089\u53d6\u5f97\u3057\u305f\u5e73\u9762\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3059\u308b\u3082\u306e\u3067\uff0c\u305d\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u6210\u529f\u88cf\u306b\u5909\u6570 @Glasgow \u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\uff0e\u6b21\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u793a\u3059\uff0e<\/p>\n<pre>Command(s) completed successfully.<\/pre>\n<p>\u6ce8\u610f\u3000WKT \u306f geometry \u578b\u3042\u308b\u3044\u306f geography \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5358\u306a\u308b\u30c6\u30ad\u30b9\u30c8\u8868\u73fe\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e\u5358\u306a\u308b WKT \u6587\u5b57\u5217\u3092\u76f4\u63a5 geometry \u578b\u3042\u308b\u3044\u306f geography \u578b\u306e\u5217\u306b\u633f\u5165\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff0e<\/p>\n<pre>INSERT INTO GeographyColumn VALUES ('POINT(100 40)')<\/pre>\n<p>\u3000\u4ee3\u308f\u308a\u306b\uff0cWKT \u6587\u5b57\u5217\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<pre>STPointFromText()<\/pre>\n<h5>Z \u5ea7\u6a19\u304a\u3088\u3073 M \u5ea7\u6a19<\/h5>\n<p>\u3000\u5730\u7403\u4e0a\u306e\u3042\u308b\u5730\u70b9\u306e\u4f4d\u7f6e\u3092\u5b9a\u7fa9\u3059\u308b\u306b\u306f\uff0c\u305f\u3063\u305f\u4e8c\u3064\u306e\u5ea7\u6a19\u304c\u5fc5\u8981\u3068\u3059\u308b\u3060\u3051\u3067\u3042\u308b\u3053\u3068\u3092\u77e5\u3063\u3066\u3044\u308b\uff0ex \u3068 y \uff08\u6295\u5f71\u5ea7\u6a19\u53c2\u7167\u7cfb\u306b\u304a\u3044\u3066\u306f\uff09\uff0c\u3042\u308b\u3044\u306f\uff0c\u7def\u5ea6\u3068\u7d4c\u5ea6\uff08\u5730\u7406\u5ea7\u6a19\u53c2\u7167\u7cfb\uff09\u3067\u3042\u308b\uff0e\u3057\u304b\u3057\uff0c\u3053\u308c\u3089\u4e8c\u3064\u306e\u5ea7\u6a19\u306b\u52a0\u3048\u3066\uff0cWKT \u306b\u304a\u3051\u308b Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u4ed8\u52a0\u7684\u306a z \u304a\u3088\u3073 m \u5ea7\u6a19\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308b\uff0e<\/p>\n<ul>\n<li>z \u5ea7\u6a19\u306f\u3042\u308b\u5730\u70b9\u306e\u9ad8\u5ea6\uff0c\u3042\u308b\u3044\u306f\u9ad8\u3055\u3092\u8868\u73fe\u3059\u308b\uff0e\u5730\u7403\u8868\u9762\u4e0a\u306e\u4f4d\u7f6e\u304c\u6c34\u5e73\u57fa\u6e96\u3092\u53c2\u7167\u3057\u3066\u6e2c\u5b9a\u3055\u308c\u308b\u3088\u3046\u306b\uff0c\u305d\u306e\u8868\u9762\u306e\u4e0a\u4e0b\u306e\u9ad8\u5ea6\u306f\u5782\u76f4\u57fa\u6e96\u3092\u4f7f\u3063\u3066\u6e2c\u5b9a\u3055\u308c\u308b\uff0e\u3042\u308b\u5730\u70b9\u306e z \u5ea7\u6a19\u306f\u57fa\u76e4\u3068\u306a\u308b\u5730\u5f62\u306e\u4e0a\u3067\u3042\u308b\u6d77\u9762\u4e0a\u306e\u9ad8\u5ea6\u3092\u6e2c\u5b9a\u3057\uff0c\u3042\u308b\u3044\u306f\uff0c\u4f7f\u308f\u308c\u308b\u5782\u76f4\u57fa\u6e96\u3092\u5b9a\u7fa9\u3059\u308b\u53c2\u7167\u6955\u5186\u4f53\u304b\u3089\u306e\u9ad8\u5ea6\u3092\u6e2c\u5b9a\u3059\u308b\uff0e<\/li>\n<li>m \u5ea7\u6a19\u306f\u3042\u308b\u5730\u70b9\u306e\u8a08\u6e2c\u5024 &#8220;measure&#8221; \u3092\u84c4\u7a4d\u3059\u308b\uff0e\u3053\u306e\u5ea7\u6a19\u306f\u3042\u308b\u5730\u70b9\u306e\u4efb\u610f\u306e\u4ed8\u52a0\u7684\u306a\u5c5e\u6027\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\uff0c\u500d\u7cbe\u5ea6\u6570\u3067\u8868\u73fe\u3055\u308c\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u4eee\u306b\u7a7a\u9593\u5c5e\u6027\u3092\u6642\u9593\u30d9\u30fc\u30b9\u306e\u30c7\u30fc\u30bf\u3067\u8a18\u9332\u3057\u305f\u3044\u306a\u3089\uff0c\u3042\u308b\u5730\u70b9\u306e m \u5024\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3055\u308c\u305f\u6642\u523b\u3092\u8868\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u3042\u308b\u3044\u306f\uff0c\u4eee\u306b\u305d\u306e\u5730\u70b9\u304c\u7d4c\u8def\u4e0a\u306b\u4f4d\u7f6e\u3057\u3066\u3044\u308b\u306a\u3089\uff0c\u305d\u306e m \u5ea7\u6a19\u306f\u7d4c\u8def\u306b\u6cbf\u3063\u305f\u8ddd\u96e2\u3092\u84c4\u7a4d\u3059\u308b\u306e\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000z \u304a\u3088\u3073 m \u3092\u542b\u3080 WKT \u8868\u73fe\u306b\u304a\u3051\u308b\u5730\u70b9\u3092\u8868\u73fe\u3059\u308b\u306b\u306f\uff0c\u6b21\u306e\u69cb\u6587\u3092\u4f7f\u3046\u3053\u3068\uff0e<\/p>\n<pre>POINT(x y z m)<\/pre>\n<p>\u3000\u3042\u308b\u3044\u306f\uff0c\u5730\u7406\u5ea7\u6a19\u3092\u4f7f\u3046\u306a\u3089\uff0c\u6b21\u306e\u69cb\u6587\u3092\u4f7f\u3046\u3053\u3068\uff0e<\/p>\n<pre>POINT(longitude latitude z m)<\/pre>\n<p>\u3000SQL Server 2008 \u304c WKT \u306b\u57fa\u3065\u3044\u3066\u63d0\u4f9b\u3059\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\uff0cSTPointFromText()\u306e\u3088\u3046\u306a\u3082\u306e\u3060\u304c\uff0cPOINT \u5b9a\u7fa9\u306e\u4e00\u90e8\u3068\u3057\u3066 z \u304a\u3088\u3073 m \u5024\u306e\u751f\u6210\u3068\u84c4\u7a4d\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\uff0e\u3057\u304b\u3057\uff0c\u3053\u308c\u3089\u306e\u5ea7\u6a19\u304c\u8a08\u7b97\u306e\u5b9f\u884c\u6642\u306b\u4f7f\u308f\u308c\u308b\u3053\u3068\u306f\u306a\u3044\uff0e\u4f8b\u3048\u3070\uff0c(0 0 0) \u304a\u3088\u3073 (3 4 12) \u306b\u4f4d\u7f6e\u3059\u308b\u5730\u70b9\u9593\u306e\u8ddd\u96e2\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\uff0cSQL Server 2008 \u306f\u7d50\u679c\u3092 5 \u5358\u4f4d\uff08x \u304a\u3088\u3073 y \u306e\u6b21\u5143\u306e\u5dee\u5206\u306e\u5408\u8a08\u306e\u5e73\u65b9\u6839\uff09\u3068\u3057\u3066\u8a08\u7b97\u3059\u308b\uff0e13 \u3067\u306f\u306a\u3044\uff08x, y \u304a\u3088\u3073 z \u6b21\u5143\u3067\u306e\u5dee\u5206\u306e\u5408\u8a08\u306e\u5e73\u65b9\u6839\uff09\uff0e<\/p>\n<h4>WKT \u304b\u3089 LineString \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000n \u500b\u306e\u70b9\u3092\u542b\u3080 LineString \u306e WKT \u69cb\u6587\u306f\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<pre class=\"\">LINESTRING(x1 y1, x2 y2, ..., xn yn)<\/pre>\n<p>\u3000Point \u306e WKT \u69cb\u6587\u306e\u3088\u3046\u306b\uff0c\u751f\u6210\u3059\u3079\u304d\u30b8\u30aa\u30e1\u30c8\u30ea\uff0c\u3053\u3053\u3067\u306f LineString \u306e\u3053\u3068\u3060\u304c\uff0c\u305d\u306e\u7a2e\u985e\u3092\u6307\u5b9a\u3059\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u8868\u73fe\u306b\uff0c\u4e38\u62ec\u5f27\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u5404\u70b9\u306e\u5ea7\u6a19\u304c\u7d9a\u304f\uff0e\u3042\u308b\u4e00\u70b9\u3092\u5b9a\u7fa9\u3059\u308b\u305d\u306e\u5ea7\u6a19\u5024\u306f\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\uff0cLinestring \u5185\u306e\u5404\u70b9\u3092\u8868\u73fe\u3059\u308b\u305d\u306e\u5ea7\u6a19\u306e\u96c6\u5408\u306f\u30b3\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u308b\uff0e<\/p>\n<p>\u3000LinsString \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b STLineFromText() \u30e1\u30bd\u30c3\u30c9\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u4e00\u3064\u306e LineString \u3092\u8868\u73fe\u3059\u308b\u306e\u306b WKT \u8868\u73fe\u3092\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u308b\uff0e\u4e00\u3064\u306e\u5358\u7d14\u306a LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046\uff0e\u305d\u308c\u306f\uff12\u3064\u306e\u70b9\u3092\u3064\u306a\u3044\u3060\u3082\u306e\u3067 Sydney Habour Bridge \u306e\u4e21\u7aef\u3092\u793a\u3057\u3066\u3044\u308b\uff0e\u3053\u306e\u4f8b\u3067\u306f geography \u578b\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u3088\u3046\uff0e\u305d\u3057\u3066\u59cb\u70b9\u3068\u7d42\u70b9\u306e\u5ea7\u6a19\u3092 SRID 4326 \u3068\u5b9a\u7fa9\u3057\u3088\u3046\uff0e<\/p>\n<pre class=\"\">DECLARE @SydneyHarbourBridge geography\nSET @SydneyHarbourBridge = geography::STLineFromText(\n'LINESTRING(\n151.209 -33.855, \n151.212 -33.850\n)',\n 4326)<\/pre>\n<p>\u3000\u4eca\u5ea6\u306f\u3082\u3063\u3068\u8907\u96d1\u306a LineString, \uff15\u3064\u306e\u70b9\u3092\u7d50\u3093\u3060\u3082\u306e\u306b\u6311\u6226\u3057\u3088\u3046\uff0e\u3053\u306e\u4f8b\u3067\u306f\uff0c\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u3044\u308b\uff0eGeometry \u30c6\u30fc\u30d6\u30eb\u306e GeometryColumn \u3068\u8a00\u3046\u540d\u306e geometry \u578b\u306e\u5217\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u633f\u5165\u3059\u308b\u65b9\u6cd5\u3092\u4f8b\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre class=\"\">INSERT INTO Geometries (\nNameColumn,\nGeometryColumn\n)\nVALUES (\n'Linestring connecting five points',\ngeometry::STLineFromText(\n'LINESTRING(\n53.4 -2.99, \n53.5 -3.15, \n53.47 -4.66, \n53.40 -5.11, \n53.34 -6.25\n)',\n0)\n)<\/pre>\n<p>\u3000\u3053\u306e\u4f8b\u3067\u306f\uff0c\u3055\u3089\u306a\u308b\u70b9\u306e\u5ea7\u6a19\u3092\u5358\u7d14\u306b WKT \u8868\u73fe\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u306b\u3088\u308a\uff0c\u3088\u308a\u9577\u304f\u3088\u308a\u8907\u96d1\u306a LineString \u3092\u4f5c\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u308b\uff0e\u305d\u308c\u305e\u308c\u306e\u70b9\u306f\u30b3\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u3066\u3044\u308b\uff0e<\/p>\n<h4>WKT \u304b\u3089 Polygon \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000Polygon \u306e WKT \u69cb\u6587\u306f\uff0c\u5404\u30ea\u30f3\u30b0\u306b n \u500b\u306e\u70b9\u3092\u6301\u3064 z \u500b\u306e\u30ea\u30f3\u30b0\u304b\u3089\u306a\u308a\uff0c\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n<pre>POLYGON(\n(ax1 ay1, ax2 ay2, ..., axn ayn, ax1 ay1),\n(bx1 by1, bx2 by2, ..., bxn byn, bx1 by1),\n...\n(zx1 zy1, ax2 ay2, ..., zxn zyn, zx1 zy1)\n)<\/pre>\n<p>\u3000\u5148\u8ff0\u3057\u305f WKT \u306e\u4f8b\u5168\u3066\u306b\u5f53\u3066\u306f\u307e\u308b\u3088\u3046\u306b\uff0c\u305d\u306e\u8868\u73fe\u306b\u306f\u4e38\u62ec\u5f27\u304c\u542b\u307e\u308c\uff0c\u6b21\u306e\u521d\u671f\u30ad\u30fc\u30ef\u30fc\u30c9\uff0c\u3053\u306e\u4f8b\u3067\u306f POLYGON \u306b\u7d9a\u304f\uff0e\u3053\u308c\u3089\u306e\u4e38\u62ec\u5f27\u5185\u306b\u306f\uff0cPolygon \u306e\u30ea\u30f3\u30b0\u306e\u5404\u5ea7\u6a19\u304c\u542b\u307e\u308c\u3066\u304a\u308a\uff0c\u305d\u308c\u3089\u81ea\u8eab\u306e\u8ffd\u52a0\u306e\u62ec\u5f27\u5185\u306b\u53ce\u307e\u3063\u3066\u3044\u308b\uff0e\u4e00\u3064\u306e Polygon \u306e\u30ea\u30f3\u30b0\u306f\u9589\u3058\u305f LineString \u3067\u3042\u308b\u304b\u3089\uff0c\u5404\u30ea\u30f3\u30b0\u306e WKT \u69cb\u6587\u306f\u4e00\u3064\u306e LineString \u306e\u5b9a\u7fa9\u306b\u4f7f\u3046\u69cb\u6587\u3068\u5168\u304f\u540c\u3058\u3067\u3042\u308b\uff0e\u4e00\u3064\u306e\u5ea7\u6a19\u30bf\u30d7\u30eb\u5185\u306e\u72ec\u7acb\u3057\u305f\u5ea7\u6a19\u5024\u306f\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\uff0c\u5ea7\u6a19\u306e\u96c6\u5408\u306f\u30b3\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u308b\uff0e<\/p>\n<p>\u3000\u5ea7\u6a19\u306e\u6700\u521d\u306e\u96c6\u5408\u3067\u3042\u308b (ax1 ay1, ax2 ay2, &#8230;, axn, ayn, ax1 ay1) \u306f Polygon \u306e\u5916\u5468\u3092\u5b9a\u7fa9\u3059\u308b\u70b9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u308b\uff0e\u5916\u5468\u30ea\u30f3\u30b0\u306e\u5b9a\u7fa9\u306b\u7d9a\u3051\u3066\uff0cPolygon \u3092\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u3044\u304f\u3064\u3067\u3082\u4efb\u610f\u306e\u6570\u3060\u3051\u5b9a\u7fa9\u3067\u304d\u308b\uff0e(bx1 by2, bx2 by2, &#8230; bxn byn, bx1 by1), (zx1 zy1, zx2 zy2, &#8230; zxn zyn, zx1 zy1) \u306a\u3069\uff0e\u3059\u3079\u3066\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u5b9a\u7fa9\u306f\u5916\u90e8\u30ea\u30f3\u30b0\u3068\u540c\u3058\u69cb\u6587\u306b\u5f93\u3044\uff0c\u4e38\u62ec\u5f27\u306e\u5185\u90e8\u306b\u542b\u307e\u308c\uff0c\u524d\u306e\u30ea\u30f3\u30b0\u304b\u3089\u306f\u30b3\u30f3\u30de\u306b\u3088\u308a\u533a\u5207\u3089\u308c\u308b\uff0e\u6b21\u306e\u70b9\u306f\u91cd\u8981\u3067\u3042\u308b\uff0e\u3064\u307e\u308a\uff0c\u5404\u30ea\u30f3\u30b0\u306f\u5fc5\u305a\u9589\u3058\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u3064\u307e\u308a\uff0c\u5404\u30ea\u30f3\u30b0\u5185\u90e8\u3067\u306f\uff0c\u6700\u521d\u306e\u5ea7\u6a19\u30bf\u30d7\u30eb\u3068\u6700\u5f8c\u306e\u5ea7\u6a19\u30bf\u30d7\u30eb\u306f\u7b49\u3057\u304f\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000geometry \u578b\u3092\u4f7f\u3046\u6642\u306b\u306f\u5916\u90e8\u30ea\u30f3\u30b0\u306f\u3072\u3068\u3064\u306e Polygon \u5185\u90e8\u3092\u542b\u3080\u5468\u7e01\u3092\u5b9a\u7fa9\u3059\u308b\uff0e\u4e00\u65b9\uff0c\u5404\u5185\u90e8\u30ea\u30f3\u30b0\u306f\u305d\u306e Polygon \u3092\u5207\u308a\u53d6\u308b\u300c\u7a74\u300d\u3092\u5b9a\u7fa9\u3059\u308b\uff0egeography \u578b\u3092\u4f7f\u3046\u6642\u306b\u306f\uff0c\u5916\u90e8\u30ea\u30f3\u30b0\u3068\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u9593\u3092\u533a\u5225\u3059\u308b\u3053\u3068\u306f\u91cd\u8981\u3067\u306f\u306a\u3044\uff0e\u3059\u3079\u3066\u306e\u30ea\u30f3\u30b0\u306f Polygon \u5185\u306b\u542b\u307e\u308c\u308b\u7a7a\u9593\u306e\u9762\u3092\u5b9a\u7fa9\u3057\uff0c\u9664\u304b\u308c\u308b\u9762\u3092\u5b9a\u7fa9\u3059\u308b\uff0e\u3086\u3048\u306b\uff0cgeography \u578b\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\uff0cWKT \u8868\u73fe\u5185\u306b\u4e26\u3079\u308b\u9806\u756a\u306f\u91cd\u8981\u3067\u306f\u306a\u3044\uff0e<\/p>\n<p>\u3000\u4eee\u306b Polygon \u304c\u4e00\u3064\u3057\u304b\u30ea\u30f3\u30b0\u3092\u542b\u307e\u306a\u3044\u5834\u5408\u3067\u3082\uff0c\u305d\u306e\u30ea\u30f3\u30b0\u306e\u70b9\u3082\u305d\u308c\u3089\u4e38\u62ec\u5f27\u306e\u96c6\u5408\u5185\u306b\u542b\u307e\u308c\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e\u3053\u306e\u4f8b\u3067\u306f\uff0c\u305d\u306e\u70b9\u306e\u5ea7\u6a19\u306f POLYGON \u30ad\u30fc\u30ef\u30fc\u30c9\u5b9a\u7fa9\u306e\u5f8c\u306e\u4e8c\u91cd\u306e\u4e38\u62ec\u5f27\u5185\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u307f\u3048\u308b\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>PLOLYGON((x1 y1, x2 y2, ..., xn yn, x1 y1))<\/pre>\n<p>\u6ce8\u610f\u3000Polygon \u306f\u9589\u3058\u305f\u30ea\u30f3\u30b0\u3067\u69cb\u6210\u3055\u308c\uff0c\u305d\u306e\u305f\u3081\u5404\u30ea\u30f3\u30b0\u306e\u6700\u521d\u306e\u5ea7\u6a19\u30bb\u30c3\u30c8\u3068\u6700\u5f8c\u306e\u5ea7\u6a19\u30bb\u30c3\u30c8\u306f\u540c\u3058\u3067\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e<\/p>\n<p>\u3000WKT \u304b\u3089 geometry \u578b\u3067\u3082 geography \u578b\u3067\u3082 Polygon \u3092\u751f\u6210\u3059\u308b SQL Server \u306e\u30e1\u30bd\u30c3\u30c9\u306f STPolyFromText() \u3068\u547c\u3070\u308c\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\uff0c\u3042\u308b Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u793a\u3057\u3088\u3046\uff0e\u5408\u8846\u56fd\u9632\u885b\u7701\u30da\u30f3\u30bf\u30b4\u30f3\u306e\u5efa\u7269\u3092\u8868\u73fe\u3057\uff0cgeography \u578b\u3067 SRID 4326 \u3092\u4f7f\u3046\uff0e<\/p>\n<pre class=\"\">DECLARE @Pentagon geography\nSET @Pentagon = geography::STPolyFromText(\n'POLYGON(\n(\n-77.0532238483429 38.870863029297695, \n-77.05468297004701 38.87304314667469,\n-77.05788016319276 38.872800914712734,\n-77.05849170684814 38.870219840133124,\n-77.05556273460388 38.8690670969385,\n-77.0532238483429 38.870863029297695\n),\n(\n-77.05582022666931 38.8702866652523,\n-77.0569360256195 38.870737733163644,\n-77.05673217773439 38.87170668418343,\n-77.0554769039154 38.871848684516294,\n-77.05491900444031 38.87097997215688,\n-77.05582022666931 38.8702866652523\n)\n)',\n4326\n)<\/pre>\n<p>\u3000\u3053\u306e Polygon \u306e\u5b9a\u7fa9\u306f\uff12\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080\uff0e\u5404\u30ea\u30f3\u30b0\u306f\u89d2\u304c\uff15\u3064\u306e\u4e94\u89d2\u5f62\u3092\u3057\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u5404\u30ea\u30f3\u30b0\u306b\u306f\u305d\u306e\u5b9a\u7fa9\u306b\uff16\u3064\u306e\u70b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\uff0e\u305d\u308c\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6700\u521d\u3068\u6700\u5f8c\u306e\u70b9\u304c\u4e8c\u56de\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3042\u308b\uff0e\u6b21\u306e\u70b9\u306b\u6ce8\u76ee\u3057\u3088\u3046\uff0c\u3053\u306e\u4f8b\u304c geography \u578b\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\uff0c\u6700\u521d\u306e\u30ea\u30f3\u30b0\u306e\u70b9\u306f\u5efa\u7269\u306e\u5916\u5074\u306e\u7e01\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u3066\u53cd\u6642\u8a08\u56de\u308a\u306e\u9806\u756a\u3067\u3042\u308b\u3053\u3068\uff0c\u53cd\u5bfe\u306b\u4e8c\u756a\u76ee\u306e\u30ea\u30f3\u30b0\u306e\u70b9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u7701\u7565\u3055\u308c\u305f\u4e2d\u5ead\u3092\u56f2\u3093\u3067\u3044\u3066\u6642\u8a08\u56de\u308a\u306e\u9806\u756a\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\uff08geography \u578b\u3092\u7528\u3044\u308b\u969b\u306e\u30ea\u30f3\u30b0\u306e\u9806\u756a\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u3055\u3089\u306a\u308b\u60c5\u5831\u306f\u7b2c\uff12\u7ae0\u3092\u53c2\u7167\u306e\u3053\u3068\uff09\uff0e<\/p>\n<h4>WKT \u304b\u3089 MultiPoint \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000MultiPoint \u306f\u4e00\u3064\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306b\u3044\u304f\u3064\u304b\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u53ce\u3081\u305f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u3042\u308b\uff0eMultiPoint \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 WKT \u3067\u8868\u73fe\u3059\u308b\u306b\u306f\uff0c\u6700\u521d\u306b MULTIPOINT \u8981\u7d20\u540d\u3092\u5ba3\u8a00\u3057\uff0c\u7d9a\u3051\u3066\u30b3\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u305f\uff0c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u542b\u307e\u308c\u308b\u5404\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5ea7\u6a19\u30bf\u30d7\u30eb\u306e\u30ea\u30b9\u30c8\u304c\u7d9a\u304f\uff0e\u5358\u4e00\u8981\u7d20\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u8868\u73fe\u3055\u308c\u308b\u306e\u3068\u540c\u3058\u4f5c\u6cd5\u3067\u3042\u308b\uff08\u3064\u307e\u308a\uff0c\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u306e\u5404 Point \u306e\u72ec\u7acb\u3057\u305f\u5ea7\u6a19\u5024\u306f x y z m \u306e\u9806\u306b\u7d9a\u3051\u3066\u8a18\u8ff0\u3059\u308b\u304b\uff0clongitude latitude z m \u306e\u9806\u306b\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3063\u3066\u8a18\u8ff0\u3059\u308b\uff09\uff0e<\/p>\n<p>\u3000\u4f8b\u3048\u3070\uff0c\u6b21\u306e MultiPoint \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKT \u8868\u73fe\u306f\uff13\u3064\u306e Point \u3092\u542b\u3093\u3067\u3044\u308b\uff0e<\/p>\n<pre>MULTIPOINT(21 2, 12 2, 30 40)<\/pre>\n<p>\u3000WKT \u8868\u73fe\u306b\u304a\u3051\u308b\u5404\u70b9\u306f\uff12\u3064\u304b\u3089\uff14\u3064\u306e\u5ea7\u6a19\u5024\u3092\u542b\u3080\u305f\u3081\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u306e z \u5ea7\u6a19\u3068 m \u5ea7\u6a19\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u304b\u306b\u4f9d\u5b58\u3059\u308b\uff09\uff0c\u5404\u5ea7\u6a19\u30bf\u30d7\u30eb\u3092\u533a\u5207\u308b\u305f\u3081\u306b\u30b3\u30f3\u30de\u30c7\u30ea\u30df\u30bf\u306f\u6b63\u78ba\u306b\u7f6e\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u5148\u8ff0\u3057\u305f\u4f8b\u3068\u6bd4\u3079\u308b\u3068\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u540c\u3058\u5ea7\u6a19\u5024\u3092\u4f7f\u3063\u3066\u3044\u308b\u304c\uff12\u3064\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080 MultiPoint \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u305e\u308c\u306e\u70b9\u306f x, y \u304a\u3088\u3073 z \u5ea7\u6a19\u3092\u6709\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>MULTIPOINT(21 2 12, 2 30 40)<\/pre>\n<p>\u3000MultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKT \u8868\u73fe\u306f\uff0c\u65b0\u3057\u3044 MultiPoint \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u305f\u3081\u306e STMPointFromText() \u30e1\u30bd\u30c3\u30c9\u3067\u63d0\u4f9b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u306f STMPointFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\uff13\u3064\u306e Point \u3092\u542b\u3080 MultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u306e\u3092\u793a\u3057\u3066\u304a\u308a\uff0c\uff13\u3064\u306e Point \u306f Giza \u306b\u3042\u308b Khafre, Khufu, Menkaure \u306e\u30d4\u30e9\u30df\u30c3\u30c9\u3092\u8868\u73fe\u3057\u3066\u304a\u308a\uff0cSRID 32636 \u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Pyramids geometry\nSET @Pyramids = geometry::STMPointFromText(\n'MULTIPOINT(319640 3317580, 319980 3317940, 319400 3317200)',\n32636\n)<\/pre>\n<h4>WKT \u304b\u3089 MultiLIneString \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000MultiLineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKT \u8868\u73fe\u306f\u5404 LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30b3\u30f3\u30de\u533a\u5207\u308a\u30ea\u30b9\u30c8\u304c\u5f62\u6210\u3055\u308c\u308b\uff0e\u3057\u304b\u3057\uff0cLineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306eWKT \u69cb\u6587\u304c\u3059\u3067\u306b\u5404\u70b9\u306e\u9593\u306b\u30b3\u30f3\u30de\u30c7\u30ea\u30df\u30bf\u3092\u542b\u3093\u3067\u3044\u308b\u305f\u3081\uff0cMultiLineString \u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u5404 LineString \u306f\u4e38\u62ec\u5f27\u3067\u56f2\u307e\u306a\u3051\u308c\u3070\u306a\u3089\u305a\uff0c\u305d\u308c\u306b\u3088\u308a MultiLineString \u5185\u306b\u3042\u308b\u4ed6\u306e LineString \u8981\u7d20\u304b\u3089\u7279\u5b9a\u306e LineString \u5185\u306e\u70b9\u3092\u533a\u5225\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u4f8b\u304c\u793a\u3059\u3088\u3046\u306b\uff0cMultiLineString \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u69cb\u6587\u306f\uff12\u3064\u306e LineString \u8981\u7d20\u3092\u542b\u3093\u3067\u304a\u308a\uff0c\u6700\u521d\u306e\u306f\uff13\u3064\u306e Point \u3092\u542b\u307f\uff0c\u4e8c\u756a\u76ee\u306e\u306f\uff12\u3064\u306e Point \u3092\u542b\u3093\u3067\u3044\u308b\uff0e<\/p>\n<pre>MULTILINESTRING((10 20, 3 4, 43 42),(44 10, 20 40))<\/pre>\n<p>\u3000\u3053\u306e\u8868\u73fe\u304b\u3089SRID 20539 \u306b\u57fa\u3065\u3044\u3066 geometry \u578b\u306e MultiLineString \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u306b\u306f\uff0cSTMLineFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @MultiLineString geometry\nSET @MultiLineString = geometry::STMLineFromText(\n'MULTILINESTRING((10 20, 3 4, 43 42),(44 10, 20 40))',\n20539\n)<\/pre>\n<h4>WKT \u304b\u3089 MultiPolygon \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000MultiPolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e WKT \u8868\u73fe\u306f MULTIPOLYGON \u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u5ba3\u8a00\u304b\u3089\u59cb\u307e\u308b\uff0eMultiLineString \u3067\u307f\u305f\u3088\u3046\u306b\uff0cmultiPolygon \u5185\u90e8\u306e\u5404 Polygon \u8981\u7d20\u306f\u4e38\u62ec\u5f27\u306e\u96c6\u5408\u3092\u4ed8\u52a0\u3057\u3066\u53ce\u3081\u3089\u308c\u3066\u304a\u308a\uff0c\u30b3\u30f3\u30de\u3067\u533a\u5207\u308b\uff0e\u6b21\u306e MultiPolygon \u8981\u7d20\u306e WKT \u8868\u73fe\u306f\uff12\u3064\u306e Polygon \u3092\u542b\u3093\u3067\u304a\u308a\uff0c\u305d\u308c\u305e\u308c\u304c\u5916\u90e8\u30ea\u30f3\u30b0\u306e\u307f\u3092\u6301\u3064\uff0e<\/p>\n<pre>MULTIPOLYGON(((10 20, 30 40, 44 50, 10 20)),((5 0, 20 40, 30 34, 5 0)))<\/pre>\n<p>\u3000MultiPolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u3092 WKT \u304b\u3089\u751f\u6210\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306f STMPolyFromText() \u3067\u3042\u308b\uff0e\u3053\u308c\u306f\u5148\u8ff0\u3057\u305f\u8868\u73fe\u3067 SIRD 0 \u3092\u7528\u3044\u3066\u4f7f\u308f\u308c\u308b\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @MultiPolygon geometry\nSET @MultiPolygon = geometry::STMPolyFromText(\n'MULTIPOLYGON(((10 20, 30 40, 44 50, 10 20)), ((5 0, 20 40, 30 34, 5 0)))',\n0\n)<\/pre>\n<p>\u6ce8\u610f\u3000\uff12\u3064\u306e Polygon \u3092\u542b\u3080 MultiPolygon \u3068\uff12\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080\u5358\u4e00\u306e Polygon \u3068\u3092\u6df7\u540c\u3057\u3066\u306f\u3044\u3051\u306a\u3044\uff0e\u4e00\u3064\u306e MultiPolygon, \u4f8b\u3048\u3070 MULTIPOLYGON(((10 20, 30 40, 44 50, 10 20)), ((35 36, 37 37, 38 34, 35 36))) \u306f\u7a7a\u9593\u306e\uff12\u3064\u306e\u7570\u306a\u308b\u9762\u3092\u5b9a\u7fa9\u3059\u308b\uff0e\u4e00\u65b9\u3067 \uff12\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080\u5358\u4e00\u306e Polygon, \u4f8b\u3048\u3070 POLYGON((10 20, 30 40, 44 50, 10 20), (35 36, 37 37, 38 34, 35 36)) \u306f\uff0c\u4e8c\u756a\u76ee\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u9762\u306b\u542b\u307e\u308c\u308b\u70b9\u304c\u9664\u5916\u3055\u308c\u305f\u7a7a\u9593\u306e\u5358\u4e00\u306e\u9762\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\uff0e<\/p>\n<h4>WKT \u304b\u3089 Gemetry Collection \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000Geometry Collection \u306f\u591a\u8981\u7d20\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\uff0c\u540c\u8cea\u306e\u591a\u8981\u7d20\u306e\u578b\u306e MultiPoint \u3084 MultiLineString, MultiPolygon \u3068\u306f\u7570\u306a\u308a\uff0c\u8907\u6570\u306e\u7570\u306a\u308b\u578b\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u4e00\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306b\u5b58\u5728\u3059\u308b\uff0e<\/p>\n<p>\u3000Geometry Collection \u306e WKT \u3092\u5f62\u6210\u3059\u308b\u306b\u306fGEOMETRYCOLLECTION \u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3044\uff0c\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u306b\u542b\u307e\u308c\u308b\u305d\u308c\u305e\u308c\u500b\u5225\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30b3\u30f3\u30de\u3067\u533a\u5207\u3063\u305f WKT \u8868\u73fe\u304c\u7d9a\u304f\uff0e\u3053\u306e\u8868\u73fe\u304b\u3089 Geometry Collection \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u95a2\u9023\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306f STGeomCollFromText() \u3067\u3042\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u65b9\u3092\u793a\u3059\u305f\u3081\u306b\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u65b0\u3057\u3044 Geometry Collection \u3092\u751f\u6210\u3057\uff0c\u4e00\u3064\u306e Polygon \u3068\u4e00\u3064\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u542b\u3080 SRID 0 \u3068 geometry \u578b\u3092\u4f7f\u3046\uff0e<\/p>\n<pre>DECALRE @GeometryCollection geometry\nSET @GeometryCollection = geometry::STGeomCollFromText(\n'GEOMETRYCOLLECTION(\nPOLYGON((5 5, 10 5, 10 10, 5 5)),\nPOINT(10 10))',\n0\n)<\/pre>\n<p>\u4ed8\u8a18\u3000\u591a\u8981\u7d20\u578b\u306e MultiPoint, MultiLineString, MultiPolygon \u306f\u307f\u306a\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u3067\u3042\u308a\uff0c\u6c4e\u7528\u306e Geometry Collection \u30af\u30e9\u30b9\u306b\u7531\u6765\u3059\u308b\uff0e<\/p>\n<h4>WKT \u304b\u3089\u4efb\u610f\u306e\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000\u3053\u308c\u307e\u3067\u8ad6\u3058\u3066\u304d\u305f\u5404\u3005\u306e\u30e1\u30bd\u30c3\u30c9\u306f\uff0cWKT \u304b\u3089\u3042\u308b\u7279\u5b9a\u306e\u578b\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3060\u3051\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u4f8b\u3048\u3070 STPointFromText() \u306f Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\uff0cSTPolyFromText() \u306f Polygon \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\uff0e\u3053\u308c\u3089\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u7279\u7570\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u306b\u52a0\u3048\u3066\uff0cSQL Server 2008 \u306f\uff12\u3064\u306e\u4e00\u822c\u5316\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\uff0c\u305d\u308c\u306f\u4efb\u610f\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6574\u7136\u3068\u3057\u305f WKT \u304b\u3089\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f STGeomFromText() \u304a\u3088\u3073 Parse() \u3067\u3042\u308b\uff0e\u4e21\u30e1\u30bd\u30c3\u30c9\u306fgeometry \u578b\u306b\u3082 geography \u578b\u306b\u3082\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u3000STGeomFromText() \u306f OGC \u306e\u6a19\u6e96\u898f\u683c\u306b\u6e96\u62e0\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308a\uff0cWKT \u304b\u3089\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3082\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u305d\u308c\u3067\uff0c\u6b21\u306e\u4f8b\u306e\u3088\u3046\u306b\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u7279\u7570\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b STPointFromText() \u304a\u3088\u3073 STLineFromText() \u306e\u4ee3\u308f\u308a\u306b\uff0c<\/p>\n<pre>DECLARE @myTable TABLE (GeographyColumn geography)\nINSERT INTO @myTable (Geography) VALUES\n(geography::STPointFromText('POINT(-122.34 47.65)', 4326))\nINSERT INTO @myTable (Geography) VALUES\n(geography::STLineFromText('LINESTRING(32.51 -23.34, 33.98 -12.10)', 4326))<\/pre>\n<p>\u4ee3\u308f\u308a\u306b STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4e21\u65b9\u306e\u30b1\u30fc\u30b9\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u6b21\u306e\u3088\u3046\u306b\uff0e<\/p>\n<pre>DECLARE @myTable TABLE (Geographycolumn geography)\nINSERT INTO @myTable (GeographyColumn) VALUES\n(geography::STGeomFromText('POINT(-122.34 47.65,)', 4326))\nINSERT INTO @myTable (Geographycolumn) VALUES\n(geography::STGeomFromText('POINT(LINESTRING(32.51 -23.34, 33.98 -12.10))', 4326))<\/pre>\n<p>\u3000\u540c\u3058 STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u6709\u52b9\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3082 WKT \u304b\u3089\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\uff0c\u306a\u305c\u66f4\u306b\u7279\u7570\u7684\u306a STPointFromText() \u3084 STLineFromText() \u3092\u4f7f\u3046\u4ee3\u308f\u308a\u306b\uff0c\u5358\u7d14\u306b STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u3059\u3079\u3066\u306e\u5834\u9762\u3067\u4f7f\u308f\u306a\u3044\u306e\u304b\u3068\u4e0d\u601d\u8b70\u306b\u601d\u3046\u304b\u3082\u3057\u308c\u306a\u3044\uff0e<\/p>\n<p>\u3000\u3053\u306e\u8cea\u554f\u306b\u5bfe\u3059\u308b\u7b54\u3048\u306f\u3053\u3046\u3067\u3042\u308b\uff0e\u3064\u307e\u308a\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u7279\u7570\u7684\u30e1\u30bd\u30c3\u30c9\u306f\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u751f\u6210\u3055\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u578b\u306e\u305f\u3081\u306e\u6709\u52b9\u306a\u30c7\u30fc\u30bf\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b WKT \u3092\u30d1\u30fc\u30b9\u3059\u308b\u4e00\u65b9\u3067\uff0cSTGeomFromText() \u306f\u63d0\u4f9b\u3055\u308c\u308b\u5165\u529b\u3092\u305d\u308c\u307b\u3069\u53b3\u5bc6\u306b\u691c\u8a3c\u3067\u304d\u306a\u3044\u306e\u3067\u3042\u308b\uff0e\u305d\u308c\u3086\u3048\u306bSTGeomFromText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u51fa\u6765\u640d\u306a\u3044\u3084\u4e0d\u6b63\u78ba\u306a\u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u3066\u3057\u307e\u3046\u5371\u967a\u6027\u304c\u3042\u308b\uff0e\u3042\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u4f5c\u308d\u3046\u3068\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u3066\u3044\u308b\u306a\u3089\uff0c\u578b\u7279\u7570\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30c7\u30b6\u30a4\u30f3\u3059\u308b\u307b\u3046\u304c\u826f\u3044\uff0e\u3057\u304b\u3057\uff0c\u72b6\u6cc1\u306b\u3088\u3063\u3066\u306f STGeomFromText() \u306e\u307b\u3046\u304c\u6709\u5229\u306a\u5834\u5408\u3082\u3042\u308b\uff0e\u4f8b\u3048\u3070\u540c\u3058\u95a2\u6570\u3092\u518d\u5229\u7528\u3057\u3066\u591a\u304f\u306e\u7570\u306a\u308b\u578b\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306a\u5834\u5408\u3067\u3042\u308b\u3068\u304b\uff0c\u3042\u308b\u3044\u306f\u3069\u3093\u306a\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u751f\u6210\u3055\u308c\u308b\u306e\u306b\u6709\u5229\u306a\u306e\u304b\u5206\u304b\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u3067\u3042\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u6c4e\u7528\u30e1\u30bd\u30c3\u30c9\u306f STGeomFromText() \u3068\u547c\u3070\u308c\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u305d\u308c\u306fgeometry \u578b\u306b\u3082 geography \u578b\u306b\u3082\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<p>\u3000OGC \u6e96\u62e0\u306e STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u306b\u52a0\u3048\u3066\uff0cgeometry \u578b\u304a\u3088\u3073 geography \u578b\u3082\u307e\u305f Parse() \u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3059\u308b\uff0eParse() \u30e1\u30bd\u30c3\u30c9\u306f\u6b63\u78ba\u306b STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u3068\u540c\u3058\u65b9\u6cd5\u3067\u64cd\u4f5c\u3059\u308b\uff0egeometry \u578b\u306b\u95a2\u3057\u3066\u306f\uff0cParse() \u306f SRID \u3092 0 \u3068\u6c7a\u3081\u3064\u3051\u308b\uff0egeography \u578b\u306b\u95a2\u3057\u3066\u306f\uff0cParse() \u306f SRID 4326 \u3092\u4f7f\u3046\uff0e\u3053\u308c\u306f GPS \u885b\u661f\u6e2c\u4f4d\u88c5\u7f6e\u304a\u3088\u3073\u591a\u304f\u306e\u4ed6\u306e\u4e00\u822c\u7684\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4f7f\u308f\u308c\u308b\u7a7a\u9593\u53c2\u7167\u7cfb\u306e\u305f\u3081\u306e EPSG \u30b3\u30fc\u30c9\u3067\u3042\u308b\uff0e\u4f7f\u7528\u3059\u308b\u305d\u306e\u30c7\u30fc\u30bf\u578b\u306e\u305f\u3081\u306e\u7a7a\u9593\u53c2\u7167\u7cfb\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u306a\u3089\uff0cSRID \u3092\u7701\u7565\u3057\u3066\u4ee3\u308f\u308a\u306b Parse() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u307b\u3046\u304c\u4fbf\u5229\u3060\u3068\u5206\u304b\u308b\u3060\u308d\u3046\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @LineString geography\nSET @LineString = geography::Parse('LINESTRING(120 50, 128 52)')<\/pre>\n<p>\u3000\u3053\u306e\u30b3\u30fc\u30c9\u306f\u6771\u7d4c 120\u00b0\u5317\u7def50\u00b0\u3068\u6771\u7d4c128\u00b0\u5317\u7def52\u00b0\u306e\u5730\u70b9\u9593\u306e LineString \u3092\u5b9a\u7fa9\u3057\u3066\u304a\u308a\uff0c\u7a7a\u9593\u53c2\u7167\u7cfb EPSG 4326 \u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\uff0e<\/p>\n<h4>\u65e2\u5b58\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092 WKT \u3068\u3057\u3066\u8868\u73fe\u3059\u308b<\/h4>\n<p>\u3000WKT \u306f\u7a7a\u9593\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8868\u73fe\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e\u305d\u308c\u306f\u30c6\u30ad\u30b9\u30c8\u306e\u6587\u5b57\u5217\u3067\u5148\u8ff0\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u3044\u304f\u3064\u304b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3067\u63d0\u4f9b\u3055\u308c\uff0cSQL Server \u5185\u306b\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3042\u308b\uff0e\u3057\u304b\u3057\uff0cgeometry \u578b\u3067\u3082 geography \u578b\u3067\u3082\u5217\u3084\u5909\u6570\u306b\u5b9f\u969b\u306b\u84c4\u7a4d\u3055\u308c\u308b\u5024\u3068\u306f\u7570\u306a\u308b\uff0e<\/p>\n<p>\u3000WKT \u306b\u57fa\u3065\u304f\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u304d\u306f\uff0c\u4f8b\u3048\u3070 STGeomFromText() \u30e1\u30bd\u30c3\u30c9\u306e\u5834\u5408\uff0cSQL Server 2008 \u306f\u305d\u306e\u540c\u3058\u60c5\u5831\u3092\u8868\u73fe\u3059\u308b\u30d0\u30a4\u30ca\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u63d0\u4f9b\u3055\u308c\u305f\u305d\u306e WKT \u8868\u73fe\u3092\u30d1\u30fc\u30b9\u3059\u308b\uff0e\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u8fd4\u308a\uff0cgeometry \u578b\u306a\u3044\u3057 geography \u578b\u306e\u30a2\u30a4\u30c6\u30e0\u3068\u3057\u3066\u84c4\u7a4d\u3055\u308c\u308b\u306e\u306f\u30d0\u30a4\u30ca\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u4f8b\u3048\u3070\uff0c\u6b21\u306e\u30af\u30a8\u30ea\u3092\u8d70\u3089\u305b\u3066\u307f\u308b\u3068\uff0c<\/p>\n<pre>DECLARE @Point geography\nSET @Point = geography::STGeomFromText('POINT(-122.34 47.65)', 4326)\nSELECT @Point<\/pre>\n<p>\u305d\u306e\u7d50\u679c\u306f &#8216;Point(-122.34 47.65) \u3068\u8a00\u3046\u6587\u5b57\u5217\u3067\u306f\u306a\u304f\uff0c\u6b21\u306e\u3088\u3046\u306a\u30d0\u30a4\u30ca\u30ea\u5024\u304c\u4ee3\u308f\u308a\u306b\u8fd4\u3063\u3066\u304f\u308b\uff0e<\/p>\n<pre>0xE6100000010C3333333333D34740F6285C2955EC0<\/pre>\n<p>\u3000WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u304a\u3051\u308b\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u65e2\u5b58\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306b\uff0cSQL Server 2008 \u306f\uff13\u3064\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\uff0eSTAsText(), AsTextZM(), ToString() \u3067\u3042\u308b\uff0eTable 4-2 \u306b\u5404\uff13\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u6982\u8981\u3092\u793a\u3057\u3066\u3042\u308a\uff0c\u305d\u308c\u305e\u308c\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u63a2\u7d22\u3059\u308b\u3053\u3068\u306b\u3057\u3088\u3046\uff0e<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\"><caption>Table 4-2. \u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092 WKT \u8868\u73fe\u3067\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/caption>\n<tbody>\n<tr>\n<th style=\"width: 20%;\">\u65b9\u6cd5<\/th>\n<th style=\"width: 80%;\">\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td style=\"width: 20%;\">STAsText()<\/td>\n<td style=\"width: 80%;\">\u4efb\u610f\u306e\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092 WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8868\u73fe\u3059\u308b OGC \u6a19\u6e96\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b\uff0e\u7d50\u679c\u306e\u51fa\u529b\u3068\u3057\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u90e8\u306e\u5404\u30dd\u30a4\u30f3\u30c8\u306f\uff12\u3064\u306e\u5ea7\u6a19\uff08x\/y \u307e\u305f\u306f\u7def\u5ea6\u30fb\u7d4c\u5ea6\uff09\u306e\u307f\u3067\u8868\u73fe\u3055\u308c\u308b\uff0e<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 20%;\">AsTextZM()<\/td>\n<td style=\"width: 80%;\">\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5404\u30dd\u30a4\u30f3\u30c8\u306f\uff14\u3064\u307e\u3067\u306e\u5ea7\u6a19\u5024\uff08x\/y \u307e\u305f\u306f\u7def\u5ea6\u30fb\u7d4c\u5ea6\uff0c\uff08\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\uff09z \u304a\u3088\u3073 m\uff09\u3068\u5171\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKT \u8868\u73fe\u3092\u53d6\u5f97\u3059\u308b\uff0e<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 20%;\">ToString()<\/td>\n<td style=\"width: 80%;\">\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f .NET \u5185\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5168\u3066\u306e\u578b\u306b\u5b9f\u88c5\u3055\u308c\u7d99\u627f\u3055\u308c\u308b\uff0egeometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f7f\u3046\u6642\uff0c\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\uff0cAsTextZM() \u306e\u3088\u3046\u306b\uff0c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070 z \u5ea7\u6a19\u5024\u304a\u3088\u3073 m \u5ea7\u6a19\u5024\u3092\u542b\u3093\u3060 WKT \u8868\u73fe\u3092\u8fd4\u3059\uff0e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4ed8\u8a18\u3000STAsText(), ToString() \u304a\u3088\u3073 AsTextZM() \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u8fd4\u308b WKT \u8868\u73fe\u306b\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5404\u70b9\u306e\u5ea7\u6a19\u5024\u306f\u542b\u307e\u308c\u308b\u304c\uff0c\u305d\u308c\u3089\u306e\u5f97\u3089\u308c\u308b\u7a7a\u9593\u53c2\u7167\u7cfb\u306e SRID \u306f\u542b\u307e\u308c\u3066\u3044\u306a\u3044\uff0e\u3053\u306e\u60c5\u5831\u306f\u4ee3\u308f\u308a\u306b STSrid() \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u53d6\u5f97\u3067\u304d\u308b\uff0e\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u7b2c\uff11\uff11\u7ae0\u3067\u8a73\u3057\u304f\u8ad6\u3058\u308b\uff0e<\/p>\n<h5>STAsText() \u30e1\u30bd\u30c3\u30c9<\/h5>\n<p>\u3000STAsText() \u306f OGC \u6e96\u62e0\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308a\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306eWKT \u6587\u5b57\u5217\u8868\u73fe\u3092\u8fd4\u3059\uff0e\u6ce8\u610f\u3057\u3066\u304a\u304f\u304c\uff0cWKT \u304b\u3089\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u3046\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3068\u9055\u3063\u3066\uff0cSTAsText() \u306f\u65e2\u5b58\u306e\u7279\u5b9a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\uff0eSTAsText() \u3092\u4f7f\u3063\u3066\u30c6\u30fc\u30d6\u30eb\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u5217\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u884c\u306e WKT \u8868\u73fe\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\uff0c\u305d\u306e\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>SELECT\nGeometryColumn.STAsText()<\/pre>\n<p>\u3000STAsText() \u306f\u305f\u3060\uff0c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u70b9\u3092\u5b9a\u7fa9\u3059\u308b\u305d\u306e x \u304a\u3088\u3073 y \uff08\u3042\u308b\u3044\u306f\u7d4c\u5ea6\u304a\u3088\u3073\u7def\u5ea6\uff09\u5ea7\u6a19\u3092\u8fd4\u3059\u306e\u307f\u3067\u3042\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f z \u307e\u305f\u306f m \u5ea7\u6a19\u5024\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u70b9\u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u305d\u308c\u3089\u306f\u51fa\u529b\u3055\u308c\u306a\u3044\uff0e\u6b21\u306e\u4f8b\u3092\u8003\u3048\u3066\u307f\u3088\u3046\uff0e<\/p>\n<pre>DECLARE @Point geometry\nSET @Point = geometry::STPointFromText('POINT(30 20 10 5)', 0)\nSELECT @Point.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>POINT (30 20)<\/pre>\n<h5>ToString() \u30e1\u30bd\u30c3\u30c9<\/h5>\n<p>\u3000WKT \u8868\u73fe\u306b z \u304a\u3088\u3073 m \u5ea7\u6a19\u5024\u304c\u542b\u307e\u308c\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5fc5\u8981\u3068\u3059\u308b\u306a\u3089\uff0cToString() \u62e1\u5f35\u30e1\u30bd\u30c3\u30c9\u304c\u4f7f\u3048\u308b\uff0e\u305d\u306e\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @Point geometry\nSET @Point = geometry::STPointFromText('POINT(30 20 10 5)', 0)\nSELECT @Point.ToSDtring()<\/pre>\n<p>\u3000\u3053\u308c\u306f\u6b21\u306e\u7d50\u679c\u3092\u3082\u305f\u3089\u3059\uff0e<\/p>\n<pre>POINT (30 20 10 5)<\/pre>\n<p>\u4ed8\u8a18\u3000\u3053\u306e ToString() \u30e1\u30bd\u30c3\u30c9\u306f .NET \u57fa\u672c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30af\u30e9\u30b9\u306b\u3088\u308a\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\uff0c\u305d\u3053\u304b\u3089\u5168\u3066\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7279\u7570\u7684\u306a\u30af\u30e9\u30b9\u304c\u7531\u6765\u3059\u308b\uff0egeometry \u578b\u3068 geography \u578b\u3092\u7d99\u627f\u30fb\u5b9f\u884c\u3059\u308b\u3068\u304d\uff0c\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5bfe\u5fdc\u3059\u308b WKT \u8868\u73fe\u3092\u8fd4\u3059\uff0e<\/p>\n<h5>AsTextZM() \u30e1\u30bd\u30c3\u30c9<\/h5>\n<p>\u3000AsTextZM() \u30e1\u30bd\u30c3\u30c9\u306f ToString() \u30e1\u30bd\u30c3\u30c9\u306e\u4ee3\u66ff\u3067\u3042\u308a\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKT \u8868\u73fe\u3092\u8fd4\u3057\uff0c\u62e1\u5f35\u5ea7\u6a19\u5024\u306e z \u304a\u3088\u3073 m \u3092\u542b\u3093\u3067\u3044\u308b\uff0e\u6b21\u306e\u3088\u3046\u306b\u4f7f\u3046\uff0e<\/p>\n<pre>DECLARE @Point geometry\nSET @geometry = geometry::STPointFromText('30 20 10 5', 0)\nSELECT @Point.AsTextZM()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<pre>POINT (30 20 10 5)<\/pre>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000\u3069\u3093\u306a\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304b\u3063\u3066\u751f\u6210\u3057\u305f\u30c7\u30fc\u30bf\u3067\u3082\uff0cgeometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u5217\u3067\u3082\u5909\u6570\u3067\u3082 STAsText(), ToString() \u304a\u3088\u3073 AsTextZM() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 WKT \u8868\u73fe\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h3>Well-Known Binary \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b<\/h3>\n<p>\u3000WKB \u8868\u73fe\u3068\u306f\uff0cWKT \u8868\u73fe\u3068\u4f3c\u3066\u3044\u308b\u304c\uff0cOGC \u306b\u3088\u308a\u5b9a\u7fa9\u3055\u308c\u305f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u8868\u73fe\u3059\u308b\u6a19\u6e96\u7684\u624b\u6bb5\u3067\u3042\u308b\uff0e\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e WKT \u8868\u73fe\u3068\u306f\u5bfe\u7167\u7684\u306b\uff0cWKB \u8868\u73fe\u306f geometry \u578b\u304a\u3088\u3073 geography \u578b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5185\u306e\u9023\u7d9a\u3057\u305f\u30d0\u30a4\u30c8\u30b9\u30c8\u30ea\u30fc\u30e0\u3068\u3057\u3066\u8868\u73fe\u3059\u308b\uff0e\u3059\u3079\u3066\u306e WKB \u8868\u73fe\u306f\uff0c\u8868\u73fe\u3057\u3066\u3044\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u5b9a\u7fa9\u3059\u308b\u30d8\u30c3\u30c0\u30fc\u30bb\u30af\u30b7\u30e7\u30f3\u304b\u3089\u59cb\u307e\u308a\uff0c\u305d\u308c\u306f\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3067\u3042\u308b\uff08\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u30b5\u30a4\u30c9\u30d0\u30fc&#8221;\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u5bfe\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3&#8221;\u53c2\u7167\u306e\u3053\u3068\uff09\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306b\u4f9d\u5b58\u3057\u3066\uff0c\u305d\u306e\u30d8\u30c3\u30c0\u30fc\u306f\u4ed8\u52a0\u60c5\u5831\u3092\u8a18\u8ff0\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\uff0e\u4f8b\u3048\u3070\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6570\u3067\u3042\u3063\u305f\u308a\uff0cPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306b\u542b\u307e\u308c\u308b\u30ea\u30f3\u30b0\u306e\u6570\u3067\u3042\u3063\u305f\u308a\u306a\u3069\uff0e\u30d8\u30c3\u30c0\u30fc\u306e\u6b21\u306e\u60c5\u5831\u306f\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u5404\u70b9\u306e\u5ea7\u6a19\u3092\u8868\u3059 8 \u30d0\u30a4\u30c8\u5024\u306e\u30b9\u30c8\u30ea\u30fc\u30e0\u306e WKB \u8868\u73fe\u306e\u30ea\u30b9\u30c8\u3067\u3042\u308b\uff0e\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3042\u308b Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKB \u8868\u73fe\u3092\u793a\u3059\uff0e<\/p>\n<pre>0x0000000001401C00000000000040300E000A000000<\/pre>\n<p>\u3000\u898b\u305f\u3088\u3046\u306b\uff0cWKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306f\u305d\u306e\u59c9\u59b9\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308b WKT \u3068\u6bd4\u8f03\u3057\u3066\u5168\u304f\u7406\u89e3\u3057\u3084\u3059\u304f\u306a\u3044\uff0e\u3057\u304b\u3057\uff0cWKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u5229\u70b9\u304c\u3042\u308b\uff0e<\/p>\n<ul>\n<li>WKB \u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u306e\u306f\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u306e GML \u3084 WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304b\u3089\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u751f\u6210\u3059\u308b\u306e\u3068\u6bd4\u8f03\u3057\u3066\uff0c\u901f\u3044\uff0eWKB \u5185\u306e\u5404 x \u304a\u3088\u3073 y \uff08\u307e\u305f\u306f\u7d4c\u5ea6\u304a\u3088\u3073\u7def\u5ea6\uff09\u5ea7\u6a19\u5024\u306f 8 \u30d0\u30a4\u30c8\u306e\u30d0\u30a4\u30ca\u30ea\u30d0\u30a6\u30f3\u30c0\u30ea\u30fc\u3067\u84c4\u7a4d\u3055\u308c\u3066\u304a\u308a\uff0c\u305d\u308c\u306f SQL Server \u81ea\u8eab\u306e\u5185\u90e8\u30b9\u30c8\u30ec\u30fc\u30b8\u8868\u73fe\u3068\u540c\u3058\u3067\u3042\u308b\uff0eWKB \u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u3086\u3048\u306b WKB \u304b\u3089\u95a2\u9023\u3059\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u51e6\u7406\u3057\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\uff0c\u4e00\u65b9\u3067 GML \u3084 WKT \u3067\u306f\u307e\u305a\u30c6\u30ad\u30b9\u30c8\u8868\u73fe\u5168\u4f53\u3092\u30d1\u30fc\u30b5\u30fc\u304c\u8aad\u307e\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e<\/li>\n<li>\u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308b\u304c\u3086\u3048\u306b\uff0cWKB \u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u7cbe\u5ea6\u3067\u4e8c\u9805\u6f14\u7b97\u304b\u3089\u8a08\u7b97\u3057\u305f\u5ea7\u6a19\u5024\u3092\u4fdd\u6301\u3057\u3066\u304a\u308a\uff0c\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u7531\u6765\u3059\u308b\u4e38\u3081\u30a8\u30e9\u30fc\u304c\u306a\u3044\uff0e<\/li>\n<\/ul>\n<p>\u3000\u3057\u304b\u3057\uff0cWKB \u306b\u3082\u307e\u305f\u6b21\u306e\u3088\u3046\u306a\u9855\u8457\u306a\u6b20\u70b9\u304c\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u30d0\u30a4\u30ca\u30ea\u5024\u306f\u4eba\u9593\u306e\u8aad\u8005\u306b\u306f\u7c21\u5358\u306b\u7406\u89e3\u3067\u304d\u306a\u3044\uff0e\u3086\u3048\u306b\uff0cWKT \u3084 GML \u76f8\u5f53\u306e\u8868\u73fe\u3067\u306f\u30c6\u30b9\u30c8\u3067\u7c21\u5358\u306b\u898b\u3064\u304b\u3063\u305f\u30a8\u30e9\u30fc\u306e\u691c\u51fa\u304c\uff0cWKB \u8868\u73fe\u3067\u306f\u96e3\u3057\u304f\u306a\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000WKB \u304c\u6700\u3082\u4f3c\u3064\u304b\u308f\u3057\u3044\u306e\u306f\uff0c\u7570\u306a\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30b7\u30b9\u30c6\u30e0\u9593\u3067\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u3088\u3046\u306a\u72b6\u6cc1\u3067\u3042\u308b\uff0e\u3068\u3044\u3046\u306e\u306f\uff0c\u3053\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u306f\u901f\u3055\u3068\u7cbe\u5ea6\u304c\u826f\u304f\uff0c\u4eba\u306e\u53ef\u8aad\u6027\u306e\u6b20\u5982\u306f\u5927\u3057\u305f\u3053\u3068\u306f\u306a\u3044\u304b\u3089\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3060\u3051\u3067\u306f\u306a\u304f\uff0cSQL Server 2008 \u306f WKB \u8868\u73fe\u304b\u3089\u5404\u7a2e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u7279\u7570\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\uff0c\u4ed6\u306b\u3082\u6c4e\u7528\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066 STGeomFromWKB() \u304c\u3042\u308a\uff0cWKB \u304b\u3089\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3082\u751f\u6210\u3067\u304d\u308b\uff0e\u5404\u30e1\u30bd\u30c3\u30c9\u3092\u9806\u756a\u306b\u898b\u3066\u3044\u3053\u3046\uff0e<\/p>\n<h4>\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u5bfe\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3<\/h4>\n<p>\u30001 \u30d0\u30a4\u30c8\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u304c\u84c4\u7a4d\u3067\u304d\u308b\u306e\u306f 256 \u306e\u7570\u306a\u308b\u5024\u306e\u3046\u3061\u306e\u4e00\u3064\u3067\u3042\u308b\uff0e16\u9032\u6cd5\u3067\u306e\u8a18\u6cd5\u3067\u306f\uff0c\u3053\u308c\u3089\u306e\u5024\u306f 0x00 (0) \u304b\u3089 0xFF (255) \u306e\u7bc4\u56f2\u5185\u306b\u3042\u308b\uff0e\u6b63\u78ba\u306a\u4f4d\u7f6e\u60c5\u5831\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306b\uff0cWKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u304a\u3051\u308b\u5404\u5ea7\u6a19\u5024\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u3068\u3057\u3066\u8868\u73fe\u3057\uff0c8 \u30d0\u30a4\u30c8\u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066\u84c4\u7a4d\u3059\u308b\uff0e\u3053\u306e\u3088\u3046\u306b\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u3067\u84c4\u7a4d\u3059\u308b\u3044\u304b\u306a\u308b\u30b7\u30b9\u30c6\u30e0\u306b\u304a\u3044\u3066\u3082\uff0c\u3053\u3053\u306e\u72ec\u7acb\u3057\u305f\u30d0\u30a4\u30ca\u30ea\u5024\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u7570\u306a\u308b\u624b\u6cd5\u304c\u5b58\u5728\u3059\u308b\uff0e<\/p>\n<ul>\n<li>\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u306f\u6700\u4e0b\u4f4d\u30d0\u30a4\u30c8\uff0c\u3042\u308b\u3044\u306f\u6700\u5c0f\u30d0\u30a4\u30c8\u3092\u6700\u5c0f\u6709\u52b9\u30a2\u30c9\u30ec\u30b9\u306b\u84c4\u7a4d\u3059\u308b\uff0e\u3064\u307e\u308a\uff0c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c9\u304c\u6700\u521d\u306b\u6765\u308b\uff0e\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306f\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u3057\u3066\u77e5\u3089\u308c\u308b(NDR)\uff0e<\/li>\n<li>\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u306f\u6700\u4e0a\u4f4d\u30d0\u30a4\u30c8\u3092\u6700\u5c0f\u6709\u52b9\u30a2\u30c9\u30ec\u30b9\u306b\u84c4\u7a4d\u3059\u308b\uff0e\u3064\u307e\u308a\uff0c\u6700\u521d\u306b\u30d3\u30c3\u30b0\u30a8\u30f3\u30c9\u306b\u84c4\u7a4d\u3059\u308b\uff0e\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306f\u5916\u90e8\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u3057\u3066\u77e5\u3089\u308c\u308b (XDR)\uff0e<\/li>\n<\/ul>\n<p>\u3000WKB \u8868\u73fe\u306f\uff0c\u3042\u3089\u3086\u308b\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u306e\u3088\u3046\u306b\uff0c\u3053\u308c\u3089\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u3044\u305a\u308c\u304b\u3067\u84c4\u7a4d\u3055\u308c\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u6b21\u306e\uff12\u3064\u306e\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30fc\u30e0\u306f\u3068\u3082\u306b WKB \u8868\u73fe\u3068\u3057\u3066\u6709\u52b9\u3067\u3042\u308a\uff0c\u540c\u3058\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u6b63\u78ba\u306b\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u305d\u308c\u305e\u308c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\uff0c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u3067\u3042\u308b\uff0e<\/p>\n<pre>0x00 00000001 401C000000000000 4030000000000000\n0x01 01000000 0000000000001C40 0000000000003040<\/pre>\n<p>\u3000\u5404\u30d0\u30a4\u30c8\u306f 16 \u9032\u6570\u306e\u6587\u5b57\u5217\u3092\u8868\u73fe\u3057\u3066\u304a\u308a\uff0c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306e\u5024 0x1234 \u306f\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306e\u5024 0x3412 \u3068\u7b49\u3057\u3044\uff0e0x4321 \u3067\u306f\u306a\u3044\uff0e\u3069\u3061\u3089\u306e\u30d0\u30a4\u30ca\u30ea\u9806\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u3092\u77e5\u308b\u305f\u3081\u306b\uff0cWKB \u30b9\u30c8\u30ea\u30fc\u30e0\u8868\u73fe\u5185\u306e\u30c7\u30fc\u30bf\u306e\u6700\u521d\u306e\u30d0\u30a4\u30c8\u304c\u30b7\u30f3\u30b0\u30eb\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u30de\u30fc\u30ab\u30fc\u3092\u8868\u73fe\u3057\u3066\u3044\u308b(BOM)\uff0e<\/p>\n<ul>\n<li>\u6700\u521d\u306e\u30d0\u30a4\u30c8\u304c 0 (0x00) \u306a\u3089\uff0c\u6b8b\u308a\u306e\u30d0\u30a4\u30c8\u304c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3067\u8868\u73fe\u3055\u308c\u308b\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/li>\n<li>\u6700\u521d\u306e\u30d0\u30a4\u30c8\u304c 1 (0x01) \u306a\u3089\uff0c\u6b8b\u3063\u305f\u30d0\u30a4\u30c8\u304c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3067\u8868\u73fe\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u793a\u3059\uff0e<\/li>\n<\/ul>\n<p>\u3000\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306e\u30de\u30fc\u30ab\u30fc\u81ea\u8eab\u306f\uff11\u30d0\u30a4\u30c8\u3067\u3042\u308b\u305f\u3081\uff0c\u3069\u306e\u30b7\u30b9\u30c6\u30e0\u304c\u4f7f\u308f\u308c\u308b\u304b\u306b\u306f\u5f71\u97ff\u3057\u306a\u3044\uff0e<\/p>\n<p>\u3000T-SQL \u30d0\u30a4\u30ca\u30ea\u95a2\u6570\u306f\u4e00\u822c\u306b\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3092\u4f7f\u3046\uff0e\u3057\u304b\u3057\uff0cSTAsBinary() \u30e1\u30bd\u30c3\u30c9\u306f\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u9806\u3067\u8868\u73fe\u3059\u308b\uff0e\u3086\u3048\u306b\uff0cSTGeomFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3 WKB \u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u305f\u6642\u306b\u306f\uff0c\u305d\u3057\u3066\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKB \u8868\u73fe\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b STAsBinary() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u6642\u306b\u306f\uff0c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3 WKB \u30d0\u30a4\u30ca\u30ea\u3067\u751f\u6210\u3057\u305f\u540c\u3058\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306f\u7570\u306a\u308b\u7d50\u679c\u304c\u5f97\u3089\u308c\u308b\uff0e<\/p>\n<h4>WKB \u304b\u3089 Point \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKB \u8868\u73fe\u306f 21 \u30d0\u30a4\u30c8\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u30b9\u30c8\u30ea\u30fc\u30e0\u3067\u3042\u308b\uff0e\u305d\u306e\u8981\u7d20\u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u308b\uff0e<\/p>\n<pre class=\"\">[ByteOrder][Type][X][Y]<\/pre>\n<p>\u3000\u6700\u521d\u306e\u8981\u7d20\u3067\u3042\u308b [ByteOrder] \u306f 1 \u30d0\u30a4\u30c8\u306e\u5024\u3067 WKB \u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u6b8b\u308a\u306e\u30d0\u30a4\u30c8\u304c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3 (0x00) \u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306a\u306e\u304b\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3 (0x01) \u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u306a\u306e\u304b\u3092\u793a\u3057\u3066\u3044\u308b\uff0e[Type] \u306f 4 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3067\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u793a\u3057\u3066\u3044\u308b\uff0ePoint \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u3053\u308c\u306f\u5e38\u306b 1 \u304c\u5272\u308a\u632f\u3089\u308c\u3066\u304a\u308a\uff0c\u6700\u521d\u306e\u30d0\u30a4\u30c8\u306b\u7279\u7570\u7684\u306a\u95a2\u9023\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3092\u4f7f\u3063\u3066\u8868\u73fe\u3055\u308c\u3066\u3044\u308b\uff0e\u3064\u307e\u308a\uff0c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306a\u3089 0x00000001 \u3067\u3042\u308a\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306a\u3089 0x01000000 \u3067\u3042\u308b\uff0e[X] \u304a\u3088\u3073 [Y] \u306f\u3068\u3082\u306b 8 \u30d0\u30a4\u30c8\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u5024\u3067\u3042\u308a\uff0c\u70b9\u306e x \u5ea7\u6a19\u304a\u3088\u3073 y \u5ea7\u6a19\uff0c\u307e\u305f\u306f\u70b9\u304c\u5730\u7406\u5ea7\u6a19\u7cfb\u7531\u6765\u306a\u3089\u7d4c\u5ea6\u304a\u3088\u3073\u7def\u5ea6\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u3082\u3042\u3063\u305f\u3088\u3046\u306b\uff0c\u70b9\u306e WKB \u8868\u73fe\u306f\u5730\u7406\u5ea7\u6a19\u7cfb\u306b\u304a\u3044\u3066\u306f\u7d4c\u5ea6\u3092\u5148\u306b\u8a18\u8ff0\u3057\u6b21\u306b\u7def\u5ea6\u3092\u8a18\u8ff0\u3059\u308b\uff0e\u3057\u304b\u3057 WKT \u3068\u9055\u3044\uff0c\u8ffd\u52a0\u7684\u306a z \u304a\u3088\u3073 m \u5ea7\u6a19\u5024\u3092 WKB \u306b\u304a\u3044\u3066\u5404\u70b9\u306b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff0e<\/p>\n<h5>WKB Point \u8868\u73fe\u3092\u751f\u6210\u3059\u308b<\/h5>\n<p>\u3000SQL Server \u304c WKB \u304b\u3089 Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u63d0\u4f9b\u3059\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3059\u305f\u3081\uff0c\u6211\u3005\u306f\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066 WKB Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\uff0e\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\uff0c\u307e\u305a\u5909\u6570\u3092\u5ba3\u8a00\u3057\uff0c\u305d\u306e WKB \u30b9\u30c8\u30ea\u30fc\u30e0\u3092\u542b\u3080\u5404\u8981\u7d20\u306e\u5024\u3092\u8868\u73fe\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @ByteOrder bit\nDECLARE @Type int\nDECLARE @longitude float\nDECLARE @latitude float<\/pre>\n<p>\u3000\u6211\u3005\u306e WKB \u8868\u73fe\u3092\u5f62\u4f5c\u308b\u305f\u3081\u306b\uff0c\u6211\u3005\u306fT-SQL \u306e CAST \u95a2\u6570\u3092\u4f7f\u3063\u3066\u5404\u8981\u7d20\u3092\u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u63db\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\uff0e\u3053\u306e\u95a2\u6570\u306e\u7d50\u679c\u306f\uff0c\u3059\u3079\u3066\u306e\u30cd\u30a4\u30c6\u30a3\u30d6 SQL Server \u95a2\u6570\u306e\u3088\u3046\u306b\uff0c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3092\u4f7f\u3046\uff0e\u6211\u3005\u306e WKB \u8868\u73fe\u306f CAST \u95a2\u6570\u306e\u7d50\u679c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306b\u57fa\u3065\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\uff0c\u6211\u3005\u306fBOM\u306e\u5024\u3092 0 \u3068\u8a2d\u5b9a\u3057\u3066\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30aa\u30fc\u30bf\u30fc\u9806\u306b\u306a\u308b\u3088\u3046\u306b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<pre>SET @ByteOrder = 0<\/pre>\n<p>\u3000WKB \u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u304a\u3051\u308b\u6b21\u306e\u8981\u7d20\u306f\u8868\u73fe\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3067\u3042\u308b\uff0e\u3053\u306e\u4f8b\u3067\u306f\uff0c\u6211\u3005\u306f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8a18\u8ff0\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306f WKB \u3067\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u30bf\u30a4\u30d7 1 \u3068\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n<pre>SET @Type = 1<\/pre>\n<p>\u3000\u6211\u3005\u306f\u6b21\u306e\u30b3\u30fc\u30c9\u5024\u306b\u57fa\u3065\u3044\u3066\u70b9\u3092\u751f\u6210\u3057\u3088\u3046\uff0e\u305d\u308c\u306fEPSG 4326 \u306e\u7a7a\u9593\u53c2\u7167\u7cfb\u3092\u7528\u3044\u305f\u30dd\u30fc\u30e9\u30f3\u30c9\u306e\u30ef\u30eb\u30b7\u30e3\u30ef\u306e\u8fd1\u4f3c\u5024\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>SET @longitude = 21.01\nSET @latitude = 52.23<\/pre>\n<p>\u3000\u305d\u308c\u305e\u308c\u306e\u8981\u7d20\u3092\u5b9a\u7fa9\u3057\u305f\u3068\u3053\u308d\u3067\uff0c\u6211\u3005\u306f CAST \u95a2\u6570\u3092\u4f7f\u3063\u3066\u305d\u308c\u3089\u3092\u95a2\u9023\u3059\u308b\u9577\u3055\u306e\u30d0\u30a4\u30ca\u30ea\u5024\u306b\u5909\u63db\u3057\uff0c\u305d\u308c\u3089\u3092\u5358\u4e00\u306e\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u7d50\u5408\u3057\u3088\u3046\uff0e\u305d\u308c\u3089\u3092 @WKB \u3068\u8a00\u3046\u540d\u306e\u5909\u6570 varbinary(max) \u306b\u683c\u7d0d\u3057\u3088\u3046\uff0e\u6b21\u306e\u30b3\u30fc\u30c9\u3067\u793a\u3059\uff0e<\/p>\n<pre>DECLARE @WKB varbinary(max)\nSET @WKB = \nCAST(@ByteOrder AS binary(1))\n+ CAST(@Type AS binary(4))\n+ CAST(@longitude AS binary(8))\n+ CAST(@latitude AS binary(8))<\/pre>\n<p>\u3000\u5909\u6570 @WKB \u306f\u4eca\u3084\u6211\u3005\u306e\u70b9\u3092\u793a\u3059\u6709\u52b9\u306a WKB \u8868\u73fe\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\uff0e\u305d\u308c\u304c\u3069\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u304b\u8abf\u3079\u308b\u305f\u3081\uff0c\u6b21\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\uff0e<\/p>\n<pre>SELECT @WKB<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>0x00000000014035028F5C28F5C3404A1D70A3D70A3D<\/pre>\n<p>\u3000\u6ce8\u610f\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u306e\u306f\uff0c\u6211\u3005\u306f\u307e\u3060\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u305f\u308f\u3051\u3067\u306f\u306a\u3044\uff0e\u5148\u8ff0\u3057\u305f\u306e\u306f WKB \u8868\u73fe\u306b\u904e\u304e\u306a\u3044\uff0e\u305d\u308c\u306f\u5165\u529b\u3068\u3057\u3066\u53d7\u3051\u4ed8\u3051\u3089\u308c\u308b WKB \u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u3064\u306b\u4f34\u3063\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u305f\u3060\u3051\u3067\u3042\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u5b9f\u969b\u306b\u306f\uff0c\u4eca\u898b\u305b\u305f\u3088\u3046\u306a T-SQL \u3092\u7528\u3044\u3066 WKB \u8868\u73fe\u3092\u7d44\u307f\u7acb\u3066\u308b\u3053\u3068\u306f\u307e\u308c\u3067\u3042\u308b\uff0e\u5916\u90e8\u8cc7\u6e90\u304b\u3089\u306e WKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5185\u306b\u5b58\u5728\u3059\u308b\u60c5\u5831\u306e\u307b\u3046\u304c\u3082\u3063\u3068\u91cd\u8981\u3067\u3042\u308d\u3046\uff0e\u4eca\u898b\u305b\u305f\u624b\u9806\u306fWKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u69cb\u9020\u3092\u793a\u3059\u305f\u3081\u306b\u6700\u521d\u306b\u4f7f\u3063\u305f\uff0e<\/p>\n<h5>STPointFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046<\/h5>\n<p>\u3000\u4eca\u3084\u6211\u3005\u306f Point \u306e WKB \u8868\u73fe\u3092\u6709\u3057\u3066\u304a\u308a\uff0cSTPointFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 geometry \u578b\u306a\u308a geography \u578b\u306a\u308a\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0eSRID 0 \u3092\u4f7f\u3044\uff0cgeometry \u578b\u306e Point \u3092\u751f\u6210\u3059\u308b\u305f\u3081\uff0c\u5148\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u751f\u6210\u3057\u305f\u5909\u6570\u306b\u57fa\u3065\u3044\u3066\uff0c\u6b21\u306e\u69cb\u6587\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\uff0e<\/p>\n<pre class=\"\">DECLARE @Warsaw geography\nSET @Warsaw = geography::STPointFromText(@WKB, 4326)<\/pre>\n<p>\u3000\u305d\u3046\u3060\uff01@Warsaw \u5909\u6570\u306f\u4eca\u3084\u63d0\u4f9b\u3057\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u57fa\u3065\u3044\u305f geometry \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\uff0e\u3053\u308c\u304c\u30b3\u30fc\u30c9\u5168\u4f53\u3067\u3042\u308b\uff0e<\/p>\n<pre class=\"\">\/*Declare variables to hold each element of the WKB *\/\nDECLARE @ByteOrder bit\nDECLARE @Type int\nDECLARE @longitude float\nDECLARE @latitude float\n\n\/* Set the byte order marker to indicate big-endian byte order *\/\nSET @ByteOrder = 0\n\n\/* Geometry Type 1 denotes for a point *\/\nSET @Type = 1\n\n\/* Set the values of each coordinate for the point *\/\nSET @longitude = 21.01\nSET @latitude = 52.23\n\n\/* Declare a new binary variable to hold the WKB *\/\nDECLARE @WKB varbinary(max)\n\n\/* Append each of the elements together and store them in @WKB *\/\nSET @WKB =\nCAST(@ByteOrder AS binary(1))\n+ CAST(@Type AS binary(1))\n+ CAST(@longitude AS binary(8))\n+ CAST(@latitude AS binary(8))\n\n\/* Declare a new variable to hold the resulting geometry instance *\/\nDECLARE @Warsaw geography\n\n\/* Parse the WKB representation created to the STPointFromWKB() method *\/\nSET @WKB = geography::STPointFromWKB(@WKB, 4326)<\/pre>\n<p>\u3000\u70b9\u304c\u6b63\u78ba\u306b\u751f\u6210\u3055\u308c\u305f\u304b\u8abf\u3079\u308b\u305f\u3081\uff0cSTAsText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u65b0\u3057\u3044 Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKT \u8868\u73fe\u3092\u53d6\u5f97\u3057\u3066\u307f\u308b\uff0e<\/p>\n<pre class=\"\">SELECT @Warsaw.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre class=\"\">POINT (21.01 52.23)<\/pre>\n<p>\u4ed8\u8a18\u3000WKT \u3068\u306f\u9055\u3044\uff0c\u5ea7\u6a19\u5024\u306e\u70b9 z, m \u3092\u62e1\u5f35\u3057\u3066 WKB \u8868\u73fe\u3092\u4f7f\u3046\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff0e\u5404 WKB \u306e\u70b9\u306f\u6b63\u78ba\u306b\u5ea7\u6a19\u5024\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306f x \u304a\u3088\u3073 y \u5ea7\u6a19\u307e\u305f\u306f\u7d4c\u5ea6\u304a\u3088\u3073\u7def\u5ea6\u3067\u3042\u308b\uff0e<\/p>\n<h4>WKB \u304b\u3089 LineString \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000n \u500b\u306e\u70b9\u3092\u542b\u3080 LineString \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKB \u8868\u73fe\u306f\u6b21\u306e\u30d0\u30a4\u30c8\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>[ByteOrder][Type][NumPoints][X1][Y1][X2][Y2]...[Xn][Yn]<\/pre>\n<p>\u3000Point \u306e WKB \u8868\u73fe\u3067\u898b\u305f\u3088\u3046\u306b\uff0c\u6700\u521d\u306e\u30d0\u30a4\u30c8 [ByteOrder] \u306f\u30c7\u30fc\u30bf\u304c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u304b\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u304b\u3092\u5ba3\u8a00\u3059\u308b\uff0e\u6b21\u306e 4 \u30d0\u30a4\u30c8 [Type] \u306f\u751f\u6210\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u793a\u3057\uff0cLineString \u306f\u5e38\u306b 2 \u3067\u8868\u73fe\u3059\u308b\uff0e<\/p>\n<p>\u3000\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u5ba3\u8a00\u306b\u7d9a\u304f\u4ed8\u52a0\u7684\u306a 4 \u30d0\u30a4\u30c8 [NumPoints] \u306fLineString \u5185\u306e\u70b9\u306e\u6570\u3092\u8a18\u8ff0\u3059\u308b\uff0eWKB \u69cb\u9020\u306b\u306f WKT \u3067\u4f7f\u3063\u305f\u3088\u3046\u306a\u30b3\u30f3\u30de\u306e\u3088\u3046\u306a\u30c7\u30ea\u30df\u30bf\u3084\u30ab\u30c3\u30b3\u304c\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\uff0c\u305d\u306e\u8868\u73fe\u304c\u5fc5\u8981\u306b\u306a\u308b\uff0eSQL Server \u304c\u4f55\u500b\u306e\u5ea7\u6a19\u304c\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u5b58\u5728\u3059\u308b\u306e\u304b\u77e5\u308b\u305f\u3081\uff0c\u307e\u305f\u3044\u3064\u8868\u73fe\u306e\u6700\u5f8c\u306b\u5230\u9054\u3057\u305f\u306e\u304b\u77e5\u308b\u305f\u3081\u3067\u3042\u308b\uff0eLineString \u306e\u70b9\u306e\u500b\u6570\u306e\u76f4\u5f8c\u306b\u306f 8 \u30d0\u30a4\u30c8\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u5024\u306e\u30da\u30a2\u304c\u7d9a\u304d\uff0c\u305d\u308c\u306f\u305d\u308c\u3089\u5404\u70b9\u306e\u5ea7\u6a19\u5024\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<p>\u3000\u3053\u308c\u3089\u306e\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\uff0c\u6211\u3005\u306f\u6b21\u306e\u30b3\u30fc\u30c9\u3067 LineString \u306e WKB \u8868\u73fe\u3092\u7d44\u307f\u7acb\u3066\u3088\u3046\uff0e<\/p>\n<pre>\/* Declare the parameters needed to build a WKB representation of a LineString *\/\nDECLARE @ByteOrder bit\nDECLARE @Type int\nDECLARE @NumPoints int\nDECLARE @x1 float\nDECLARE @y1 float\nDECLARE @x2 float\nDECLARE @y2 float\n\n\/* We are using CAST to convert the parameters to big-endian byte order *\/\nSET @ByteOrder = 0\n\n\/* LineStrings are denoted as geometry type 2 *\/\nSET @Type = 2\n\n\/* This LineString will contain two points *\/\nSET @NumPoints = 2\n\n\/* St the x and y coordinate values of each point *\/\nSET @x1 = 16\nSET @y1 = 7\nSET @x2 = 23\nSET @y2 = 10\n\n\/* Declare a new binary parameter to hold the full WKB *\/\nDECLARE @WKB varbinary(max)\n\n\/* Append the components together to build the Well-Known Binary representation *\/\nSET @WKB =\nCAST(@ByteOrder AS binary(1))\n+ CAST(@Type AS binary(4))\n+ CAST(@NumPoints AS binary(4))\n+ CAST(@x1 AS binary(8))\n+ CAST(@y1 AS binary(8))\n+ CAST(@x2 AS binary(8))\n+ CAST(@y2 AS binary(8))<\/pre>\n<p>\u3000@WKB \u306f\u4eca\u6b21\u306e\u5024\u3092\u4fdd\u6301\u3057\u3066\u3044\u308b\uff08\u7701\u7565\uff09\uff0e<\/p>\n<p>\u3000\u6211\u3005\u306f\u3053\u306e\u8868\u73fe\u304b\u3089 STLineFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 geometry \u578b\u306a\u3044\u3057 geography \u578b\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u3053\u306e\u4f8b\u3067\u306f\uff0c\u6211\u3005\u306f SRID 0 \u3092\u4f7f\u3063\u3066 meimetry \u578b\u306b\u5e30\u5c5e\u3059\u308b\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u304a\u3046\uff0e<\/p>\n<pre>DECLARE @LineString geometry\nSET @LineString = geometry::STLineFormWKB(@WKB, 0)<\/pre>\n<p>\u3000\u305d\u306e\u7dda\u304c\u6b63\u78ba\u306b\u751f\u6210\u3055\u308c\u305f\u304b\u8abf\u3079\u308b\u305f\u3081\uff0c\u518d\u3073 WKT \u8868\u73fe\u3092\u6211\u3005\u306e\u65b0\u3057\u3044 LineString \u306b STAsText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\uff0e<\/p>\n<pre>SELECT @LineString.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>LINESTRING (16 7, 23 10)<\/pre>\n<h4>WKB \u304b\u3089 Polygon \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000\uff12\u3064\u306e\u30ea\u30f3\u30b0\u3092\u6709\u3059\u308b Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKB \u8868\u73fe\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>[ByteOrder][Type][NumRings][NumPoints][X1][Y1]...[Xn][Yn][NumPoints][X1][Y1]...[Xn][Yn]<\/pre>\n<p>\u3000\u3053\u306e\u8868\u73fe\u5185\u306b\u542b\u307e\u308c\u308b\u8981\u7d20\u306f\u6b21\u306e\u30ea\u30b9\u30c8\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u4ed6\u306e WKB \u8868\u73fe\u3067\u898b\u305f\u3088\u3046\u306b\uff0c\u30b9\u30c8\u30ea\u30fc\u30e0\u306f 1 \u30d0\u30a4\u30c8\u306e\u6307\u6a19\u3067\u59cb\u307e\u308a\uff0c\u6b8b\u308a\u306e\u30d0\u30a4\u30c8\u306e\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3092\u793a\u3059[ByteOrder]\uff0e<\/li>\n<li>[Type] \u306f 4 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u306e\u6574\u6570\u3067\u3042\u308a\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u793a\u3059\uff0eWKB \u306b\u304a\u3044\u3066\u3059\u3079\u3066\u306e Polygon \u306e\u305f\u3081\u306e [Type] \u306e\u5024\u306f 3 \u3067\u3042\u308b\uff0e<\/li>\n<li>\u7d9a\u304f 4 \u30d0\u30a4\u30c8\u306e\u6574\u6570\u5024\u306f [NumRings] \u3067\u3042\u308a\uff0cPolygon \u5185\u306e\u30ea\u30f3\u30b0\u306e\u7dcf\u6570\u3092\u793a\u3059\uff0e\u3053\u306e\u5024\u306f\u5916\u5468\u30ea\u30f3\u30b0\uff0c\u304a\u3088\u3073\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u5b9a\u7fa9\u3055\u308c\u308b\u3059\u3079\u3066\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u6570\u3048\u308b\uff0e<\/li>\n<li>\u5404\u30ea\u30f3\u30b0\u306e\u5b9a\u7fa9\u306b\u7d9a\u304d\uff0c\u5916\u5468\u30ea\u30f3\u30b0\u3067\u59cb\u307e\u308b\uff0e\u5404\u30ea\u30f3\u30b0\u306f\u9589\u3058\u305f LineString \u3067\u3042\u308b\u305f\u3081\uff0c\u5404 Polygon \u306f WKB \u306b\u304a\u3044\u3066\u306f\u500b\u3005\u306e LineString \u3068\u540c\u3058\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5f93\u3046\uff0e\u3064\u307e\u308a\u6700\u521d\u306e 4 \u30d0\u30a4\u30c8\u306f [NumPoints] \u3067\u30ea\u30f3\u30b0\u306e\u70b9\u306e\u500b\u6570\u3092\u8a18\u8ff0\u3057\uff0c\u7d9a\u3044\u3066\u5404\u70b9\u306e x \u304a\u3088\u3073 y \u5ea7\u6a19\u307e\u305f\u306f\u7d4c\u5ea6\u304a\u3088\u3073\u7def\u5ea6\u304c\u7d9a\u304f\uff0e<\/li>\n<li>Polygon \u306b\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u306f\u5916\u90e8\u30ea\u30f3\u30b0\u306b\u7d9a\u3044\u3066\u9806\u756a\u306b\u30ea\u30b9\u30c8\u3055\u308c\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u3053\u306e\u69cb\u6587\u3092\u793a\u3059\u305f\u3081\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8003\u3048\u3066\u307f\u308b\uff0e\u4e00\u3064\u306e\u5916\u90e8\u30ea\u30f3\u30b0\u5185\u306b\u4e00\u3064\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u542b\u3080 Polygon \u306e WKB \u8868\u73fe\u3092\u7d44\u307f\u7acb\u3066\u308b\uff0e<\/p>\n<pre>\/* Declare all the elements required *\/\nDECLARE @ByteOrder bit\nDECLARE @Type int\nDECLARE @NumRings int\nDECLARE @Ext_NumPoints int\nDECLARE @Ext_x1 float, @Ext_y1 float\nDECLARE @Ext_x2 float, @Ext_y2 float\nDECLARE @Ext_x3 float, @Ext_y3 float\nDECLARE @Ext_x4 float, @Ext_y4 float\nDECLARE @Int_NumPoints int\nDECLARE @Int_x1 float, @Int_y1 float\nDECLARE @Int_x2 float, @Int_y2 float\nDECLARE @Int_x3 float, @Int_y3 float\n\n\/* Set the values *\/\nSET @ByteOrder = 0\nSET @Type = 3\nSET @NumRings = 2\n-- Exterior Ring\nSET @Ext_NumPoints = 5\nSET @Ext_x1 = -4\nSET @Ext_y1 = -5\nSET @Ext_x2 = -4\nSET @Ext_y2 = 10\nSET @Ext_x3 = 12\nSET @Ext_y3 = 10\nSET @Ext_x4 = 12\nSET @Ext_y4 = -5\n-- Interior Ring\nSET @Int_NumPoints = 4\nSET @Int_x1 = 3\nSET @Int_y1 = 1\nSET @Int_x2 = 3\nSET @Int_y2 = 5\nSET @Int_x3 = 7\nSET @Int_y3 = 3\n\n\/* Build the WKB representation *\/\nDECLARE @WKB varbinary(max)\nSET @WKB =\nCAST()\n+ CAST()\n+ CAST()\n-- Exteroir Ring\n+ CAST(@Ext_x1 AS binary(8)) + CAST(@Ext_y1 AS binary(8)) \n+ CAST(@Ext_x2 AS binary(8)) + CAST(@Ext_y3 AS binary(8)) \n+ CAST(@Ext_x3 AS binary(8)) + CAST(@Ext_y3 AS binary(8)) \n+ CAST(@Ext_x4 AS binary(8)) + CAST(@Ext_y4 AS binary(8)) \n+ CAST(@Ext_x1 AS binary(8)) + CAST(@Ext_y1 AS binary(8)) \n-- Interior Ring\n+ CAST(@Int_x1 AS binary(8)) + CAST(@Int_y1 AS binary(8))  \n+ CAST(@Int_x2 AS binary(8)) + CAST(@Int_y2 AS binary(8)) \n+ CAST(@Int_x3 AS binary(8)) + CAST(@Int_y3 AS binary(8)) \n+ CAST(@Int_x1 AS binary(8)) + CAST(@Int_y1 AS binary(8)) <\/pre>\n<p>\u3000\u6211\u3005\u306f\u4eca\u3084\uff0c\u6211\u3005\u306e WKB \u8868\u73fe\u306b\u95a2\u9023\u3059\u308b STPolyFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @polygon geometry\nSET @Polygon = beometry::STPolyFromWKB(@WKB, 0)\nSELECT @Polygon.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>POLYGON ((-4 -5, -4 10, 12 10, 12 -5, -4 -5), (3 1, 3 5, 7 3, 3 1))<\/pre>\n<h4>WKB \u304b\u3089 Multielement Geometry \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000\u591a\u8981\u7d20\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e WKB \u8868\u73fe\u306f\uff0cMultiPoint, MultiLineString, MultiPolygon \u304a\u3088\u3073 Geometry Collection \u3067\u3042\u308b\u304c\uff0c\u3059\u3079\u3066\u540c\u3058\u69cb\u9020\u306e\u30d5\u30a9\u30fc\u30e0\u3067\u3042\u308a\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>[ByteOrder][Type][NumGeometries]&lt;Geometry1&gt;&lt;Geometry2&gt;&#8230;&lt;GeometryN&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u5404\u3005\u306e\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\uff0c\u30d0\u30a4\u30ca\u30ea\u30b9\u30c8\u30ea\u30fc\u30e0\u306e\u8981\u7d20\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<ul>\n<li>[ByteOrder] \u306f1\u30d0\u30a4\u30c8\u306e\u6307\u6a19\u3067\u3042\u308a\uff0c\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8a18\u8ff0\u3059\u308b\u5024\u306e\u6b8b\u308a\u304c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u304b\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u304b\u306e\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3067\u3042\u308b\u3053\u3068\u3092\u793a\u3059\uff0e\u6ce8\u610f\u3059\u3079\u304d\u70b9\u3068\u3057\u3066\uff0c\u3053\u308c\u306f\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u81ea\u8eab\u306b\u95a2\u9023\u3059\u308b\u7279\u7570\u7684\u306a\u5024\u306b\u306e\u307f\u9069\u7528\u3055\u308c\u308b\uff0e\u3064\u307e\u308a [Type] \u3068 [NumGeometries] \u3067\u3042\u308b\uff0e\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b\u305d\u308c\u305e\u308c\u306e\u72ec\u7acb\u3057\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\uff0c\u3069\u306e\u30d0\u30a4\u30c8\u306e\u7279\u7570\u7684\u8981\u7d20\u306b\u84c4\u7a4d\u3055\u308c\u308b\u304b\u3067\u9806\u756a\u3092\u7279\u5b9a\u3055\u308c\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e<\/li>\n<li>[Type] \u306f4\u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3067\u3042\u308a\uff0c\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u8a18\u8ff0\u3059\u308b\u6307\u6a19\u3067\u3042\u308b\uff0e4 \u306f MultiPoint \u3092\u793a\u3059\uff0e5 \u306f MultiLineString \u3092\u793a\u3059\uff0e6 \u306f MultiPolygon \u3092\u793a\u3059\uff0e7 \u306f Geomtry Collection \u3092\u793a\u3059\uff0e<\/li>\n<li>[NumGeometries] \u306f 4 \u30d0\u30a4\u30c8\u306e\u7b26\u53f7\u306a\u3057\u6574\u6570\u3067\u3042\u308a\uff0c\u5404\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b\u500b\u3005\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u500b\u6570\u3092\u8868\u73fe\u3059\u308b\uff0e<\/li>\n<li>&lt;Geometry1&gt;&#8230;&lt;GeometryN&gt;\u306f\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b\u500b\u3005\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30d5\u30eb\u30d5\u30a9\u30fc\u30e0\u306e WKB \u8868\u73fe\u3067\u3042\u308a\uff0c\u5358\u4e00\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5b9a\u7fa9\u3057\u305f\u3068\u3057\u3066\u3082\u540c\u3058\u30eb\u30fc\u30eb\u304c\u9069\u7528\u3055\u308c\u308b\uff0e\u3053\u308c\u306f\u3059\u3079\u3066\u306e\u500b\u3005\u306e\u8981\u7d20\u304c\uff0c\u305d\u306e\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKB \u5b9a\u7fa9\u3067\u8981\u6c42\u3055\u308c\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092\u660e\u78ba\u306b\u5ba3\u8a00\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u3053\u3068\u3092\u793a\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306b\u306f\u500b\u3005\u306e\u5ea7\u6a19\u5024\u3060\u3051\u3067\u306f\u306a\u304f\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3068\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u304c\u542b\u307e\u308c\u308b\uff0e<\/li>\n<\/ul>\n<p>\u6ce8\u610f\u3000\u4eee\u306b\u4e00\u7a2e\u985e\u306e\u591a\u8981\u7d20\u3092\u5b9a\u7fa9\u3057\u305f\u306a\u3089\uff0c&lt;Geometry1&gt;&#8230;&lt;GeometryN&gt;\u306e\u5024\u306f\u3059\u3079\u3066\u5bfe\u5fdc\u3059\u308b\u5358\u6570\u578b\u306e\u500b\u5225\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8868\u73fe\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e\u4f8b\u3048\u3070\uff0cMultiLineString\u8981\u7d20\u306b\u542b\u307e\u308c\u308b\u8981\u7d20\u306f\u5168\u3066\u6709\u52b9\u306a LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u8868\u73fe\u3067\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e<\/p>\n<p>\u3000\u6b21\u306e WKB \u8868\u73fe\u306e\u4f8b\u306fGeometry Collection \u3092\u793a\u3057\u3066\u304a\u308a\uff0c\u4e00\u3064\u306e Point \u3068\u4e00\u3064\u306e LineString \u3092\u793a\u3059\uff08\u7701\u7565\uff09\uff0e<\/p>\n<p>\u3000Table 4-3 \u306b\u3053\u306e\u8868\u73fe\u3092\u5206\u89e3\u3057\u305f\u5404\u8981\u7d20\u3092\u63b2\u8f09\u3059\u308b\uff0e<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 391px;\"><caption>Table 4-3. WKB \u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u8868\u73fe\u4f8b\u306e\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u8981\u7d20<\/caption>\n<tbody>\n<tr style=\"height: 23px;\">\n<th style=\"width: 30%; height: 23px;\">\u5024<\/th>\n<th style=\"width: 70%; height: 23px;\">\u8aac\u660e<\/th>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">0x<\/td>\n<td style=\"width: 70%; height: 23px;\">16\u9032\u8868\u8a18\u3092\u4f7f\u3063\u3066\u8868\u73fe\u3055\u308c\u308b\u30d0\u30a4\u30ca\u30ea\u5024\u3092\u793a\u3059<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">00<\/td>\n<td style=\"width: 70%; height: 23px;\">\u7d9a\u304f\u5024\u304c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306e\u30d0\u30a4\u30c8\u9806\u3067\u8868\u73fe\u3055\u308c\u308b<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"width: 30%; height: 46px;\">00000007<\/td>\n<td style=\"width: 70%; height: 46px;\">\u3053\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f16 \u9032\u6570\u306e geometry collection \u3067\u3042\u308a\uff0c7 \u578b\u3068\u8a18\u8ff0\u3055\u308c\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">00000002<\/td>\n<td style=\"width: 70%; height: 23px;\">\u3053\u308c\u3089\u306f\u3053\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u306b\u542b\u307e\u308c\u308b\uff12\u3064\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">00<\/td>\n<td style=\"width: 70%; height: 23px;\">\u6700\u521d\u306e\u8981\u7d20\u306e\u30d0\u30a4\u30c8\u304c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306e\u30d0\u30a4\u30c8\u9806\u3067\u8868\u73fe\u3055\u308c\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">00000001<\/td>\n<td style=\"width: 70%; height: 23px;\">\u6700\u521d\u306e\u8981\u7d20\u306f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8868\u73fe\u3059\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">404433333333<\/td>\n<td style=\"width: 70%; height: 23px;\">\u3053\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e x \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">C002888A47ECEFE9B<\/td>\n<td style=\"width: 70%; height: 23px;\">\u3053\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e y \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">01<\/td>\n<td style=\"width: 70%; height: 23px;\">\uff12\u756a\u76ee\u306e\u8981\u7d20\u306f\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u306e\u30d0\u30a4\u30c8\u9806\u3067\u8868\u73fe\u3055\u308c\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">02000000<\/td>\n<td style=\"width: 70%; height: 23px;\">\uff12\u756a\u3081\u306e\u8981\u7d20\u306f LineString \u3092\u8868\u73fe\u3059\u308b\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">02000000<\/td>\n<td style=\"width: 70%; height: 23px;\">\u3053\u306e LineString \u306f\uff12\u3064\u306e point \u3092\u542b\u3080\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">9BFEEC478A8802C0<\/td>\n<td style=\"width: 70%; height: 23px;\">LineString \u5185\u306e\u6700\u521d\u306e point \u306e x \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">333333333333440<\/td>\n<td style=\"width: 70%; height: 23px;\">LineString \u5185\u306e\u6700\u521d\u306e point \u306e y \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">6666666666F65340<\/td>\n<td style=\"width: 70%; height: 23px;\">LineString \u5185\u306e\uff12\u756a\u76ee\u306e point \u306e x \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"width: 30%; height: 23px;\">B81E85EB51B81B40<\/td>\n<td style=\"width: 70%; height: 23px;\">LineString \u5185\u306e\uff12\u756a\u76ee\u306e point \u306e y \u5ea7\u6a19\u5024\uff0e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u591a\u8981\u7d20 WKB \u8868\u73fe\u304b\u3089\u306e\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u305f\u3081\uff0c\u6b21\u306e\u3088\u3046\u306b\u9069\u5207\u306a\u578b\u7279\u7570\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<ul>\n<li>WKB \u304b\u3089 MultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b STMPointFromWKB() \u3092\u4f7f\u3046<\/li>\n<li>WKB \u304b\u3089 MultiLineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b STMLineFromWKB() \u3092\u4f7f\u3046<\/li>\n<li>WKB \u304b\u3089 MultiPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b STMPolyFromWKB() \u3092\u4f7f\u3046<\/li>\n<li>WKB \u304b\u3089 Geometry Collection \u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b STGeomCollFromWKB() \u3092\u4f7f\u3046<\/li>\n<\/ul>\n<p>\u3000\u5148\u306e\u4f8b\u3067\u898b\u305f\u3088\u3046\u306b\uff0cWKB \u306f Geometry Collection \u3092\uff0cSTGeomCollFromWKB() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u6b21\u306e\u3088\u3046\u306b\u8868\u73fe\u3059\u308b\uff0e<\/p>\n<pre>SELECT geometry::STGeomCollFromWKB(\n..., 0)<\/pre>\n<h4>WKB \u304b\u3089\u4efb\u610f\u306e\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000WKT \u540c\u69d8\u306b\uff0cSQL Server 2008 \u306fgeometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u305f\u3081\u306e\u6c4e\u7528\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3082\u6574\u3063\u305f WKB \u304b\u3089\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u3053\u306e\u6c4e\u7528\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u306f STGeomFromWKB() \u3067\u3042\u308a\uff0c\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u8a00\u53ca\u3057\u305f\u3059\u3079\u3066\u306e\u578b\u7279\u7570\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u306e\u4ee3\u308f\u308a\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u65e2\u5b58\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092 WKB \u3068\u3057\u3066\u8868\u73fe\u3059\u308b<\/h4>\n<p>\u3000SQL Server 2008 \u306f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u30b9\u30c8\u30ea\u30fc\u30e0\u3068\u3057\u3066\u84c4\u7a4d\u3059\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u305d\u308c\u306f WKB \u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u540c\u3058\u3067\u306f\u306a\u3044\uff0e\u7d50\u679c\u3068\u3057\u3066\uff0cWKB \u8868\u73fe\u304b\u3089\u306e geometry \u578b\u307e\u305f\u306f geography \u578b\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u5024\u3092\u76f4\u63a5\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff0e\u4ee3\u308f\u308a\u306b\u9069\u5207\u306a\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u4e00\u3064\u306b\u305d\u308c\u3089\u306e\u8868\u73fe\u3092\u901a\u904e\u3055\u305b\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e\u540c\u69d8\u306b\uff0c\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3059\u308b\u305f\u3081\u306b SQL Server \u304c\u4f7f\u3046\u5185\u90e8\u306e\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u76f4\u63a5\u9078\u629e\u3057\u305f\u3044\u6642\u306b\u306f\uff0c\u305d\u308c\u3089\u306e\u5730\u7269\u306e WKB \u8868\u73fe\u3068\u540c\u3058\u3068\u3044\u3046\u8a33\u306b\u306f\u3044\u304b\u306a\u3044\uff0e\u3053\u306e\u7406\u7531\u306e\u4e00\u3064\u3068\u3057\u3066\uff0cSQL Server \u306f\u5185\u90e8\u306e\u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u7a7a\u9593\u53c2\u7167\u7cfb\u306b\u95a2\u9023\u3059\u308b\u8a73\u7d30\u306a\u4ed8\u52a0\u60c5\u5831\u3092\u6709\u3057\u3066\u304a\u308a\uff0c\u5143\u306e WKB \u8868\u73fe\u306b\u306f\u305d\u308c\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u304c\u6319\u3052\u3089\u308c\u308b\uff0e<\/p>\n<p>\u3000geometry \u578b\u307e\u305f\u306f geography \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e WKB \u8868\u73fe\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\uff0cSTAsBinary() \u30e1\u30bd\u30c3\u30c9\u3092\u4ee3\u308f\u308a\u306b\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\uff0e<\/p>\n<pre>SELECT geometry::STPointFromText('Point(10.572 2.245)', 0).STAsBinary()<\/pre>\n<p>\u3000\u3053\u308c\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e WKB \u8868\u73fe\u3092\u8fd4\u3057\uff0c\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30ca\u30ea\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u8868\u73fe\u3059\u308b\uff08\u7701\u7565\uff09\uff0e<\/p>\n<p>\u3000\u3053\u306e\u4f8b\u306e1\u30b9\u30c6\u30fc\u30b8\u3092\u66f4\u306b\u53d6\u5f97\u3059\u308b\u305f\u3081\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u306f WKT \u8868\u73fe\u304b\u3089 STGeomFromText() \u3092\u4f7f\u3063\u3066 Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0cSTGeomFromWKB() \u30e1\u30bd\u30c3\u30c9\u306b\u95a2\u9023\u3059\u308b STAsBinary() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\uff12\u756a\u76ee\u306e Point \u3092\u751f\u6210\u3059\u308b\u524d\u306b\uff0cSTAsBinary() \u3092\u4f7f\u3063\u3066WKB \u8868\u73fe\u3092\u8fd4\u3059\u3053\u3068\u3092\u793a\u3059\uff0e<\/p>\n<pre>DECLARE\n@WKT varchar(255) = 'POINT(52 8)'\n@WKB varbinary(max),\n@SRID int = 0,\n@Geometry1 geometry,\n@Geometry2 geometry\n\nSET @Geometry1 = geometry::STGeomFromText(@WKT, @SRID)\nSET @WKB = @Geometry1.STAsBinary()\nSET @Geometry2 = geometry::STGeomFromWKB(@WKB, @SRID)\n\nSELECT\n@Geometry1.STAsText(),\n@Geometry2.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u4e21\u30e1\u30bd\u30c3\u30c9\u3067\u751f\u6210\u3055\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u540c\u3058\u3067\u3042\u308b\u3053\u3068\u3092\u793a\u3059\uff0e<\/p>\n<pre>POINT (52 8)  POINT (52 8)<\/pre>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u3067\u3042\u308c\u30d3\u30c3\u30b0\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u3067\u3042\u308c WKB \u8868\u73fe\u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u751f\u6210\u3055\u308c\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\uff0cSTAsBinary() \u30e1\u30bd\u30c3\u30c9\u3067\u8fd4\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u8868\u73fe\u306f\u5e38\u306b\u30ea\u30c8\u30eb\u30a8\u30f3\u30c7\u30a3\u30a2\u30f3\u30d0\u30a4\u30c8\u30aa\u30fc\u30c0\u30fc\u3067\u3042\u308b\uff0e<\/p>\n<h3>Geography Markup Language \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b<\/h3>\n<p>\u3000Geography Markup Language \u306f XML \u30d9\u30fc\u30b9\u306e\u7a7a\u9593\u60c5\u5831\u3092\u4ee3\u8868\u3059\u308b\u8a00\u8a9e\u3067\u3042\u308b\uff0eGML \u8868\u73fe\u3092\u4f7f\u3063\u3066\u8868\u73fe\u3055\u308c\u305f\u3068\u304d\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5404\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u69cb\u9020\u5185\u306e\u7279\u7570\u7684\u8981\u7d20\u30bf\u30b0\u5185\u306b\u542b\u307e\u308c\u308b\uff0e\u3053\u308c\u306b\u3088\u308a GML \u306f\u660e\u78ba\u304b\u3064\u9ad8\u5ea6\u306b\u69cb\u9020\u5316\u3055\u308c\u305f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u306a\u308b\uff0e\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u4e00\u3064\u306e\u70b9\u306e GML \u8868\u73fe\u306e\u4f8b\u3092\u793a\u3059\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;Point xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;10 30&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000GML \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u5229\u70b9\u304c\u3042\u308b\uff0e<\/p>\n<ul>\n<li>GML \u306f\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u3042\u308a\uff0c\u305d\u308c\u3092\u4f7f\u3063\u3066\u8868\u73fe\u3055\u308c\u305f\u60c5\u5831\u3092\u4eba\u9593\u304c\u691c\u67fb\u3057\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u6bd4\u8f03\u7684\u5bb9\u6613\u3067\u3042\u308b\uff0e<\/li>\n<li>\u3059\u3079\u3066\u306e XML \u30d9\u30fc\u30b9\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u3088\u3046\u306b\uff0cGML \u306f\u660e\u78ba\u3067\u9ad8\u5ea6\u306b\u69cb\u9020\u5316\u3055\u308c\u305f\u968e\u5c64\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6709\u3057\u3066\u3044\u308b\uff0e\u3053\u308c\u306b\u3088\u308a\uff0c\u95a2\u9023\u3059\u308b GML \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8abf\u3079\u308b\u3053\u3068\u3067\u8907\u96d1\u306a\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u5bb9\u6613\u306b\u306a\u308b\uff0e<\/li>\n<li>GML \u306f\u3068\u3066\u3082\u5197\u9577\u3067\u3042\u308a\uff0c\u7279\u7570\u7684\u8981\u7d20\u5185\u90e8\u306b\u660e\u78ba\u306b\u3059\u3079\u3066\u306e\u5024\u3092\u8a18\u8ff0\u3057\u3066\u3044\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u3057\u304b\u3057\uff0cGML \u306b\u3082\u307e\u305f\u6b21\u306e\u3088\u3046\u306a\u6b20\u70b9\u304c\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u975e\u5e38\u306b\u5197\u9577\u3067\u3042\u308b\uff01GML \u3068 WKT \u306f\u3069\u3061\u3089\u3082\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3042\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e GML \u8868\u73fe\u306f\u540c\u7b49\u306e WKT \u8868\u73fe\u3088\u308a\u3082\u5927\u3044\u306b\u591a\u304f\u306e\u30b9\u30da\u30fc\u30b9\u3092\u5360\u3081\u308b\uff0e\u3053\u308c\u306f\u95a2\u9023\u3059\u308b\u8981\u7d20\u30bf\u30b0\u5185\u90e8\u306b\u3059\u3079\u3066\u306e\u5024\u3092\u84c4\u7a4d\u3059\u308b\u304b\u3089\u3067\u3042\u308b\uff0e<\/li>\n<li>GML \u306f WKT \u540c\u69d8\u30c6\u30ad\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u3042\u308b\u305f\u3081\uff0c\u30d0\u30a4\u30ca\u30ea\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u5ea7\u6a19\u5024\u3092\u8868\u73fe\u3059\u308b\u3068\u304d\uff0c\u4e38\u3081\u306b\u3088\u308a\u7cbe\u5ea6\u306b\u554f\u984c\u304c\u3042\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000XML \u30d9\u30fc\u30b9\u306e\u74b0\u5883\u306b\u304a\u3044\u3066\u306f GML \u306f\u7a7a\u9593\u60c5\u5831\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u666e\u901a\u306b\u4f7f\u308f\u308c\u308b\uff0e\u3053\u308c\u306f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u3064\u306a\u304c\u3063\u305f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u542b\u307f\uff0c\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u7b2c\uff18\u7ae0\u3067\u8ad6\u3058\u308b\uff0e<\/p>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000SQL Server \u306b\u5b9f\u88c5\u3055\u308c\u305f GML \u30e1\u30bd\u30c3\u30c9\u7fa4\u306f\u30b9\u30b1\u30fc\u30eb\u30c0\u30a6\u30f3\u3055\u308c\u305f GML 3.1.1 \u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\uff0eSQL Server \u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30b9\u30ad\u30fc\u30de\u3092 http:\/\/schemas.microsoft.com\/sqlserver\/profiles\/gml\/ \u3067\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3060\u308d\u3046\uff0e\u307e\u305f\u306f\u30d5\u30eb\u306e GML \u6a19\u6e96\u3092 OGC \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3067\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3060\u308d\u3046\uff0ehttp:\/\/www.opengeospatial.org\/standards.gml \u306b\u3042\u308b\uff0e<\/p>\n<h4>GML \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u69cb\u9020<\/h4>\n<p>\u3000\u3044\u304b\u306a\u308b GML \u8868\u73fe\u3082\u305d\u306e\u89aa\u8981\u7d20\u306f\uff0c\u8868\u73fe\u3057\u3066\u3044\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u5b9a\u7fa9\u3059\u308b\uff0e\u3059\u3079\u3066\u306e GML \u8868\u73fe\u306f\u6b21\u306e\u30bf\u30b0\u306e\u30da\u30a2\u5185\u90e8\u306b\u542b\u307e\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<ul>\n<li>&lt;Point&gt;&#8230;&lt;\/Point&gt;<\/li>\n<li>&lt;LineString&gt;&#8230;&lt;\/LineString&gt;<\/li>\n<li>&lt;Polygon&gt;&#8230;&lt;\/Polygon&gt;<\/li>\n<li>&lt;MultiPoint&gt;&#8230;&lt;\/MultiPoint&gt;<\/li>\n<li>&lt;MultiCurve&gt;&#8230;&lt;\/MultiCurve&gt;<\/li>\n<li>&lt;MultiSurface&gt;&#8230;&lt;\/MultiSurface&gt;<\/li>\n<li>&lt;MultiGeometry&gt;&#8230;&lt;\/MultiGeometry&gt;<\/li>\n<\/ul>\n<p>\u3000\u3053\u308c\u3089\u306e\u8981\u7d20\u30bf\u30b0\u540d\u306f GML \u3092\u4f7f\u3046\u7570\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5ba3\u8a00\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\uff0cWKT \u306b\u304a\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306b\u4f7f\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u540d\u524d\u304c\u4f3c\u3066\u3044\u308b\uff0e\u3057\u304b\u3057\uff0c\u3044\u304f\u3064\u304b\u7570\u306a\u308b\u70b9\u3082\u5b58\u5728\u3059\u308b\uff0e<\/p>\n<ul>\n<li>MultiLineString \u304a\u3088\u3073 MultiPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306f WKT \u306b\u304a\u3044\u3066\u306f\u76f4\u63a5\u5ba3\u8a00\u3055\u308c\u308b\u306e\u306b\u5bfe\u3057\u3066\uff0cGML \u306b\u304a\u3044\u3066\u306f\u305d\u308c\u305e\u308c MultiCurve \u304a\u3088\u3073 MultiSurface \u8981\u7d20\u306e\u5b50\u8981\u7d20\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/li>\n<li>WKT \u306b\u304a\u3044\u3066 Geometry Collection \u3068\u3057\u3066\u77e5\u3089\u308c\u308b\u8907\u6570\u3067\u7570\u7a2e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080\u8981\u7d20\u306f\uff0cGML \u306b\u304a\u3044\u3066\u306f MultiGeometry \u8981\u7d20\u3068\u547c\u3070\u308c\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u69cb\u6210\u8981\u7d20\u306e\u3059\u3079\u3066\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u306e\u89aa\u8981\u7d20\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u5b50\u8981\u7d20\u5185\u3067\u6307\u5b9a\u3055\u308c\uff0c\u305d\u308c\u3092\u8868\u73fe\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8a18\u8ff0\u3057\u305f\u7279\u7570\u7684\u306a\u30bf\u30b0\u5185\u90e8\u306b\u56f2\u307e\u308c\u3066\u3044\u308b\uff0e\u5404\u30b8\u30aa\u30e1\u30c8\u30ea\u306e GML \u8868\u73fe\u5185\u306b\u542b\u307e\u308c\u308b\u7279\u5b9a\u306e\u8981\u7d20\u306f\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u5f8c\u3067\u66f4\u306b\u8a73\u7d30\u306b\u8ff0\u3079\u3088\u3046\uff0e<\/p>\n<h4>GML \u540d\u524d\u7a7a\u9593\u306e\u5ba3\u8a00<\/h4>\n<p>\u3000XML \u8981\u7d20\u3092\u5b9a\u7fa9\u3059\u308b\u3044\u304b\u306a\u308b\u30bf\u30b0\u3067\u3082 xml \u5c5e\u6027\u3092\u542b\u307f\uff0c\u305d\u308c\u306f\u8981\u7d20\u540d\u306e\u540d\u524d\u7a7a\u9593\u306b\u95a2\u9023\u3057\u3066\u3044\u308b\uff0e\u3044\u304b\u306a\u308b XML \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u304a\u3044\u3066\u3082\u4f7f\u308f\u308c\u308b\u8981\u7d20\u306e\u540d\u524d\u306f\u4e0e\u3048\u3089\u308c\u305f\u540d\u524d\u7a7a\u9593\u5185\u90e8\u3067\u306f\u4e00\u610f\u3067\u3042\u308a\uff0c\u3060\u304b\u3089 &lt;Point xmls=&#8221;http:\/\/opengis.net\/gml&#8221;&gt; \u306f &lt;Point xmls=&#8221;http:\/\/www.someothernamespace.com&#8221;&gt; \u3068\u306f\u7570\u306a\u308a\uff0c\u305f\u3060\u306e &lt;Point&gt; \u306f\u540d\u524d\u7a7a\u9593\u3068\u306f\u306a\u3093\u306e\u95a2\u4fc2\u3082\u306a\u3044\uff0e\u3053\u308c\u306b\u3088\u308a\u7570\u306a\u308b XML \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u7570\u306a\u308b\u5834\u9762\u3067\u9069\u5207\u306a\u540d\u524d\u7a7a\u9593\u3067\u8cc7\u683c\u3092\u5f97\u308b\u3053\u3068\u3067\uff0c\u540c\u3058\u8981\u7d20\u540d\u3092\u4f7f\u3046\u3053\u3068\u304c\u8a31\u3055\u308c\u3066\u3044\u308b\uff0e<\/p>\n<p>\u3000GML \u8868\u73fe\u306b\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u306f GML \u540d\u524d\u7a7a\u9593\u306b\u5c5e\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u3053\u308c\u306b\u3088\u308a\u5168\u3066\u306eGML \u8868\u73fe\u306f\uff0c\u9069\u5207\u306a GML \u8981\u7d20\u3092\uff0c\u4ed6\u306e XML \u540d\u524d\u7a7a\u9593\u7531\u6765\u306e\u540c\u540d\u306e\u8981\u7d20\u304b\u3089\u4e00\u610f\u306b\u8b58\u5225\u3059\u308b\u3053\u3068\u304c\u78ba\u4fdd\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000GML \u8868\u73fe\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\u304c\u6b63\u78ba\u306a\u540d\u524d\u7a7a\u9593\u306b\u95a2\u9023\u3059\u308b\u3053\u3068\u3092\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b\uff0c\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u306e\u89aa\u8981\u7d20\u306b GML \u540d\u524d\u7a7a\u9593\u306e\u5ba3\u8a00\u3092\u7f6e\u304f\u3079\u304d\u3067\u3042\u308b\uff0e\u3053\u306e\u540d\u524d\u7a7a\u9593\u306f\u305d\u308c\u3089\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u8868\u73fe\u5185\u90e8\u306b\u30cd\u30b9\u30c8\u3055\u308c\u305f\u5404\u5b50\u8981\u7d20\u306b\u7d99\u627f\u3055\u308c\u308b\uff0eSQL Server \u5185\u90e8\u3067\u4f7f\u3046\u305f\u3081\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e GML \u8868\u73fe\u3092\u5b9a\u7fa9\u3059\u308b\u6642\u306b\u306f\uff0c\u3086\u3048\u306b\u5e38\u306b xmls \u5c5e\u6027\u3092\uff0cGML \u540d\u524d\u7a7a\u9593\u3067\u3042\u308b http:\/\/opengis.net\/gml \u3092\u53c2\u7167\u3059\u308b Uniform Resource Identifier (URI) \u3092\u30bb\u30c3\u30c8\u3059\u308b\u5024\u3068\u3068\u3082\u306b\uff0c\u9069\u5207\u306a\u89aa\u8981\u7d20\u306e\u958b\u59cb\u30bf\u30b0\u5185\u90e8\u306b\u542b\u3081\u308b\u3079\u304d\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000LineString \u3092\u4f8b\u306b\u4f7f\u3046\u3068\uff0c\u3086\u3048\u306b GML \u8868\u73fe\u306f\u6b21\u306e\u30bf\u30b0\u3067\u59cb\u307e\u308a\uff0c\u7d42\u308f\u308b\u3079\u304d\u3067\u3042\u308b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;LineString xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;&#8230;&lt;\/LineString&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u540d\u524d\u7a7a\u9593\u306e\u5ba3\u8a00\u3092\u524a\u9664\u3059\u308b\u3068\uff0c\u6574\u3063\u305f XML \u3067\u3042\u3063\u3066\u3082\u6709\u52b9\u306a GML \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5b9a\u7fa9\u3067\u304d\u306a\u304f\u306a\u308b\uff0e\u3053\u306e\u3088\u3046\u306a\u8868\u73fe\u3092 GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u306b\u95a2\u9023\u3057\u3066\u4f7f\u304a\u3046\u3068\u3057\u3066\u3044\u308b\u306a\u3089\uff0c\u6b21\u306e\u4f8b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u53d7\u3051\u53d6\u308b\u3060\u308d\u3046\uff0e<\/p>\n<pre>DECLARE @Point geography\nSET @Point = geography::GeomFromGML('\n&lt;Point&gt;\n&lt;pos&gt;10 30&lt;\/pos&gt;\n&lt;\/Point&gt;',\n4326)<\/pre>\n<pre>System.FormatException: 24129: The given XML instance is not valid because its top-level tag was Point. The top-level element of the input Geographic Markup Language (GML) must be one of Point, LineString, Polygon MultiPoint, MultiGeometry, MultiCurve, or MultiSurface.<\/pre>\n<p>\u3000\u3053\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u30c6\u30ad\u30b9\u30c8\u306f\u3080\u3057\u308d\u56f0\u60d1\u3055\u305b\u308b\u3088\u3046\u306b\u307f\u3048\u308b\uff0e\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u306e\u30bf\u30b0\u304c Point \u3067\u3042\u308b\u3086\u3048\u306b\u6211\u3005\u306e GML \u8868\u73fe\u304c\u7121\u52b9\u3067\u3042\u308b\u3068\u8a18\u8ff0\u3057\u3066\u3044\u308b\uff0e\u4ee3\u308f\u308a\u306b\uff0cPoint \u3067\u59cb\u307e\u308b\u6709\u52b9\u306a\u8981\u7d20\u306e\u53ef\u80fd\u6027\u306e\u3042\u308b\u30ea\u30b9\u30c8\u3092\u624b\u539a\u304f\u63d0\u4f9b\u3057\u3066\u3044\u308b&#8230;<\/p>\n<p>\u3000\u3053\u306e\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306f\uff0cGeomFromCml() \u30e1\u30bd\u30c3\u30c9\u3092\u901a\u3057\u305f XML \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c8\u30c3\u30d7\u30ec\u30d9\u30eb\u306e\u30bf\u30b0\u306f\uff0c\u305d\u306e GML \u540d\u524d\u7a7a\u9593\u7531\u6765\u3067\uff0c\u30ea\u30b9\u30c8\u3055\u308c\u305f\u8981\u7d20\u540d\u306e\u4e00\u3064\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u304b\u3089\u3067\u3042\u308b\uff0e\u540d\u524d\u7a7a\u9593\u3092\u89aa\u8981\u7d20\u30bf\u30b0\u5185\u3067\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306f\uff0c\u8868\u73fe\u3092\u6709\u52b9\u306b\u3059\u308b\uff0e\u6b21\u306e\u4f8b\u306e\u3088\u3046\u306b\uff0e<\/p>\n<pre>DECLARE @Point geography\nSET @Point = geography::GeomFromGML('\n&lt;Point xmls=\"http:\/\/www.opengis.net\/gml\"&gt;\n&lt;pos&gt;10 30&lt;\/pos&gt;\n&lt;\/Point&gt;',\n4326)<\/pre>\n<pre>Command(s) completed successfully.<\/pre>\n<h4>GML \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u30e1\u30bd\u30c3\u30c9<\/h4>\n<p>\u3000WKT \u3084 WKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u306f\u7570\u306a\u308a\uff0cSQL Server 2008 \u306fGML \u7531\u6765\u306e\u7279\u7570\u7684\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u7570\u306a\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3066\u306f\u3044\u306a\u3044\uff0e\u3042\u3089\u3086\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\uff0c\u305d\u308c\u304c Point \u3067\u3042\u308c LineString \u3067\u3042\u308c Polygon \u3067\u3042\u308c\u591a\u8981\u7d20\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308c\uff0c\u5358\u4e00\u306e\u6c4e\u7528\u30e1\u30bd\u30c3\u30c9 GeomFromGml() \u3092\u901a\u3057\u3066\u751f\u6210\u3059\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u751f\u6210\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e\u306f\u63d0\u4f9b\u3055\u308c\u305f GML \u8868\u73fe\u306e\u69cb\u9020\u3068\u5185\u5bb9\u306b\u3088\u308a\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u306f\u4e21\u65b9\u306e\u7a7a\u9593\u30c7\u30fc\u30bf\u578b\u306b\u5b9f\u88c5\u3055\u308c\u3066\u304a\u308a\uff0c\u305d\u308c\u3092\u4f7f\u3063\u3066 geography \u578b\u3067\u3082 geometry \u578b\u3067\u3082\u9069\u5207\u306a\u69cb\u6587\u3067\u3042\u308c\u3070\u5730\u7269\u3092\u751f\u6210\u3067\u304d\u308b\uff0e\u6b21\u306e\u3088\u3046\u306b\uff0e<\/p>\n<pre>geometry::GeomFromGML('GML representation', srid)<\/pre>\n<p>\u3042\u308b\u3044\u306f<\/p>\n<pre>geography::GeomFromGML('GML representaion', srid)<\/pre>\n<p>\u3000GML \u6a19\u6e96\u81ea\u8eab\u306f OGC \u306b\u3088\u308a\u7b56\u5b9a\u3055\u308c\u305f\u306b\u3082\u95a2\u308f\u3089\u305a\uff0cGML \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u305f\u3081\u306e\u30b5\u30dd\u30fc\u30c8\u306f SQL \u4ed5\u69d8\u306e\u305f\u3081\u306e OGC Simple Features \u306e\u4e00\u90e8\u3067\u306f\u306a\u3044\uff0e\u7d50\u679c\u3068\u3057\u3066\uff0cGML \u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u3053\u306e GeomFromGml() \u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u62e1\u5f35 SQL Server \u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308a\uff0c\u63a5\u982d\u8f9e\u306e\u6587\u5b57\u5217 &#8220;ST&#8221; \u304c\u3064\u304b\u306a\u3044\uff0e<\/p>\n<p>\u3000\u3042\u3089\u3086\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u4eca\u898b\u305f\u3088\u3046\u306b \u540c\u3058\u69cb\u6587\u306e GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u751f\u6210\u3055\u308c\u308b\u305f\u3081\uff0c\u6b21\u306e\u4f8b\u3067\u898b\u308b\u3088\u3046\u306b\u500b\u3005\u306e\u30b1\u30fc\u30b9\u3067\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u7e70\u308a\u8fd4\u3057\u305f\u304f\u306a\u3044\uff0e\u4ee3\u308f\u308a\u306b\uff0c\u5404\u7a2e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e GML \u8868\u73fe\u3068\u306e\u95a2\u9023\u3092\u304a\u898b\u305b\u3059\u308b\u306b\u7559\u3081\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u540d\u524d\u306b\u30df\u30b9\u30ea\u30fc\u30c9\u3055\u308c\u306a\u3044\u3088\u3046\u306b\uff0eGML \u306f Geography Markup Language \u306e\u7565\u3067\u3042\u308b\u304c\uff0cGeomFromGml() \u306f geography \u578b\u3067\u3082 geometry \u578b\u3067\u3082\u3044\u305a\u308c\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3082 GML \u8868\u73fe\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3067\u304d\u308b\uff0e<\/p>\n<h4>GML \u304b\u3089 Point \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000Point \u306e GML \u8868\u73fe\u306f\u6b21\u306e\u4f8b\u306e\u901a\u308a\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;Point xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;40.4 -2.31667&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u3053\u306e\u4f8b\u306f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u308a\uff0c\u5ea7\u6a19 (40.4, -2.31667) \u306b\u4f4d\u7f6e\u3059\u308b\uff0e\u3053\u306e GML \u8868\u73fe\u306e\u7279\u5fb4\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u8868\u73fe\u5168\u4f53\u306f &lt;Point&gt; \u958b\u59cb\u30bf\u30b0\u3068 &lt;\/Point&gt; \u7d42\u4e86\u30bf\u30b0\u306e\u9593\u306b\u542b\u307e\u308c\uff0cGML \u540d\u524d\u7a7a\u9593\u3092\u7528\u3044\u3066\u5ba3\u8a00\u3055\u308c\u308b\uff0e<\/li>\n<li>\u3053\u306e\u89aa\u8981\u7d20\u5185\u90e8\u306b\uff0c\u70b9\u306e\u4f4d\u7f6e\u3092\u5b9a\u7fa9\u3059\u308b\u5ea7\u6a19\u306f &lt;pos&gt; \u304a\u3088\u3073 &lt;\/pos&gt; \u30bf\u30b0\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\uff0e<\/li>\n<li>\u5ea7\u6a19\u5024\u81ea\u4f53\u306f\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\uff0c\u76f4\u4ea4\u5ea7\u6a19\u306b\u304a\u3044\u3066\u306f x-y \u306e\u9806\u306b\uff0c\u5730\u7406\u5ea7\u6a19\u7cfb\u3067\u306f\u7def\u5ea6-\u7d4c\u5ea6\u306e\u9806\u306b\u5217\u8a18\u3059\u308b\uff0e<\/li>\n<li>WKT \u306b\u304a\u3051\u308b\u306e\u3068\u9055\u3063\u3066\uff0cGML \u306b\u304a\u3051\u308b\u70b9\u306e &lt;pos&gt; \u8981\u7d20\u306f\u6b63\u78ba\u306b\uff12\u3064\u306e\u5ea7\u6a19\uff0c\u3064\u307e\u308a x \u304a\u3088\u3073 y \u307e\u305f\u306f\u7def\u5ea6\u3068\u7d4c\u5ea6\u3092\u542b\u307e\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0eGML \u306f z \u3084 m \u5ea7\u6a19\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u306a\u3044\uff0e<\/li>\n<\/ul>\n<p>\u6ce8\u610f\u3000GML \u306f\u5730\u7406\u5ea7\u6a19\u3092\u7def\u5ea6-\u7d4c\u5ea6\u306e\u9806\u306b\u8868\u73fe\u3059\u308b\uff0eWKT \u3084 WKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u306f\u9006\u9806\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000GML \u8868\u73fe\u3092\u4f7f\u3063\u3066 Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\uff0c\u6211\u3005\u306f geometry \u578b\u3084 geography \u578b\u306e GeomFromGml() \u9759\u7684\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\uff0e\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>DECLARE @gml xml;\nSET @gml = '\n&lt;Point xmlns=\"http:\/\/www.opengis.net\/gml\"&gt;\n&lt;pos&gt;40.4 -2.31667&lt;\/pos&gt;\n&lt;\/Point&gt;\n';\nDECLARE @Point geometry;\nSET @Point = geometry::GeomFromGML(@gml, 4326)<\/pre>\n<p>\u3000\u5909\u6570 @Point \u306f\u4eca\u3084 geomtry \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4fdd\u6301\u3057\u3066\u304a\u308a\uff0c\u6211\u3005\u304c GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u3067\u63d0\u4f9b\u3057\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\uff0ex \u5ea7\u6a19\u306f 40.4 \u3067 y \u5ea7\u6a19\u306f -2.31667 \u3067\u3042\u308a\uff0cSRID 4326 \u306b\u57fa\u3065\u304f\uff0e\u3053\u306e\u4f8b\u3067\u601d\u3044\u51fa\u3057\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u306f\uff0cgeometry \u578b\u306f\u5e73\u9762\u306e\u5730\u9762\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u6b63\u8ddd\u5186\u7b52\u56f3\u6cd5\u3067\u306e y \u304a\u3088\u3073 x \u3092\u76f4\u63a5\u5730\u56f3\u306b\u30de\u30c3\u30d7\u3057\u305f\u7def\u5ea6\u3068\u7d4c\u5ea6\u306e\u5024\u3092\u7528\u3044\u308c\u3070\uff0c\u5730\u7406\u5ea7\u6a19\u7cfb\u306b\u57fa\u3065\u304f\u4f4d\u7f6e\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u3053\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6b63\u78ba\u306b\u751f\u6210\u3055\u308c\u305f\u304b\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\uff0c\u3053\u306e Point \u306e WKT \u8868\u73fe\u3092\u9078\u629e\u3057\uff0cSTAsText() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\uff0e<\/p>\n<pre>SELECT @Point.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\uff0e<\/p>\n<pre>POINT (40.4 -2.31667)<\/pre>\n<p>\u3000\u7def\u5ea6\u3068\u7d4c\u5ea6\u306e\u5730\u7406\u5ea7\u6a19\u3092\u4f7f\u3046\u7a7a\u9593\u53c2\u7167\u7cfb EPSGL4326 \u306b\u57fa\u3065\u304f\u70b9\u3092\u5b9a\u7fa9\u3057\u305f\u305f\u3081\uff0c\u304a\u305d\u3089\u304f geometry \u578b\u3092\u4f7f\u3046\u3088\u308a\u3082 geography \u578b\u3092\u4f7f\u3046\u307b\u3046\u304c\u3088\u308a\u9069\u5207\u3060\u308d\u3046\uff0e\u3053\u306e\u305f\u3081\uff0c\u6211\u3005\u306f\u4ee3\u308f\u308a\u306b geography \u578b\u306e GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<pre>DECLARE @gml xml;\nSET @gml = '\n&lt;Point xmlns=\"http:\/\/www.opengis.net\/gml\"&gt;\n  &lt;pos&gt;40.4 -2.31667&lt;\/pos&gt;\n&lt;\/Point&gt;\n';\nDECALRE @Point geography;\nSET @Point = geography::GeomFromGML(@gml, 4326)\nSELECT @Point.STAsText()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>POINT (-2.31667 40.4)<\/pre>\n<p>\u3000\u5ea7\u6a19\u306e\u9806\u756a\u304c\u9006\u8ee2\u3057\u3066\u3044\u308b\u306e\u306b\u6c17\u304c\u3064\u3044\u305f\u3060\u308d\u3046\u304b\uff0e\u6700\u521d\u306e\u4f8b\u3067\u306f\uff0c\u76f4\u4ea4\u5ea7\u6a19\u3092 x-y \u9806\u306e geometry \u578b\u306e GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u306b\u901a\u3057\u305f\uff0e\u3059\u308b\u3068 STAsText() \u3092\u4f7f\u3063\u3066\u8868\u73fe\u3057\u305f\u7d50\u679c\u3068\u540c\u3058\u9806\u3067\u3042\u3063\u305f\uff0e\u3057\u304b\u3057\uff0c\u4e8c\u756a\u76ee\u306e\u4f8b\u3067\u306f geography \u578b\u306b\u5fc5\u8981\u306a\u5730\u7406\u5ea7\u6a19\u3092\u8a18\u8ff0\u3057\u305f\u306e\u306b\uff0cGeomFromGml() \u306f\u7def\u5ea6-\u7d4c\u5ea6\u306e\u9806\u3067\u305d\u306e\u5ea7\u6a19\u3092\u53d7\u3051\u53d6\u308a\uff0cSTAsText() \u306f\u7d50\u679c\u3092\u7d4c\u5ea6-\u7def\u5ea6\u3068\u3057\u3066\u901a\u8a33\u3057\u305f\uff0e<\/p>\n<p>\u3000\u6700\u521d\u306e\u4f8b\u3067\u306e\u300c\u975e\u6295\u5f71\u300dgeometry \u578b\u306e Point \u3068\u7b49\u3057\u3044 Point \u3092\u751f\u6210\u3059\u308b\u305f\u3081\uff0c\u3064\u307e\u308a\u7d4c\u5ea6\u304c x \u306b\u30de\u30c3\u30d7\u3055\u308c\u7def\u5ea6\u304c y \u306b\u30de\u30c3\u30d7\u3055\u308c\u308b\u3088\u3046\u306b\uff0c\u6211\u3005\u306f\u5ea7\u6a19\u3092\u53d6\u308a\u66ff\u3048\u3066 GeomFromGml() \u306b\u901a\u3059\u5fc5\u8981\u304c\u3042\u308b\uff0e\u6b21\u306e\u3088\u3046\u306b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;Point xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;-2.31667 40.4&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000geography \u578b\u306e GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3055\u308c\u305f\u6642\u306b\u306f\uff0cWKT \u3067\u8868\u73fe\u3059\u308b\u3068\uff0c\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\uff0e<\/p>\n<pre>POINT (40.4 -2.31667)<\/pre>\n<h4>GML \u304b\u3089 LineString \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000GML \u306b\u304a\u3044\u3066\u5358\u4e00\u306e Point \u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\uff0c\u5148\u8ff0\u3057\u305f\u4f8b\u3067\u8ff0\u3079\u305f\u3088\u3046\u306b\uff0c&lt;pos&gt; \u8981\u7d20\u5185\u306b\u542b\u307e\u308c\u308b\u5ea7\u6a19\u5024\u3092\u7279\u5b9a\u3059\u308b\uff0e\u5358\u72ec\u306e LineString \u3092\u751f\u6210\u3059\u308b\u3068\u304d\u3084\uff0c\u5b9a\u7fa9\u5185\u306b\u4e00\u70b9\u4ee5\u3088\u308a\u591a\u304f\u3092\u8981\u3059\u308b\u4ed6\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u3068\u304d\u306b\u306f\uff0c\u4ee3\u308f\u308a\u306b &lt;poslist&gt; \u8981\u7d20\u3092\u4f7f\u3046\uff0eGML \u306b\u304a\u3044\u3066\u306f\u3059\u3079\u3066\u306e\u70b9\u306f\u6b63\u78ba\u306b\uff12\u3064\u306e\u5ea7\u6a19\u3092\u6301\u3064\u305f\u3081\uff0c\u5404\u70b9\u306e\u9593\u306b\u4ed8\u52a0\u7684\u306a\u30c7\u30ea\u30df\u30bf\u306f\u4e0d\u8981\u3067\u3042\u308b\uff0e&lt;poslist&gt; \u5185\u90e8\u3067\u306f\uff0cLineString \u5185\u306e\u5404\u70b9\u306e\u5ea7\u6a19\u5024\u306f\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\uff0c\u5404\u5ea7\u6a19\u30da\u30a2\u9593\u306e\u30b3\u30f3\u30de\u306f\u5fc5\u8981\u3068\u3057\u306a\u3044\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u30b3\u30fc\u30c9\u4f8b\u306f\u70b9 (-6, 4) \u3068\u70b9 (3, -5) \u3092\u7d50\u3076 LineString \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e GML \u8868\u73fe\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;LineString xmlns=&#8221;http:\/\/www.opengis.net\/xml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;-6 4 3 -5&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LineString&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u3053\u306e GML \u304b\u3089\u751f\u6210\u3055\u308c\u305f LineString \u306eWKT \u8868\u73fe\u306f\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>LINESTRING (-6 4, 3 -5)<\/pre>\n<p>\u6ce8\u610f\u3000WKT \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u7570\u306a\u308a\uff0cGML \u8868\u73fe\u3067\u306f\u70b9\u3092\u533a\u5207\u308b\u30b3\u30f3\u30de\u306f\u5b58\u5728\u3057\u306a\u3044\uff0e<\/p>\n<h4>GML \u304b\u3089 Polygon \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000LineString \u306e\u5b9a\u7fa9\u3067\u898b\u305f\u3088\u3046\u306b\uff0cPolygon \u306e\u30ea\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\u5404\u70b9\u306e\u5ea7\u6a19\u5024\u306f\u30b9\u30da\u30fc\u30b9\u3067\u533a\u5207\u3089\u308c\u305f\u30ea\u30b9\u30c8\u3067\u8868\u73fe\u3055\u308c\uff0c&lt;poslist&gt; \u8981\u7d20\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\uff0e\u9589\u3058\u305f LineString \u306e\u8868\u73fe\u3092\u542b\u3080\u70b9\u306e\u30ea\u30b9\u30c8\u3068\u533a\u5225\u3059\u308b\u305f\u3081\uff0c\u4e00\u3064\u306e Polygon \u30ea\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\u5404 &lt;poslist&gt; \u8981\u7d20\u306f &lt;LinearRIng&gt;&#8230;&lt;\/LinearRing&gt; \u30bf\u30b0\u3067\u30cd\u30b9\u30c8\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000\u3059\u3079\u3066\u306e GML Polygon \u8868\u73fe\u306f\u4e00\u3064\u306e &lt;LinearRIng&gt; \u8981\u7d20\u3092 Polygon \u5b9a\u7fa9\u306e &lt;exterior&gt; \u8981\u7d20\u5185\u90e8\u306b\u542b\u307e\u306a\u3051\u308c\u3070\u306a\u3089\u305a\uff0c\u305d\u308c\u306f\u305d\u306e\u30dd\u30ea\u30b4\u30f3\u306e\u5916\u5468\u7e01\u3092\u5f62\u4f5c\u308b\u70b9\u3092\u5b9a\u7fa9\u3059\u308b\uff0eGML \u306f\uff0cPolygon \u89aa\u8981\u7d20\u306e &lt;interior&gt; \u8981\u7d20\u5185\u306b\u4ed8\u52a0\u7684\u306a\u4e00\u3064\u306a\u3044\u3057\u305d\u308c\u4ee5\u4e0a\u306e &lt;LinearRing&gt; \u8981\u7d20\u3092\u8b58\u5225\u3059\u308b\u304b\u3082\u3057\u308c\u306a\u3044\uff0e\u305d\u308c\u306f\u30dd\u30ea\u30b4\u30f3\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u5b9a\u7fa9\u3059\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u30b3\u30fc\u30c9\u4f8b\u306f\uff13\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080 Polygon \u306e GML \u8868\u73fe\u3092\u793a\u3059\uff0e\u4e00\u3064\u306f\u5916\u90e8\u30ea\u30f3\u30b0\uff0c\uff12\u3064\u306fPolygon \u306e\u5f62\u3092\u5207\u308a\u629c\u304f\u5185\u90e8\u30ea\u30f3\u30b0\u3067\u3042\u308b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;Polygon xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;0 0 100 0 100 100 0 100 0 0&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;interior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;10 10 20 10 20 20 10 20 10 10&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/interior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;interior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;75 10 80 10 80 20 75 20 75 10&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/interior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Polygon&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>GML \u304b\u3089 MultiPoint \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000GML \u306b\u304a\u3044\u3066 MultiPoint \u3092\u5b9a\u7fa9\u3059\u308b\u89aa\u8981\u7d20\u306f &lt;MultiPoint&gt; \u30bf\u30b0\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0eMultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306b\u542b\u307e\u308c\u308b\u500b\u3005\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u9806\u756a\u306b\u5b9a\u7fa9\u3055\u308c\uff0c\u500b\u5225\u306e Point \u3068\u3057\u3066\u6b63\u78ba\u306b\u540c\u3058\u69cb\u6587\u3092\u4f7f\u3044\uff0c&lt;pointMembers&gt; \u3068\u547c\u3070\u308c\u308b\u5b50\u8981\u7d20\u306e\u5185\u90e8\u306b\u30cd\u30b9\u30c8\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\uff12\u3064\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080 MultiPoint \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e GML \u8868\u73fe\u3092\u793a\u3059\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;MultiPoint xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pointMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;2 3&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;4 10&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/PointMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/MultiPoint&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>GML \u304b\u3089 MultiLIneString \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000GML \u306b\u304a\u3044\u3066\u4e00\u3064\u4ee5\u4e0a\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8a18\u8ff0\u3059\u308b\u3068\u304d\uff0c\u89aa\u8981\u7d20\u306f\u5b9f\u969b\u306b\u306f MultiLineString \u3088\u308a\u3082 LultiCurve \u3067\u3042\u308b\uff0e\u7b2c\uff13\u7ae0\u3067\u6211\u3005\u304c geometry \u578b\u3068 geography \u578b\u3067\u968e\u5c64\u6728\u306e\u7d99\u627f\u3092\u8abf\u3079\u305f\u3053\u3068\u3092\u60f3\u8d77\u3059\u308b\u304b\u3082\u3057\u308c\u306a\u3044\uff0eMultiLineString \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u5225\u7a2e\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff0cMultiCurve \u3068\u547c\u3070\u308c\u308b\u3082\u306e\u306b\u7531\u6765\u3059\u308b\u3053\u3068\u3092\u968e\u5c64\u6728\u306f\u793a\u3057\u305f\uff0eMultiCurve \u306f\u4efb\u610f\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u305f\u3081\u306e\u6c4e\u7528\u7684\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u578b\u3067\u3042\u308a\uff0c\u7570\u306a\u308b\u4e00\u9023\u306e\u70b9\u7fa4\u9593\u306e\u7d4c\u8def\u306e\u591a\u304f\u3092\u751f\u6210\u3059\u308b\u3082\u306e\u3067\uff0c\u4e00\u65b9\u3067 MultiLineString \u306f MultiCurve \u306e\u7279\u6b8a\u306a\u4f8b\u3067\u3042\u308a\uff0c\u305d\u3053\u3067\u306f\u305d\u308c\u3089\u306e\u7d4c\u8def\u306f\u70b9\u306e\u9593\u3067\u7dda\u5f62\u88dc\u9593\u306b\u3088\u308a\u8a08\u7b97\u3055\u308c\u308b\uff0eMultiCurve \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u76f4\u63a5\u751f\u6210\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u304c\uff0cGML \u8868\u73fe\u306f\u6b21\u306e\u4e8b\u5b9f\u3092\u63cf\u5199\u3059\u308b\uff0e\u3064\u307e\u308aMultiLineString \u306f MultiCurve \u306e\u4e0b\u4f4d\u4e92\u63db\u3067\u3042\u308b\uff0eMultiCurve \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e LineString \u8981\u7d20\u306f\u305d\u308c\u3089\u304c\u500b\u3005\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u3063\u305f\u5834\u5408\u3068\u540c\u3058\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8868\u73fe\u3055\u308c\uff0c&lt;curveMembers&gt; \u3068\u547c\u3070\u308c\u308b MultiCurve \u306e\u5b50\u8981\u7d20\u5185\u3067\u9806\u756a\u306b\u5217\u6319\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u30b3\u30fc\u30c9\u4f8b\u306f\uff12\u3064\u306e LineString \u3092\u542b\u3080 MultiLineString \u306e GML \u8868\u73fe\u3092\u793a\u3059\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;MultiCurve xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;curveMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;poslist&gt;2 3 4 10&lt;\/poslist&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;poslist&gt;4 10 15 40&lt;\/poslist&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/curveMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/MultiCurve&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>GML \u304b\u3089 MultiPolygon \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000\u8907\u6570\u306e Polygon \u8981\u7d20\u3092\u542b\u3080 GML \u8981\u7d20\u306f MultiSurface \u3068\u547c\u3070\u308c\u308b\uff0eMultiSurface \u5185\u90e8\u3067\u306f\uff0c\u5404\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30e1\u30f3\u30d0\u30fc\u306e\u5b9a\u7fa9\u306f &lt;surfaceMembers&gt; \u3068\u547c\u3070\u308c\u308b\u8981\u7d20\u306b\u542b\u307e\u308c\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u4f8b\u3067\u306f\uff12\u3064\u306e Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u6709\u3057\uff0c\u305d\u308c\u305e\u308c\u304c\u4e00\u3064\u306e\u30d5\u30a1\u30a4\u30d6\u30ea\u30f3\u30b0\u3092\u6709\u3059\u308b MultiPolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e GML \u8868\u73fe\u3092\u5217\u6319\u3057\u3066\u3044\u308b\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;MultiSurface xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;surfaceMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;Polygon&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;2 3 5 3 6 8 2 7 2 3&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Polygon&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;Polygon&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;psoList&gt;10 20 20 20 20 30 10 30 10 20&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LinearRing&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/exterior&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Polygon&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/surfaceMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/MultiSurface&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>GML \u304b\u3089 Gemetry Collection \u3092\u751f\u6210\u3059\u308b<\/h4>\n<p>\u3000GML \u3067\u8868\u73fe\u3055\u308c\u308b Geometry Collection \u306e\u89aa\u8981\u7d20\u306f MultiGeometry \u3068\u547c\u3070\u308c\u308b\uff0e\u305d\u306e\u69cb\u6210\u8981\u7d20\u306f\u305d\u308c\u3086\u3048\u958b\u59cb\u30bf\u30b0 &lt;MultiGeomtery&gt; \u3068\u7d42\u4e86\u30bf\u30b0 &lt;\/MultiGeometry&gt; \u306e\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\uff0e\u4ed6\u3067\u898b\u305f\u3088\u3046\u306b\uff0c\u7279\u7570\u7684\uff0c\u591a\u8981\u7d20\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\uff0cMultiAGeometry \u5185\u306b\u542b\u307e\u308c\u308b\u500b\u3005\u306e\u72ec\u7acb\u3057\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\uff0c&lt;geometryMembers&gt; \u3068\u547c\u3070\u308c\u308b\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u4ed8\u52a0\u7684\u306a\u8981\u7d20\u5185\u90e8\u306b\u30cd\u30b9\u30c8\u3055\u308c\u308b\uff0e<\/p>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u4e00\u3064\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3068\u4e00\u3064\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080 Geometry Collection \u306e GML \u8868\u73fe\u3092\u793a\u3059\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;MultiGeomtery xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;geometryMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;pos&gt;15 10&lt;\/pos&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/Point&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;4 10 2 3&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LineString&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/geometryMembers&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/MultiGeometry&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u4ed6\u306e GML \u30b8\u30aa\u30e1\u30c8\u30ea\u8868\u73fe\u3067\u898b\u305f\u3088\u3046\u306b\uff0c geometry \u578b\u3067\u3082 geography \u578b\u3067\u3082\u305d\u308c\u3089\u3092 GeomFromGml() \u30e1\u30bd\u30c3\u30c9\u306b\u901a\u3059\u3053\u3068\u3067\uff0c\u3053\u306e\u8868\u73fe\u306b\u57fa\u3065\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u65e2\u5b58\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092 GML \u3068\u3057\u3066\u8868\u73fe\u3059\u308b<\/h4>\n<p>\u3000WKT \u3084 WKB \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u307f\u305f\u3088\u3046\u306b\uff0cSQL Server \u3082\u307e\u305f\u65e2\u5b58\u306e geometry \u578b\u3084 geography \u578b\u306e GML \u3067\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u3046\u30e1\u30bd\u30c3\u30c9\uff0cAsGml() \u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u306f WKT \u304b\u3089 LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\uff0c\u3064\u3044\u3067\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e GML \u8868\u73fe\u3092 AsGml() \u3092\u4f7f\u3063\u3066\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @LineString geometry\nSET @LineString = geometry::STLineFromText('LINESTRING(0 0, 12 10, 15 4)', 0)\nSELECT @LineString.AsGml()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<table>\n<tbody>\n<tr>\n<td>&lt;LineString xmlns=&#8221;http:\/\/www.opengis.net\/gml&#8221;&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;posList&gt;0 0 12 10 15 4&lt;\/posList&gt;<\/td>\n<\/tr>\n<tr>\n<td>&lt;\/LineString&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>POINT() \u3092\u4f7f\u3063\u3066POINTS \u3092\u751f\u6210\u3059\u308b<\/h5>\n<p>\u3000geometry \u578b\u3067\u3082 geography \u578b\u3067\u3082Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3057\u305f\u3044\u3060\u3051\u306a\u3089\uff0c\u305d\u308c\u3089\u306e\u70b9\u3092\u8868\u73fe\u3059\u308b\u7279\u7570\u7684\u306a\u8a00\u8a9e\u3092\u4f7f\u7528\u3059\u308b\u307e\u3067\u3082\u306a\u3044\uff0e\u305d\u308c\u3089\u306f\uff13\u3064\u306e\u6570\u5024\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u5341\u5206\u306b\u8a18\u8ff0\u3067\u304d\u308b\uff0ex \uff08\u307e\u305f\u306f\u7d4c\u5ea6\uff09\uff0cy \uff08\u307e\u305f\u306f\u7def\u5ea6\uff09\uff0c\u305d\u3057\u3066 SRID \u3067\u3042\u308b\uff0e\u3053\u306e\u4f8b\u3067\u306f\uff0c\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306b\u672c\u7ae0\u3067\u8aac\u660e\u3057\u3066\u304d\u305f\u5c02\u7528\u8a00\u8a9e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u5fc5\u8981\u306f\u306a\u3044\uff0e\u4ee3\u308f\u308a\u306b Point() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\uff0e<\/p>\n<p>\u3000Point() \u30e1\u30bd\u30c3\u30c9\u306f\uff13\u3064\u306e\u5f15\u6570\u3092\u53d6\u308b\uff0e\u7def\u5ea6\uff08\u307e\u305f\u306f x\uff09\uff0c\u7d4c\u5ea6\uff08\u307e\u305f\u306f y\uff09\u304a\u3088\u3073 SRID \u3067\u3042\u308b\u304c\uff0cgeometry \u578b\u3067\u3082 geography \u578b\u3067\u3082 Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\uff0c\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8003\u3048\u3066\u307f\u308b\uff0e<\/p>\n<pre>SELECT\ngeography::Point(41, -87, 4269)<\/pre>\n<p>\u3000\u3053\u306e\u4f8b\u3067\u306f geography \u578b\u306e\u7def\u5ea6 41 \u5ea6\u7d4c\u5ea6 -87 \u5ea6\u306e Point \u3092 SRID 4269 \u3092\u4f7f\u3063\u3066\u751f\u6210\u3059\u308b\uff0e<\/p>\n<h3>\u8981\u7d04<\/h3>\n<p>\u3000\u672c\u7ae0\u3067\u306f geography \u578b\u3068 geometry \u578b\u306e\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u3066\u4f7f\u3046\u305f\u3081\u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u305d\u308c\u305e\u308c\u3092\u7d39\u4ecb\u3057\u305f\uff0e\u591a\u304f\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u4f7f\u7528\u3067\u304d\uff0c\uff13\u3064\u306e\u7570\u306a\u308b\u6a19\u6e96\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u57fa\u3065\u3044\u3066\u304a\u308a\uff0c\u7a7a\u9593\u60c5\u5831\u3092\u8868\u73fe\u3067\u304d\u308b\uff0eWell-Known Text (WKT), Well_Known Binary (WKB) \u304a\u3088\u3073 Geography Markup Language (GML) \u3067\u3042\u308b\uff0e<\/p>\n<ul>\n<li>\u305d\u308c\u305e\u308c\u306e\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u3074\u3063\u305f\u308a\uff12\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u5fc5\u8981\u3068\u3059\u308b\uff0e\u7a7a\u9593\u53c2\u7167\u7cfb\u306b\u4f7f\u7528\u3055\u308c\u308b SRID \u3068\uff0cWKT, WKB \u3042\u308b\u3044\u306f GML \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u8868\u73fe\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u8868\u73fe\u3067\u3042\u308b\uff0e<\/li>\n<li>WKT, WKB \u304a\u3088\u3073 GML \u8868\u73fe\u306b\u306f\u305d\u308c\u305e\u308c\u9577\u6240\u3068\u6b20\u70b9\u304c\u3042\u308b\uff0e\u4e00\u822c\u7684\u306b\u8a00\u3048\u3070\uff0cWKT \u306f\u7406\u89e3\u3059\u308b\u306b\u306f\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u3067\uff0cWKB \u304c\u6700\u3082\u901f\u304f\uff0c\u305d\u3057\u3066 GML \u304c\u6700\u3082\u69cb\u9020\u5316\u3055\u308c\u3066\u3044\u308b\uff0e<\/li>\n<li>\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u3092 WKT \u307e\u305f\u306f WKB \u304b\u3089\u751f\u6210\u3059\u308b\u6642\u306b\u306f\uff0c\u5404\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\uff08Point, LineString, Polygon \u304a\u3088\u3073 multielement \u578b\uff09\u306b\u5fdc\u3058\u305f\u7279\u7570\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u304c\u5b58\u5728\u3059\u308b\uff0e\u6c4e\u7528\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066 STGeomFromText() \u304a\u3088\u3073 STGeomFromWKB() \u306a\u3069\u3067\u3042\u308b\uff0e\u5bfe\u7167\u7684\u306b\uff0c GML \u304b\u3089\u751f\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306f\u3059\u3079\u3066\u540c\u3058 GeomFromGML() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\uff0e<\/li>\n<li>Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u306b\u306f Point() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3067\u304d\u308b\u304c\uff0c\u305d\u308c\u306b\u5fc5\u8981\u306a\u306e\u306f\uff12\u3064\u306e\u5ea7\u6a19\u5024\u3068\u305d\u306e\u5ea7\u6a19\u3092\u95a2\u9023\u3065\u3051\u308b SRID \u3060\u3051\u3067\u3042\u308b\uff0e<\/li>\n<li>\u3053\u308c\u3089\u306e\u5404\u3005\u306e\u8868\u73fe\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u52a0\u3048\u3066\uff0cSQL Server \u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 WKT, WKB \u304a\u3088\u3073 GML \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u3046\u305f\u3081\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30e1\u30bd\u30c3\u30c9\u3082\u63d0\u4f9b\u3057\u3066\u3044\u308b\uff0e\u3053\u306e\u6a5f\u80fd\u306f STAsText(), STAsBinary() \u304a\u3088\u3073 AsGML() \u30e1\u30bd\u30c3\u30c9\u3067\u63d0\u4f9b\u3055\u308c\u308b\uff0e<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c 2 \u90e8\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3059\u308b \u3000\u672c\u66f8\u306e\u3053\u306e\u90e8\u3067\u306f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092 SQL Server 2008 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u69d8\u3005\u306a\u65b9\u6cd5\u3092\u8aac\u660e\u3059\u308b\uff0e\u7b2c 4 \u7ae0\u3067\u306f\uff0c\u65e2\u77e5\u306e\u5ea7\u6a19\u304b\u3089\u3044\u304b\u306a\u308b\u30a2\u30a4\u30c6\u30e0\u3092\u3082\u751f\u6210\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\u5b58\u5728\u3059\u308b &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=11180\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u7b2c 4 \u7ae0\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b (Beginning Spatial with SQL Server 2008)&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":15391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[12262,12256,12270,12257,12253,12251,12263,12268,12260,12266,12247,12259,12248,12250,12265,12261,12254,12269,12255,12252,12230,12235,12234,12267,12233,12232,12236,12229,12258,12231,7616,12249,12264,7186,1418,12271,7596,7180,12220,7752,7450,7587,7261,7724,7541,12242,12227,555,6745,7138,7605,7139,266,7263,7262,7264,12225,12224,7465,7602,4569,12272,7727,4657,2740,2750,7448,7589,7593,12188,12189,7452,2872,6768,12243,12244,12223,12053,7540,7464,12241,12221,7591,691,7816,2796,4958,2861,460,3100,2783,2937,4012,9582,1805,7024,462,32,2499,12238,8517,3900,7507,12226,4255,7270,7635,4552,7216,7238,11943,12273,4071,2703,7247,4453,665,7294,2759,7636,4503,252,12240,7274,7245,12237,1262,3939,380,7152,7446,7732,7275,12246,2944,11903,3592,12149,5391,7400,7769,4257,7543,7194,7181,7191,12222,3677,4016,7234,12187,4017,4535,12239,2506,7563,6091,12245,12228,3992,7542,4023],"class_list":{"0":"post-11180","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-technology","8":"tag-curvemembers-2","9":"tag-exterior-3","10":"tag-geometrymembers-2","11":"tag-interior-3","12":"tag-linearring-2","13":"tag-linestring-3","14":"tag-multicurve-2","15":"tag-multigeometry-2","16":"tag-multipoint-3","17":"tag-multisurface-2","18":"tag-point-3","19":"tag-pointmembers-2","20":"tag-pos-2","21":"tag-poslist-2","22":"tag-surfacemembers-2","23":"tag-curvemembers","24":"tag-exterior-2","25":"tag-geometrymembers","26":"tag-interior-2","27":"tag-linearring","28":"tag-linestring-2","29":"tag-multicurve","30":"tag-multigeometry","31":"tag-multigeomtery","32":"tag-multilinestring-2","33":"tag-multipoint-2","34":"tag-multisurface","35":"tag-point-2","36":"tag-pointmembers","37":"tag-polygon-2","38":"tag-pos","39":"tag-poslist","40":"tag-surfacemembers","41":"tag-net-2","42":"tag-1418","43":"tag-asgml","44":"tag-astextzm","45":"tag-beginning-spatial-with-sql-server-2008","46":"tag-byteorder","47":"tag-declare","48":"tag-epsg","49":"tag-geography","50":"tag-geometry-collection","51":"tag-geometry","52":"tag-gml","55":"tag-gps","56":"tag-insert","57":"tag-latitude","58":"tag-linestring","59":"tag-longitude","60":"tag-microsoft","61":"tag-multilinestring","62":"tag-multipoint","63":"tag-multipolygon","64":"tag-numgeometries","65":"tag-numrings","66":"tag-ogc","67":"tag-open-geospatial-consortium","68":"tag-point","69":"tag-point-4","70":"tag-polygon","71":"tag-set","72":"tag-sql-server","73":"tag-sql-server-management-studio","74":"tag-srid","75":"tag-stastext","76":"tag-stpointfromtext","77":"tag-stsrid-2","78":"tag-stsrid","79":"tag-sys-spatial_reference_systems","80":"tag-t-sql","81":"tag-type","82":"tag-uniform-resource-identifier","83":"tag-uri","84":"tag-varbinarymax","85":"tag-well-known-text-2","86":"tag-wkb","87":"tag-wkt","88":"tag-xml","89":"tag-y","90":"tag-z","91":"tag-691","92":"tag-7816","93":"tag-2796","94":"tag-4958","95":"tag-2861","96":"tag-460","97":"tag-3100","98":"tag-2783","99":"tag-2937","100":"tag-4012","101":"tag-9582","102":"tag-1805","103":"tag-7024","104":"tag-462","105":"tag-32","106":"tag-2499","107":"tag-12238","108":"tag-8517","109":"tag-3900","110":"tag-7507","111":"tag-12226","112":"tag-4255","113":"tag-7270","114":"tag-7635","115":"tag-4552","116":"tag-7216","117":"tag-7238","118":"tag-11943","119":"tag-12273","120":"tag-4071","121":"tag-2703","122":"tag-7247","123":"tag-4453","124":"tag-665","125":"tag-7294","126":"tag-2759","127":"tag-7636","128":"tag-4503","129":"tag-252","130":"tag-12240","131":"tag-7274","132":"tag-7245","133":"tag-12237","134":"tag-1262","135":"tag-3939","136":"tag-380","137":"tag-7152","138":"tag-7446","139":"tag-7732","140":"tag-7275","142":"tag-2944","143":"tag-11903","144":"tag-3592","145":"tag-12149","146":"tag-5391","147":"tag-7400","148":"tag-7769","149":"tag-4257","150":"tag-7543","151":"tag-7194","152":"tag-7181","153":"tag-7191","154":"tag-12222","155":"tag-3677","156":"tag-4016","157":"tag-7234","158":"tag-12187","159":"tag-4017","160":"tag-4535","161":"tag-12239","162":"tag-2506","163":"tag-7563","164":"tag-6091","165":"tag-12245","166":"tag-12228","167":"tag-3992","168":"tag-7542","169":"tag-4023"},"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/11180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11180"}],"version-history":[{"count":266,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/11180\/revisions"}],"predecessor-version":[{"id":17238,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/11180\/revisions\/17238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/media\/15391"}],"wp:attachment":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}