{"id":15956,"date":"2022-12-01T06:00:00","date_gmt":"2022-11-30T21:00:00","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=15956"},"modified":"2022-10-12T14:20:11","modified_gmt":"2022-10-12T05:20:11","slug":"%e7%ac%ac-11-%e7%ab%a0%e3%80%80%e7%a9%ba%e9%96%93%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e3%81%ae%e3%83%97%e3%83%ad%e3%83%91%e3%83%86%e3%82%a3%e3%82%92%e6%a4%9c%e6%9f%bb%e3%81%99","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=15956","title":{"rendered":"\u7b2c 11 \u7ae0\u3000\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u691c\u67fb\u3059\u308b(Begining Spatial with SQL Server 2008)"},"content":{"rendered":"\n<h1>\u7b2c 4 \u90e8\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u89e3\u6790<\/h1>\n<p>\u3000\u672c\u66f8\u306e\u3053\u306e\u90e8\u3067\u306f\uff0cgeography \u578b\u304a\u3088\u3073 geometry \u578b\u3067\u30c7\u30fc\u30bf\u3092\u30d5\u30a3\u30eb\u30bf\u30fc\u3057\u89e3\u6790\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u8ad6\u305a\u308b\uff0e\u305d\u308c\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u529b\u3092\u958b\u767a\u3059\u308b\u306e\u306b\u4f7f\u3046\u306e\u306b\u5fc5\u8981\u306a\u4e3b\u8981\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u308b\uff0e<br \/>\u3000\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306f3\u3064\u306e\u30ab\u30c6\u30b4\u30ea\u306b\u5206\u985e\u3055\u308c\u308b\uff0e\u7ae0\u3054\u3068\u306b\u4e00\u3064\uff0e\u7b2c11\u7ae0\u3067\u306f\u500b\u5225\u306e\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u89e3\u6790\u3057\u3066\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9\u3092\u6271\u3046\uff0e\u7b2c12\u7ae0\u3067\u306f\u65e2\u5b58\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u9593\u306e\u7d44\u307f\u5408\u308f\u305b\u307e\u305f\u306f\u4fee\u98fe\u306e\u9593\u306e\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5b9a\u7fa9\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u30ab\u30d0\u30fc\u3059\u308b\uff0e\u7b2c13\u7ae0\u3067\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u9593\u306e\u95a2\u4fc2\u3092\u30c6\u30b9\u30c8\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u7d39\u4ecb\u3059\u308b\uff0e\u4f8b\u3048\u3070\u540c\u4e00\u6027\uff0c\u8fd1\u63a5\u6027\uff0c\u4ea4\u5dee\u306a\u3069\u3067\u3042\u308b\uff0e<\/p>\n<p><!--more--><\/p>\n<h2>\u7b2c 11 \u7ae0\u3000\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u691c\u67fb\u3059\u308b<\/h2>\n<p>\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u500b\u3005\u306e\u30a2\u30a4\u30c6\u30e0\u306b\u3064\u3044\u3066\u591a\u304f\u306e\u7570\u306a\u308b\u8cea\u554f\u304c\u6e67\u3044\u3066\u304d\u3066\u3044\u308b\u3068\u601d\u3046\uff0e\u305d\u308c\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\uff1f\u305d\u308c\u306f\u3069\u308c\u304f\u3089\u3044\u5927\u304d\u3044\u306e\u304b\uff1f\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3069\u3093\u306a\u7a2e\u985e\u306a\u306e\u304b\uff1f\u305d\u308c\u306f\u3069\u3053\u304b\u3089\u59cb\u307e\u308a\u3069\u3053\u3067\u7d42\u308f\u308b\u306e\u304b\uff1f\u305d\u306e\u4e2d\u5fc3\u306f\u3069\u3053\u306b\u4f4d\u7f6e\u3059\u308b\u306e\u304b\uff1f\u672c\u7ae0\u3067\u306f\uff0cSQL Server \u304c\u63d0\u4f9b\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u30c6\u30b9\u30c8\u3057\u3066\u3053\u308c\u3089\u5168\u3066\u304a\u3088\u3073\u305d\u308c\u4ee5\u4e0a\u306e\u8cea\u554f\u306b\u7b54\u3048\u3088\u3046\u3068\u601d\u3046\uff0e\u672c\u7ae0\u3067\u8ad6\u305a\u308b\u3059\u3079\u3066\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5358\u4e00\u306e geometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u30a2\u30a4\u30c6\u30e0\u306b\u9069\u7528\u3059\u308b\u3060\u3051\u3067\uff0c\u4e00\u822c\u306b\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u3082\u8981\u3057\u306a\u3044\uff0e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u6a19\u6e96\u7684\u306a\u69cb\u6587\u306f\u6545\u306b\u6b21\u306b\u793a\u3059\u3088\u3046\u306b\u306a\u308b\uff0e<\/p>\n<pre>Instance.Property<\/pre>\n<p>\u3053\u3053\u3067\u8a00\u3046 Instance \u306f\u554f\u3044\u5408\u308f\u305b\u305f\u3044\u60c5\u5831\u306b\u95a2\u9023\u3059\u308b\u5217\u307e\u305f\u306f\u5909\u6570\u306e\u540d\u524d\u3067\u3042\u308a\uff0cProperty \u306f\u554f\u984c\u306e\u7279\u5b9a\u306e\u540d\u524d\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u3042\u308b\u4f8b\u3067\u306f\uff0c\u30a2\u30a4\u30c6\u30e0\u306b\u95a2\u3059\u308b\u60c5\u5831\u306e\u7279\u5b9a\u306e\u5074\u9762\u306f\u53b3\u5bc6\u306b\u306f\u305d\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u306f\u306a\u304f\uff0c\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3067\u3042\u308b\u3053\u3068\u304c\u3042\u308a\uff0c\u305d\u306e\u5834\u5408\u306e\u9069\u5207\u306a\u69cb\u6587\u306f\u3053\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>Instance.Method()<\/pre>\n<p>\u4ed8\u8a18\u3000\u672c\u7ae0\u3067\u6271\u3046\u5404\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u5f97\u3089\u308c\u308b\u7d50\u679c\u3092\u7406\u89e3\u3059\u308b\u306e\u3092\u52a9\u3051\u308b\u305f\u3081\uff0c\u5404\u30e1\u30bd\u30c3\u30c9\u306f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u30ea\u30b9\u30c8\u3068\u5171\u306b\u56f3\u793a\u3057\u3088\u3046\uff0e\u30b3\u30fc\u30c9\u30ea\u30b9\u30c8\u306f\u30e1\u30bd\u30c3\u30c9\u306e\u9069\u7528\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092 SELECT \u3057\uff0c\u305d\u306e\u7d50\u679c\u306f\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u4f7f\u308f\u308c\u305f\u3068\u304d\u306b\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u8fd4\u308a\uff0c\u4eee\u306b\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u304c geometry \u578b\u3084 geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u8fd4\u3059\u3068\u3057\u3066\u3082\uff0c\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e WKT \u8868\u73fe\u3067\u8fd4\u3059\uff0e\u51fa\u529b\u306e WKT \u8868\u73fe\u3092\u898b\u305b\u3088\u3046\uff0e\u3057\u304b\u3057\u8aad\u8005\u3082\u307e\u305f SQL Server Management Studio \u306e\u7a7a\u9593\u7d50\u679c\u30bf\u30d6\u3092\u4f7f\u3063\u3066\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u8996\u899a\u5316\u3057\u305f\u7d50\u679c\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u3000\u7b2c\uff14\u7ae0\u3067\u8ad6\u3058\u305f\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u3088\u3046\u306b\uff0c\u672c\u7ae0\u3067\u8ad6\u3058\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u306f Open Geospatial Consortium \u306b\u3088\u308b\u5b9a\u7fa9\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\uff0e\u305d\u306e\u3088\u3046\u306a\u30e1\u30bd\u30c3\u30c9\u306e\u305f\u3081\u306b\u30e1\u30bd\u30c3\u30c9\u540d\u306f\u63a5\u982d\u8f9e\u6587\u5b57\u5217 &#8220;ST&#8221; \u3092\u4ed8\u52a0\u3055\u308c\u3066\u3044\u308b\uff0e\u4f8b\u3048\u3070 STX, STCentroid(), STLength \u306a\u3069\u306e\u3088\u3046\u306b\uff0e\u3053\u308c\u3089\u591a\u304f\u306e\u6a19\u6e96\u30e1\u30bd\u30c3\u30c9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u7279\u5fb4\u7684\u306a\u632f\u308b\u821e\u3044\u3092\u898b\u305b\u308b\u306e\u304b\u3069\u3046\u304b\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\uff0e\u30b7\u30f3\u30d7\u30eb\u306a\u306e\u304b\uff0c\u9589\u3058\u3066\u3044\u308b\u306e\u304b\uff0c\u7a7a\u306a\u306e\u304b\uff1f\u3053\u308c\u3089\u306e\u3044\u304b\u306a\u308b\u554f\u3044\u3078\u306e\u7b54\u3048\u3082\u771f\u7406\u5024\u3067\u3042\u308a\uff0c\u305d\u308c\u306f\u771f\u304b\u507d\u304b\u306e\u307f\u3067\u3042\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u3042\u308b\uff0e\u305d\u306e\u3088\u3046\u306a\u5834\u5408\uff0c\u30e1\u30bd\u30c3\u30c9\u540d\u306f STIsXXX() \u3068\u3044\u3046\u306e\u304c\u4f1d\u7d71\u3067\u3042\u308a\uff0cXXX \u3068\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30c6\u30b9\u30c8\u3055\u308c\u308b\u632f\u308b\u821e\u3044\u3067\u3042\u308b\uff0e\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u8fd4\u308a\u5024\u306f 0 \u304b 1 \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\uff0e\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u554f\u984c\u306e\u632f\u308b\u821e\u3044\u3092\u793a\u3059\u306a\u3089\u305d\u306e\u53cd\u5fdc\u306f 1 \uff08\u771f\uff09\u3067\u3042\u308a\uff0c\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308b\u7279\u5fb4\u7684\u306a\u632f\u308b\u821e\u3044\u3092\u793a\u3055\u306a\u3044\u306a\u3089\u7d50\u679c\u306f 0 \uff08\u507d\uff09\u3067\u3042\u308b\uff0e<\/p>\n<p>\u6ce8\u610f\u3000\u672c\u7ae0\u3067\u8ad6\u305a\u308b\u30e1\u30bd\u30c3\u30c9\u3084\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u591a\u304f\u306f geometry \u578b\u306b\u3082 geography \u578b\u306b\u3082\u9069\u7528\u53ef\u80fd\u3067\u3042\u308b\u304c\uff0c\u3044\u304f\u3064\u304b\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u4e00\u3064\u306e\u578b\u306b\u306e\u307f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\uff0e\u7d39\u4ecb\u3059\u308b\u5404\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\uff0c\u3044\u305a\u308c\u306e\u30c7\u30fc\u30bf\u578b\u304c\u305d\u308c\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u306e\u304b\uff0c\u307e\u305f\u305d\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u3069\u3046\u4f7f\u308f\u308c\u308b\u306e\u304b\u4f1d\u3048\u3088\u3046\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u540d\u524d\u3092\u8fd4\u3059<\/h3>\n<p>\u3000geography \u578b\u3084 geometry \u578b\u306e\u30c7\u30fc\u30bf\u306e\u5358\u4e00\u306e\u30a2\u30a4\u30c6\u30e0\u306f\u3044\u304f\u3064\u304b\u306e\u7570\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u4e00\u3064\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e\u3064\u307e\u308a Point, LineString, Polygon \u304a\u3088\u3073\u3053\u308c\u3089\uff13\u3064\u3092\u542b\u3080\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u3042\u308b\uff0e\u3044\u304b\u306a\u308b\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u3082\uff0c\u305d\u306e\u6700\u3082\u57fa\u672c\u7684\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4e00\u3064\u306f\uff0c\u305d\u308c\u3086\u3048\u8a18\u8ff0\u3059\u308b\u7279\u5fb4\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3067\u3042\u308b\uff0e\u305d\u306e\u30a2\u30a4\u30c6\u30e0\u306e WKT \u3084 GML \u8868\u73fe\u306e\u76ee\u8996\u691c\u67fb\u7531\u6765\u3068\u660e\u3089\u304b\u306b\u898b\u3048\u308b\u4e00\u65b9\u3067\uff0cWKB \u8868\u73fe\u3084 SQL Server \u81ea\u8eab\u306e\u30d0\u30a4\u30ca\u30ea\u8868\u73fe\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u7531\u6765\u3068\u306f\u306f\u3063\u304d\u308a\u898b\u3048\u306a\u3044\uff0eSTGeometryType() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\uff0cgeography \u578b\u3084 geometry \u578b\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306b\u3088\u308a\u8a18\u8ff0\u3055\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u6587\u5b57\u8a18\u8ff0\u3092\u623b\u3089\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STGeometryType() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STGeometryType() \u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5fc5\u8981\u3068\u305b\u305a\uff0cgeography \u578b\u3084 geometry \u578b\u306e\u30c7\u30fc\u30bf\u30a2\u30a4\u30c6\u30e0\u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<pre>Instance.STGeometryType()<\/pre>\n<p>\u3000STGeometryType() \u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u306f nvarchar(4000) \u306e\u6587\u5b57\u5217\u3067\uff0c\u7279\u5b9a\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u308a\u8868\u73fe\u3055\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u540d\u524d\u3092\u542b\u3080\uff0e<\/p>\n<ul>\n<li>Point<\/li>\n<li>LineString<\/li>\n<li>Polygon<\/li>\n<li>MultiPoint<\/li>\n<li>MultiLineString<\/li>\n<li>MultiPolygon<\/li>\n<li>GeometryCollection<\/li>\n<\/ul>\n<h4>\u4f8b<\/h4>\n<p>\u3000STGeometryType() \u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3059\u305f\u3081\uff0c\u6b21\u306e\u4f8b\u3092\u8003\u3048\u3066\u307f\u308b\uff0egeometry \u578b\u306e\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\uff0c\u305d\u308c\u306f SRID 32614 (UTM Zone 14N) \u306e MexicoCity \u3092\u8868\u73fe\u3057\u3066\u304a\u308a\uff0cSTGeometryType() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u8868\u73fe\u3055\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u9078\u629e\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @MexicoCity geometry\nSET @MexicoCity = geometry::STGeomFromText('Point(486321 2146238)', 32614)\nSELECT\n  @MexicoCity AS Shape,\n  @MexicoCity.STGeometryType() AS GeometryType<\/pre>\n<pre>Point<\/pre>\n<p>\u3000Mexico City \u306e\u4f4d\u7f6e\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u5909\u6570 @MexicoCity \u306f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u4f7f\u3046\u3068\u3044\u3046\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u3088\u308a\u5360\u3081\u3089\u308c\u308b\u6b21\u5143\u6570\u3092\u8fd4\u3059<\/h3>\n<p>\u3000STGeometryType() \u306e\u3088\u3046\u306b\uff0cSTDimension() \u30e1\u30bd\u30c3\u30c9\u306f\u5730\u7269\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u4f7f\u3046\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u8a18\u8ff0\u3059\u308b\u57fa\u672c\u7684\u306a\u60c5\u5831\u3092\u63d0\u4f9b\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e\u3057\u304b\u3057\uff0cgeography \u578b\u3084 geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u308a\u8868\u73fe\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u8a18\u8ff0\u3059\u308b\u6587\u5b57\u5217\u3092\u8fd4\u3059\u3068\u3044\u3046\u3088\u308a\u3082\uff0cSTDimension() \u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u304c\u5360\u3081\u308b\u6b21\u5143\u6570\u3092\u8868\u73fe\u3059\u308b\u6574\u6570\u5024\u3092\u8fd4\u3059\uff0e\u7b2c\uff11\u7ae0\u3067\u8ad6\u3058\u305f\u3088\u3046\u306b\uff0cPoint \u306f 0 \u6b21\u5143\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\uff0cLineString \u306f 1 \u6b21\u5143\u3092\u5360\u3081\uff0cPolygon \u306f 2 \u6b21\u5143\u3092\u5360\u3081\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STDimension() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STDimenstion() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u53d6\u3089\u305a\uff0cgeography \u578b\u3084 geometry \u578b\u306e\u30a2\u30a4\u30c6\u30e0\u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STDimension()<\/pre>\n<p>\u3000STDimension() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u6574\u6570\u5024\u3067\u3042\u308a Instance \u306e\u5360\u3081\u308b\u6b21\u5143\u6570\u3092\u6b21\u306e\u3088\u3046\u306b\u8868\u73fe\u3059\u308b\uff0e<\/p>\n<ul>\n<li>Point \u3084 MultiPoint \u306b\u5bfe\u3057\u3066\u306f STDimension() \u306f 0 \u3092\u8fd4\u3059<\/li>\n<li>LineString \u3084 MultiLineString \u306b\u5bfe\u3057\u3066\u306f STDimension() \u306f 1 \u3092\u8fd4\u3059<\/li>\n<li>Polygon \u3084 MultiPolygon \u306b\u5bfe\u3057\u3066\u306f STDimension() \u306f 2 \u3092\u8fd4\u3059<\/li>\n<li>\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u3067\u3082\uff08\u3064\u307e\u308a\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u305d\u306e\u5b9a\u7fa9\u306b\u304a\u3044\u3066\u70b9\u3092\u4e00\u3064\u3082\u542b\u307e\u306a\u3044\u5834\u5408\uff09\uff0c-1 \u3092\u8fd4\u3059<\/li>\n<li>\u3044\u304f\u3064\u304b\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3080 Geometry Collection \u306b\u5bfe\u3057\u3066\u306f\uff0cSTDimension() \u306f\u305d\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u542b\u307e\u308c\u308b\u8981\u7d20\u306e\u6700\u5927\u306e\u6b21\u5143\u6570\u3092\u8fd4\u3059<\/li>\n<\/ul>\n<p>\u4ed8\u8a18\u3000\u540c\u3058\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u5358\u4e00\u8981\u7d20\u3067\u3082\u591a\u8981\u7d20\u3067\u3082\uff0c\u540c\u3058\u6b21\u5143\u6570\u3092\u5360\u3081\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000STDimension() \u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u6cd5\u3092\u6b21\u306e\u30b3\u30fc\u30c9\u3067\u793a\u3059\uff0e\u3042\u308b LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\uff0c\u305d\u306e\u5360\u3081\u308b\u6b21\u5143\u6570\u3092\u30c6\u30b9\u30c8\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @LineString geometry\nSET @LineString = geometry::STGeomFromText('LineString(-120 48, -122 47)', 0)\nSELECT\n  @LineString AS Shape,\n  @LineString.STDimension() AS Dimension<\/pre>\n<pre>1<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u7279\u5b9a\u306e\u7a2e\u985e\u304b\u5426\u304b\u30c6\u30b9\u30c8\u3059\u308b<\/h3>\n<p>\u3000InstanceOf() \u30e1\u30bd\u30c3\u30c9\u306f\uff0c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u308a\u7279\u5b9a\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\uff0c\u6a5f\u80fd\u7684\u306b STGeometryType() \u30e1\u30bd\u30c3\u30c9\u3092\u88dc\u5b8c\u3059\u308b\uff0eSTGeometryType() \u304c\u8a18\u8ff0\u7684\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u308f\u308c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u308a\u8868\u73fe\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u540d\u3092\u8fd4\u3059\u306e\u306b\u5bfe\u3057\u3066\uff0cInstanceOf() \u30e1\u30bd\u30c3\u30c9\u306f\uff0c\u3042\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u4e0e\u3048\u3089\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8868\u73fe\u3059\u308b\u304b\u5426\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u30c6\u30ad\u30b9\u30c8\u6587\u5b57\u5217\u3067 InstanceOf() \u30e1\u30bd\u30c3\u30c9\u306b\u63d0\u4f9b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000InstanceOf() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000InstanceOf() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u305f\u3081\u306e\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>Instance.InstanceOf(geometry_type)<\/pre>\n<p>\u3000geometry_type \u30d1\u30e9\u30e1\u30fc\u30bf\u306f nvarchar(4000) \u306e\u6587\u5b57\u5217\u3067\u3042\u308a\uff0c\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u4f8b\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u4eee\u306b Instance \u304c LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306a\u3089\u3070 Instance.InstanceOf(&#8216;LineString&#8217;) \u306f 1 \u3092\u8fd4\u3059\u304c\uff0c\u305d\u308c\u4ee5\u5916\u306a\u3089 0 \u3092\u8fd4\u3059\uff0e<\/p>\n<p>\u3000InstanceOf() \u30e1\u30bd\u30c3\u30c9\u304c 1 \u3092\u8fd4\u3059\u306e\u306f Instance \u304c geometry_type \u3067\u7279\u5b9a\u3055\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3068\u6b63\u78ba\u306b\u4e00\u81f4\u3057\u305f\u6642\u304b\uff0c\u3042\u308b\u3044\u306f\u00a0Instance \u306e\u4efb\u610f\u306e\u7a2e\u985e\u304c geometry_type \u306e\u4e0b\u4f4d\u4e92\u63db\u3067\u3042\u308b\u5834\u5408\u3067\u3042\u308b\uff0e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c6\u30b9\u30c8\u3055\u308c\u308b geometry_type \u306e\u5024\u306f\uff17\u3064\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3067\u304d\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e\uff0c\u3053\u3053\u3067\u306f STGeopmetryType() \u3067\u8fd4\u308b\u306e\u610f\u5473\u3060\u304c\uff0c\u306e\u4e00\u3064\u306b\u9650\u3089\u305a\uff0c\u305d\u308c\u306b\u52a0\u3048\u3066 Curve, Surface, MultiCurve, MultiSurface \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u304c LineSring, Polygons, MultiLineStrings, MultiPolygons \u306b\u305d\u308c\u305e\u308c\u52a0\u308f\u308b\uff0e\u4e0b\u4f4d\u4e92\u63db\u306e\u3059\u3079\u3066\u306e\u7279\u7570\u7684\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u304b\u3089\uff0c\u6c4e\u7528\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3092\u7279\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\uff0egeometry_type \u306e\u3042\u308a\u3046\u308b\u3059\u3079\u3066\u306e\u5024\u306e\u30ea\u30b9\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<ul>\n<li>Geometry<\/li>\n<li>Point<\/li>\n<li>MultiPoint<\/li>\n<li>Curve<\/li>\n<li>LineString<\/li>\n<li>MultiCurve<\/li>\n<li>MultiLineString<\/li>\n<li>Surface<\/li>\n<li>Polygon<\/li>\n<li>MultiSurface<\/li>\n<li>MultiPolygon<\/li>\n<li>GeometryCollection<\/li>\n<\/ul>\n<p>\u4ed8\u8a18\u3000\u3053\u308c\u3089\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u95a2\u9023\u3092\u793a\u3059\u7d99\u627f\u30c4\u30ea\u30fc\u306e\u89e3\u8aac\u306f\u7b2c\uff13\u7ae0\u3092\u53c2\u7167\u306e\u3053\u3068\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f geometry \u578b\u306e MultiPoint \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u308a\uff0cInstanceOf() \u3092\u4f7f\u3063\u3066\u305d\u306e\u4f8b\u304c Geometry Collection \u306e\u7a2e\u985e\u306e\u4f8b\u304b\u5426\u304b\u30c6\u30b9\u30c8\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @MultiPoint geometry\nSET @MultiPoint = geometry::STGeomFromText('MULTIPOINT(0 0, 51 2, -3 10.5)', 0)\nSELECT\n  @MultiPoint AS Shape,\n  @MultiPoint.InstanceOf('GEOMETRYCOLLECTION') AS InstanceOfGeomColl<\/pre>\n<pre>1<\/pre>\n<p>\u4ed8\u8a18\u3000MultiPoint, MultiLineString, MultiPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u3059\u3079\u3066\u540c\u8cea\u306e\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u6c4e\u7528\u306e\u591a\u8981\u7d20 Geometry Collection \u306e\u4e0b\u4f4d\u4e92\u63db\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0eInstanceOf() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3059\u3079\u3066\u3053\u308c\u3089\u306e\u7a2e\u985e\u304c Geometry Collection \u306e\u4f8b\u3067\u3042\u308b\u304b\u30c6\u30b9\u30c8\u3059\u308b\u306a\u3089\uff0c\u305d\u306e\u7d50\u679c\u306f 1 \uff08\u771f\uff09\u3067\u3042\u308b\uff0e<\/p>\n<h3>STDimension(), STGeometryType(), InstanceOf() \u306e\u7d50\u679c\u3092\u6bd4\u8f03\u3059\u308b<\/h3>\n<p>\u3000Table 11-1 \u306b\u793a\u3057\u305f\u306e\u306f\u69d8\u3005\u306a\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e STGeometryType(), STDimension(), InstanceOf() \u30e1\u30bd\u30c3\u30c9\u304b\u3089\u5f97\u3089\u308c\u305f\u7d50\u679c\u3092\u6bd4\u8f03\u3057\u305f\u3082\u306e\u3067\u3042\u308b\uff0eSTGeometryType() \u304a\u3088\u3073 STDimension() \u306e\u5217\u306f\uff0cGeometry \u5217\u306b\u793a\u3057\u305f\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\uff0c\u5404\u30e1\u30bd\u30c3\u30c9\u3067\u547c\u3093\u3067\u5f97\u3089\u308c\u305f\u7d50\u679c\u3067\u3042\u308b\uff0eInstanceOf() \u306e\u5217\u306f\uff0c\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u547c\u3093\u3060\u3068\u304d\u306b 1 \uff08\u771f\uff09\u306e\u8fd4\u308b geometry_type \u306e\u5024\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<table style=\"width: 100%; height: 400px;\"><caption>Table 11-1. STGeometry(), STDimension() \u304a\u3088\u3073 InstanceOf() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u6bd4\u8f03\u3059\u308b<\/caption>\n<tbody>\n<tr style=\"height: 23px;\">\n<th style=\"height: 23px;\">Geometry<\/th>\n<th style=\"height: 23px;\">STGeometryType()<\/th>\n<th style=\"height: 23px;\">STDimenstion()<\/th>\n<th style=\"height: 23px;\">InstanceOf()<\/th>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">Point<\/td>\n<td style=\"height: 23px;\">Point<\/td>\n<td style=\"height: 23px;\">0<\/td>\n<td style=\"height: 23px;\">Geometry, Point<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">LineString<\/td>\n<td style=\"height: 23px;\">LineString<\/td>\n<td style=\"height: 23px;\">1<\/td>\n<td style=\"height: 23px;\">Geometry, Curve, LineString<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">Polygon<\/td>\n<td style=\"height: 23px;\">Polygon<\/td>\n<td style=\"height: 23px;\">2<\/td>\n<td style=\"height: 23px;\">Geometry, Surface, Polygon<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"height: 46px;\">MultiPoint<\/td>\n<td style=\"height: 46px;\">MultiPoint<\/td>\n<td style=\"height: 46px;\">0<\/td>\n<td style=\"height: 46px;\">Geometry, GeometryCollection, MultiPoint<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"height: 46px;\">MultiLineString<\/td>\n<td style=\"height: 46px;\">MultiLineString<\/td>\n<td style=\"height: 46px;\">1<\/td>\n<td style=\"height: 46px;\">Geometry, GeometryCollection, MultiCurve, MultiLineString<\/td>\n<\/tr>\n<tr style=\"height: 46px;\">\n<td style=\"height: 46px;\">MultiPolygon<\/td>\n<td style=\"height: 46px;\">MultiPolygon<\/td>\n<td style=\"height: 46px;\">2<\/td>\n<td style=\"height: 46px;\">Geometry, GeometryCollection, MultiSurface, MultiPolygon<\/td>\n<\/tr>\n<tr style=\"height: 27px;\">\n<td style=\"height: 27px;\">GeometryCollection<\/td>\n<td style=\"height: 27px;\">GeometryCollection<\/td>\n<td style=\"height: 27px;\">-1, 0, 1, 2<sup>a<\/sup><\/td>\n<td style=\"height: 27px;\">Geometry, GeometryCollection<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">Empty Point<\/td>\n<td style=\"height: 23px;\">Point<\/td>\n<td style=\"height: 23px;\">-1<\/td>\n<td style=\"height: 23px;\">Geometry, Point<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">Empty LineString<\/td>\n<td style=\"height: 23px;\">LineString<\/td>\n<td style=\"height: 23px;\">-1<\/td>\n<td style=\"height: 23px;\">Geometry, Curve, LineString<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px;\">Empty Polygon<\/td>\n<td style=\"height: 23px;\">Polygon<\/td>\n<td style=\"height: 23px;\">-1<\/td>\n<td style=\"height: 23px;\">Geometry, Surface, Polygon<\/td>\n<\/tr>\n<\/tbody>\n<tfoot>\n<tr style=\"height: 74px;\">\n<td style=\"height: 74px;\" colspan=\"4\"><sup>a<\/sup>\u3000STDimension() \u30e1\u30bd\u30c3\u30c9\u3092GeometryCollection \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f7f\u3046\u3068\u304d\uff0c\u305d\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u4efb\u610f\u306e\u8981\u7d20\u306e\u6700\u5927\u6b21\u5143\u6570\u304c\u8fd4\u308b\uff0e\u4f8b\u3048\u3070\uff0cPoint \u3068 LineString \u3060\u3051\u304b\u3089\u306a\u308b GeometryCollection \u3067\u306f STDimension() \u306e\u7d50\u679c\u306f 1 \u3068\u306a\u308b\uff0e<\/td>\n<\/tr>\n<\/tfoot>\n<\/table>\n<p>\u4ed8\u8a18\u3000\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3068\u306f\u70b9\u304c\u4e00\u3064\u3082\u5b58\u5728\u3057\u306a\u3044\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u3053\u3068\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000Figure 11-1 \u306b\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u9069\u7528\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u7d14\u3067\u3042\u308b\u304b\u5426\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b<\/h3>\n<p>\u3000\u7b2c1\u7ae0\u306b\u623b\u308b\u3068\uff0c\u7570\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u7d14\u306a\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5206\u985e\u3055\u308c\u308b\u305f\u3081\u306b\u6e80\u305f\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u57fa\u6e96\u3092\u7d39\u4ecb\u3057\u305f\uff0e\u672c\u8cea\u7684\u306b\uff0c\u5358\u7d14\u3055\u306e\u305f\u3081\u306e\u8981\u6c42\u3068\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u81ea\u5df1\u4ea4\u5dee\u3057\u306a\u3044\u3053\u3068\u3067\u3042\u308b\uff0e\u3064\u307e\u308a\uff0c\u4e00\u56de\u4ee5\u4e0a\u540c\u3058\u70b9\u3092\u542b\u307e\u306a\u3044\u3053\u3068\u3067\u3042\u308b\uff08\u305f\u3060\u3057 LineString \u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u3092\u9664\u304f\uff09\uff0e\u3044\u304f\u3064\u304b\u306e\u7279\u5fb4\u7684\u306a\u4f8b\u3092\u6b21\u306b\u793a\u3059\uff0e<\/p>\n<ul>\n<li>Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u5e38\u306b\u5358\u7d14\u3067\u3042\u308b\uff0eMultiPoint \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u5358\u7d14\u3060\u304c\uff0c\u540c\u3058 Point \u30922\u56de\u542b\u307e\u306a\u3044\u9650\u308a\u306b\u304a\u3044\u3066\u3067\u3042\u308b\uff0e<\/li>\n<li>LineString \u3068 MultiLineString \u306f\u70b9\u3068\u70b9\u306e\u9593\u306b\u5f15\u304b\u308c\u305f\u7d4c\u8def\u304c\u81ea\u8eab\u3068\u4ea4\u5dee\u3057\u306a\u3044\u9650\u308a\u5358\u7d14\u3067\u3042\u308b\uff0e<\/li>\n<li>Polygon \u3068 MultiPolygon \u306f\u5e38\u306b\u5358\u7d14\u3067\u3042\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000STIsSimple() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\uff0c\u554f\u984c\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306b\u3068\u3063\u3066\u95a2\u9023\u3059\u308b\u57fa\u6e96\u306b\u5408\u81f4\u3059\u308b\u304b\u5426\u304b\u691c\u67fb\u3059\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STIsSimple() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STIsSimple() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8981\u305b\u305a\uff0cgeometry \u578b\u306e\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\uff0e<\/p>\n<pre>Instance.STIsSimple()<\/pre>\n<p>\u3000\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3088\u3063\u3066\u8868\u73fe\u3055\u308c\u308b\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u7d14\u306a\u3089\uff0cSTIsSimple() \u30e1\u30bd\u30c3\u30c9\u306f\u5024 1 \u3092\u8fd4\u3059\uff0e\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u7d14\u3055\u306b\u8981\u6c42\u3055\u308c\u308b\u57fa\u6e96\u306b\u9054\u3057\u306a\u3044\u306a\u3089\uff0c\u30e1\u30bd\u30c3\u30c9\u306f 0 \u3092\u8fd4\u3059\uff0eFigure 11-2 \u306b\u793a\u3057\u305f\u306e\u306f\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u4e0a\u3067 STIsSimple() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u3068\u304d\u306b\u5f97\u3089\u308c\u305f\u7d50\u679c\u3067\u3042\u308b\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\uff0cNew York CIty \u4e2d\u5fc3\u3092\u901a\u308b\u30d0\u30f3\u306e\u914d\u9054\u8def\u3092\u8868\u73fe\u3057\u305f LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\uff0e\u305d\u306e LineString \u306f6\u3064\u306e\u70b9\u3092\u6709\u3057\u3066\u304a\u308a\uff0c\u305d\u306e\u70b9\u306f\u30d0\u30f3\u304c\u505c\u8eca\u3057\u3066\u914d\u9054\u3092\u884c\u3046\u4f4d\u7f6e\u3092\u793a\u3057\u3066\u3044\u308b\uff08\u89e3\u8aac\u306e\u76ee\u7684\u306e\u305f\u3081\uff0c\u30d0\u30f3\u306f\u5404\u4f4d\u7f6e\u306e\u9593\u3092\u6700\u77ed\u306e\u76f4\u7dda\u7d4c\u8def\u3092\u53d6\u308b\u3082\u306e\u3068\u4eee\u5b9a\u3059\u308b\uff09\uff0eSTIsSimple() \u30e1\u30bd\u30c3\u30c9\u306f LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5358\u7d14\u3067\u3042\u308b\u304b\u5426\u304b\u691c\u67fb\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>DECLARE @DeliveryRoute geometry\nSET @DeliveryRoute = geometry::STLineFromText(\n  'LINESTRING(586960 4512940, 586530 4512160, 585990 4512460,\n  586325 4513096, 587402 4512517, 587480 4512661)', 32618)\nSELECT\n  @DeliveryRoute AS Shape,\n  @DeliveryRoute.STIsSimple() AS IsSImple<\/pre>\n<pre>0<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u305d\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea @DeliveryRoute \u304c\u5358\u7d14\u3067\u306f\u306a\u3044\u3053\u3068\u3092\u6559\u3048\u3066\u304f\u308c\u308b\uff0e\u305d\u306e\u65c5\u306e\u9593\uff0c\u30d0\u30f3\u306f\u4ee5\u524d\u901a\u3063\u305f\u7d4c\u8def\u3092\u8de8\u304c\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u3053\u308c\u306f @DeliveryRoute \u3067\u8868\u73fe\u3055\u308c\u308b\u7d4c\u8def\u304c\u76ee\u7684\u5730\u9593\u306e\u6700\u9069\u306a\u7d4c\u8def\u3067\u306f\u306a\u3044\u3053\u3068\u306e\u6307\u6a19\u3067\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\uff0e\u793a\u3059\u305f\u3081\u306b\uff0c\u30d0\u30f3\u304c\u540c\u3058\u5730\u70b9\u304b\u3089\u51fa\u767a\u3057\u3066\u6b8b\u308a\u306e\u5730\u70b9\u3092\u9055\u3046\u7d4c\u8def\u3092\u8fbf\u3063\u305f\u3068\u8003\u3048\u3066\u307f\u3088\u3046\uff0c\u6b21\u306e\u3088\u3046\u306b\uff0e<\/p>\n<pre>DECLARE @DeliveryRoute geometry\nSET @DeliveryRoute = geometry::STLineFromText(\n  'LINESTRING(586960 4512940, 587480 4512661, 587402 4512517,\n  586325 4513096, 585990 4512460, 586530 4512160)', 32618)\nSELECT\n  @DeliveryRoute AS Shape,\n  @DeliveryRoute.STIsSimple() AS IsSimple<\/pre>\n<p>\u3000\u3053\u306e\u5834\u5408\uff0c\u305d\u306e LineSring \u306f\u540c\u30586\u5730\u70b9\u3092\u7d50\u3076\u304c\uff0c\u81ea\u8eab\u3092\u8de8\u304c\u306a\u3044\uff0e\u3053\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u4f7f\u308f\u308c\u308b STIsSimple() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u3086\u3048\u306b 1 \u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u7d4c\u8def\u3092\u5358\u7d14\u306b\u3059\u308b\u3053\u3068\u3067\uff0c\u30d0\u30f3\u304c\u7d4c\u8def\u3092\u518d\u4ea4\u5dee\u3059\u308b\u5fc5\u8981\u6027\u3092\u7701\u304d\uff0c\u8d70\u884c\u8ddd\u96e2\u306f 3.6 km \u304b\u3089 3.3 km \u306b\u6e1b\u5c11\u3057\u305f\uff0e\u3053\u308c\u306f\u5f8c\u306b\u672c\u7ae0\u3067\u7d39\u4ecb\u3059\u308b STLength() \u30e1\u30bd\u30c3\u30c9\u3067\u78ba\u8a8d\u3067\u304d\u308b\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u9589\u3058\u3066\u3044\u308b\u304b\u5426\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b<\/h3>\n<p>\u3000\u3042\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u9589\u3058\u3066\u3044\u308b\u3053\u3068\u306f\u6b21\u306e\u898f\u5247\u3067\u5b9a\u7fa9\u3067\u304d\u308b\uff0e<\/p>\n<ul>\n<li>Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u9589\u3058\u3066\u3044\u306a\u3044\uff0e<\/li>\n<li>LineString \u306f\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u304c\u540c\u3058\u5834\u5408\u306b\u9650\u308a\u9589\u3058\u3066\u3044\u308b\uff0e<\/li>\n<li>\u3042\u3089\u3086\u308b Polygon \u306f\u9589\u3058\u3066\u3044\u308b\uff0e<\/li>\n<li>Geometry Collection \u306f\u4e00\u3064\u3067\u3082\u9589\u3058\u3066\u3044\u306a\u3044\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u3042\u308c\u3070\uff08Point \u3084\u9589\u3058\u3066\u3044\u306a\u3044 LineString \u304c\u3042\u308c\u3070\uff09\uff0c\u9589\u3058\u3066\u3044\u306a\u3044\uff0e<\/li>\n<\/ul>\n<p>\u3000STClosed() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u3053\u308c\u3089\u306e\u57fa\u6e96\u306b\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u5426\u304b\u691c\u67fb\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0eFigure 11-3 \u306f\uff0c\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u4f8b\u306b\u4f7f\u308f\u308c\u305f STIsClosed() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STIsClosed() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STIsClosed() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8981\u305b\u305a\uff0c\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STIsCloed()<\/pre>\n<p>\u3000STIsClosed() \u30e1\u30bd\u30c3\u30c9\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u9589\u3058\u3066\u3044\u308b\u3068\u304d\u306b 1 \u3092\u8fd4\u3057\uff0c\u9589\u3058\u3066\u3044\u306a\u3044\u6642\u306b\u306f 0 \u3092\u8fd4\u3059\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000Mount Snowdon (Yr Wyddfa, Welsh) \u306e\u5c71\u9802\u306f\u30a6\u30a7\u30fc\u30eb\u30ba\u306b\u3042\u308b\u5c71\u3067\u6700\u3082\u9ad8\u304f\uff0c\u9ad8\u5ea6\u306f\u6a19\u9ad8 3500 \u30d5\u30a3\u30fc\u30c8\u3092\u8d85\u3048\u308b\uff0e\u6b21\u306e\u4f8b\u3067\u306f\u591a\u304f\u306e LineString \u3092\u542b\u3080 MultiLineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0c\u305d\u308c\u306f\u305d\u306e\u5c71\u9802\u5468\u8fba\u306e\u7b49\u9ad8\u7dda\u3092\u8868\u73fe\u3059\u308b\uff0e\u4e00\u672c\u306e\u7b49\u9ad8\u7dda\u306f\u9ad8\u3055\u306e\u7b49\u3057\u3044\u70b9\u3092\u7d50\u3093\u3060\u7dda\u3067\u3042\u308a\uff0c\u305d\u308c\u3067\uff0c\u7d4c\u5ea6\u3068\u7def\u5ea6\u306e\u5ea7\u6a19\u306e\u8a18\u8ff0\u306b\u52a0\u3048\u3066\uff0c\u5404 LineString \u306e\u5404\u70b9\u306f\u307f\u306a LineString \u306e\u8868\u73fe\u3059\u308b\u7b49\u9ad8\u7dda\u306e\u9ad8\u3055\u306b\u7b49\u3057\u3044 z \u5ea7\u6a19\u5024\u3092\u7279\u5b9a\u3057\u3066\u304a\u308a\uff0c\u6a19\u9ad8\u30d5\u30a3\u30fc\u30c8\u3067\u6e2c\u5b9a\u3055\u308c\u3066\u3044\u308b\uff0eSTIsClosed() \u30e1\u30bd\u30c3\u30c9\u306f MultiLineString \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u9589\u3058\u3066\u3044\u308b\u304b\u5426\u304b\u3092\u691c\u67fb\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Snowdon geometry\nSET @Snowdon = geometry::STMLineFromText(\n'MUTLILINESTRING(\n (-4.07668 53.06804 3445,  -4.07694 53.06832 3445,  -4.07681 53.06860 3445,\n  -4.07668 53.06869 3445,  -4.07651 53.06860 3445,  -4.07625 53.06832 3445,\n  -4.07661 53.06804 3445,  -4.07668 53.06804 3445),\n (-4.07668 53.06776 3412,  -4.07709 53.06795 3412,  -4.07717 53.06804 3412,\n  -4.07730 53.06832 3412,  -4.07730 53.06860 3412,  -4.07709 53.06890 3412,\n  -4.07668 53.06898 3412,  -4.07642 53.06890 3412,  -4.07597 53.06860 3412,\n  -4.07582 53.06832 3412,  -4.07603 53.06804 3412,  -4.07625 53.06791 3412,\n  -4.07668 53.06776 3412),\n (-4.07709 53.06768 3379,  -4.07728 53.06778 3379,  -4.07752 53.06804 3379,\n  -4.07767 53.06832 3379,  -4.07773 53.06860 3379,  -4.07771 53.06890 3379,\n  -4.07728 53.06918 3379,  -4.07657 53.06918 3379,  -4.07597 53.06890 3379,\n  -4.07582 53.06879 3379,  -4.07541 53.06864 3379,  -4.07537 53.06860 3379,\n  -4.07526 53.06832 3379,  -4.07556 53.06804 3379,  -4.07582 53.06795 3379,\n  -4.07625 53.06772 3379,  -4.07668 53.06757 3379,  -4.07709 53.06768 3379))',\n4326)\nSELECT\n  @Snowdon AS Shape,\n  @Snowdon.STIsClosed() AS IsClosed<\/pre>\n<p>\u3000MultiLineString \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u5404 LineString \u306f\u958b\u59cb\u70b9\u3068\u540c\u3058\u5730\u70b9\u3067\u7d42\u308f\u308b\u305f\u3081\uff0c@Snowdon \u306f\u9589\u3058\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308a\uff0cSTIsClosed() \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u8fd4\u308b\u7d50\u679c\u306f\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>1<\/pre>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000\u6a19\u9ad8\u3084\u9ad8\u5ea6\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e z \u5ea7\u6a19\u306f geometry \u578b\u3067\u4f7f\u7528\u3067\u304d\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e<\/p>\n<h3>LineString \u304c\u30ea\u30f3\u30b0\u3067\u3042\u308b\u304b\u5426\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b<\/h3>\n<p>\u3000\u30ea\u30f3\u30b0\u3068\u306f\u5358\u7d14\u304b\u3064\u9589\u3058\u3066\u3044\u308b LineString \u306e\u3053\u3068\u3067\u3042\u308b\uff0eSTIsRIng() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30ea\u30f3\u30b0\u306e\u4f8b\u3067\u3042\u308b\u304b\u5426\u304b\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e OGC \u6e96\u62e0\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b\uff0eFigure 11- 4 \u306f\u7570\u306a\u308b LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u4e0a\u3067\u4f7f\u308f\u308c\u305f\u3068\u304d\u306e STIsRIng() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u793a\u3057\u3066\u3044\u308b\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STIsRing() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STIsRing() \u30e1\u30bd\u30c3\u30c9\u306e\u69cb\u6587\u306f\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<pre>Instance.STIsRing()<\/pre>\n<p>\u3000LineString \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u3046\u3068\u304d\uff0cSTIsRIng() \u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30ea\u30f3\u30b0\u306e\u57fa\u6e96\u3092\u6e80\u305f\u3059\u5834\u5408\u306b 1 \u3092\u8fd4\u3057\uff0c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30ea\u30f3\u30b0\u3067\u306a\u3044\u5834\u5408\u306f 0 \u3092\u8fd4\u3059\uff0eLineString \u4ee5\u5916\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306f NULL \u3092\u8fd4\u3059\uff0e<\/p>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000\u30ea\u30f3\u30b0\u306f\u9589\u3058\u3066\u3044\u3066\u304b\u3064\u5358\u7d14\u306a LineString \u3067\u3042\u308b\u305f\u3081\uff0cSTIsRing() = 1 \u306f\u8ad6\u7406\u7684\u306b InstanceOf(&#8216;LineString&#8217;) = 1 AND STIsClosed() = 1 AND STIsSimple() = 1 \u3068\u7b49\u4fa1\u3067\u3042\u308b\uff0e\u00a0<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306fIndy 500 \u30ec\u30fc\u30b9\u306e\u672c\u62e0\u5730\u3067\u3042\u308b Indianapolis Motor Speedway \u306e\u7d4c\u8def\u3092\u8868\u73fe\u3059\u308b LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\uff0eSTIsRing() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\uff0c\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u30ea\u30f3\u30b0\u3092\u751f\u6210\u3059\u308b\u304b\u691c\u67fb\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @Speedway geometry\nSET @Speedway = geometry::STLineFromText(\n'LINESTRING(565900 4404737, 565875 4405861, 565800 4405987, 565670 4406055,\n  565361 4406050, 565222 4405975, 565150 4405825, 565170 4404760, 565222 4404617,\n  565361 4404521, 565700 4404524, 565834 4404603, 565900 4404737)', 32616)\nSELECT\n  @Speedway AS Shape,\n  @Speedway.STIsRing() AS IsRIng<\/pre>\n<pre>1<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e Point \u306e\u6570\u3092\u6570\u3048\u308b<\/h3>\n<p>\u3000STNumPoints() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u304a\u3088\u3073 geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9a\u7fa9\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u8fd4\u3059\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u5b9a\u7fa9\u5185\u306b\u5217\u6319\u3055\u308c\u308b\u3059\u3079\u3066\u306e\u70b9\u304c\u6570\u3048\u3089\u308c\u308b\uff0e\u4eee\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u5b9a\u7fa9\u304c\u540c\u3058\u70b9\u3092\u8907\u6570\u56de\u542b\u3093\u3067\u3044\u308b\u3068\u3057\u3066\u3082\uff0c\u305d\u308c\u306f\u8907\u6570\u56de\u6570\u3048\u3089\u308c\u308b\uff0e\u4f8b\u3048\u3070\uff0cPolygon \u306e\u5b9a\u7fa9\u306b\u304a\u3044\u3066\uff0c\u5404\u30ea\u30cb\u30a2\u306a\u30ea\u30f3\u30b0\u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u304c\u540c\u3058\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e\u3053\u306e\u70b9\u306f\u91cd\u8907\u3057\u3066\u3044\u308b\u305f\u3081\uff0cPlolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\u308b\u3068\uff0cSTNumnPoints() \u306e\u7d50\u679c\u306f\u5e38\u306b\u30b7\u30a7\u30a4\u30d7\u306e\u5074\u9762\u306e\u6570\u3088\u308a\u3082\u591a\u304f\u306a\u308b\uff0e<\/p>\n<p>\u3000Figure 11-5 \u306b\u69d8\u3005\u306a\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\u305f\u3068\u304d\u306e STNumPoints() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STNumPoints() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STNumPoints() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u3089\u305a\uff0cgeography \u578b\u304a\u3088\u3073 geometry \u578b\u30c7\u30fc\u30bf\u306e\u30a2\u30a4\u30c6\u30e0\u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STNumPoints()<\/pre>\n<p>\u3000\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u6574\u6570\u5024\u3067\u3042\u308a\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u8868\u73fe\u3059\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000Bermuda Triangle \u306f\u305d\u3053\u3092\u901a\u308b\u8239\u8236\u3084\u822a\u7a7a\u6a5f\u304c\u8aac\u660e\u306e\u4ed8\u304b\u306a\u3044\u906d\u96e3\u3092\u5f15\u304d\u8d77\u3053\u3059\u3053\u3068\u3067\u6709\u540d\u306a\u5927\u897f\u6d0b\u306e\u4e00\u90e8\u5730\u57df\u3067\u3042\u308b\uff0e\u305d\u306e\u6b63\u78ba\u306a\u4f4d\u7f6e\u306f\u7570\u306a\u308b\u60c5\u5831\u6e90\u306e\u9593\u3067\u63fa\u308c\u3066\u3044\u308b\u304c\uff0c\u4e00\u822c\u7684\u306b\u306f\u30d5\u30ed\u30ea\u30c0\u306e\u30de\u30a4\u30a2\u30df\uff0c\u30d7\u30a8\u30eb\u30c8\u30ea\u30b3\u306e\u30b5\u30f3\u30b8\u30e5\u30a2\u30f3\uff0c\u305d\u3057\u3066\u30d0\u30df\u30e5\u30fc\u30c0\u5cf6\u306e\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u5730\u57df\u3068\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\uff0e\u6b21\u306e\u4f8b\u3067\u306f\u3053\u308c\u3089\u306e\u70b9\u306b\u57fa\u3065\u3044\u3066 Bermuda Triangle \u3092\u8868\u73fe\u3057\u305f geography \u578b\u306e Polygon \u3092\u751f\u6210\u3057\uff0c\u305d\u306e\u7d50\u679c\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b STNumPoints() \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @BermudaTriangle geography<br \/>SET @BermudaTriangle = geography::STPolyFromText(<br \/>'POLYGON((-66.07 18.45, -64.78 32.3, -80.21 25.78, -66.07 18.45))',<br \/>4326)<br \/>SELECT<br \/>  @BermudaTriangle AS Shape,<br \/>  @BermudaTriangle.STNumPoints() AS NumPoints<\/pre>\n<pre>4<\/pre>\n<p>\u6ce8\u610f\u3000Bermuda Triangle \u306e\u3088\u3046\u306a\u4e09\u89d2\u5f62\u306e Polygon \u306e\u5b9a\u7fa9\u306f4\u3064\u306e\u70b9\u3092\u542b\u3093\u3067\u3044\u308b\uff0e3\u3064\u3068\u8003\u3048\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u304c\uff0c\u305d\u3046\u3067\u306f\u306a\u3044\uff01\u3053\u308c\u306f STNumPoints() \u30e1\u30bd\u30c3\u30c9\u304c Polygon \u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u30922\u56de\u6570\u3048\u308b\u304b\u3089\u3067\u3042\u308b\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u7a7a\u3067\u3042\u308b\u304b\u5426\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b<\/h3>\n<p>\u3000\u7a7a\uff08\u304b\u3089\uff09\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3068\u306f\u4e00\u3064\u3082\u70b9\u3092\u542b\u307e\u306a\u3044\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u3053\u3068\u3067\u3042\u308b\uff0e\u4e00\u3064\u3082\u70b9\u3092\u542b\u307e\u306a\u3044\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u540d\u76ee\u4e0a\u7279\u5b9a\u306e\u7a2e\u985e\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\uff0e\u4f8b\u3048\u3070\uff0c\u7a7a\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3084\u7a7a\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u306a\u3069\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u306a\u305c\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\u306e\u304b\u6238\u60d1\u3063\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u306a\u3044\uff0e\u4e00\u3064\u3082\u70b9\u3092\u6301\u305f\u306a\u3044\u3068\u5b9a\u7fa9\u3055\u308c\u305f\u5730\u7269\u3092\u8868\u73fe\u3059\u308b\u30b7\u30a7\u30a4\u30d7\u3092\u306a\u305c\u751f\u6210\u3059\u308b\u306e\u304b\uff1f\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u6b21\u306e\u3088\u3046\u306a\u4e00\u3064\u306e\u8003\u3048\u65b9\u304c\u3042\u308b\uff0e\u4eee\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u5730\u7403\u4e0a\u306e\uff08\u3086\u3048\u306b\uff0c\u5b9f\u88c5\u306b\u3088\u3063\u3066\uff0c\u305d\u306e\u5b58\u5728\u306e\uff09\u5730\u7269\u306e\u4f4d\u7f6e\u3092\u8868\u73fe\u3059\u308b\u306e\u306a\u3089\uff0c\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u305d\u306e\u3088\u3046\u306a\u5730\u7269\u3092\u6b20\u3044\u3066\u3044\u308b\u3053\u3068\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306b\u306a\u308b\uff0e\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u201dx \u306f\u3069\u3053\u3060\uff1f\u201d\u3068\u3044\u3046\u554f\u3044\u306b\u5bfe\u3059\u308b\u201d\u5730\u7403\u4e0a\u306e\u3069\u3053\u306b\u3082\u306a\u3044\u201d\u3068\u3044\u3046\u7b54\u3048\u3068\u3057\u3066\u4f7f\u308f\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\uff0e<\/p>\n<p>\u3000\u4f8b\u3048\u3070\uff0cSTIntersection() \u30e1\u30bd\u30c3\u30c9\u306f\uff0c2\u3064\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u9593\u306e\u5171\u6709\u70b9\u306e\u96c6\u5408\u3092\u8868\u73fe\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e\u4eee\u306b\u305d\u308c\u3089\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5171\u901a\u306e\u70b9\u3092\u4e00\u3064\u3082\u6301\u3063\u3066\u3044\u306a\u3044\u5834\u5408\uff08\u4e92\u3044\u306b\u4ea4\u308f\u3063\u3066\u3044\u306a\u3044\uff09\uff0cSTIntersection() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u306a\u308b\u3060\u308d\u3046\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f NULL \u3068\u306f\u7570\u306a\u308b\uff0egeometry \u5217\u3084 geography \u5217\u304c NULL \u3068\u306f\u7d50\u679c\u304c\u8a55\u4fa1\u3055\u308c\u306a\u3044\u3053\u3068\u3092\u793a\u5506\u3059\u308b\uff0e\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u7d50\u679c\u304c\u8a55\u4fa1\u3055\u308c\uff0c\u3057\u304b\u3057\u5730\u7403\u4e0a\u306b\u5730\u7269\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u3092\u793a\u5506\u3059\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STIsEmpty() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STIsEmpty() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8981\u305b\u305a\uff0cgeometry \u578b\u3067\u3082 geography \u578b\u3067\u3082\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STIsEmpty()<\/pre>\n<p>\u3000Instance \u3067\u8868\u73fe\u3055\u308c\u308b\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u4e00\u3064\u3082\u70b9\u3092\u542b\u307e\u306a\u3044\u5834\u5408\uff0c\u3086\u3048\u306b STIsEmpty() \u306e\u7d50\u679c\u306f 1 \u306b\u306a\u308b\uff0e\u305d\u3046\u3067\u306a\u3044\u306a\u3089\u305d\u306e\u7d50\u679c\u306f 0 \u306b\u306a\u308b\uff0e<\/p>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000STIsEmpty() = 1 \u306f\u8ad6\u7406\u7684\u306b STNumPoints() = 0 \u3068\u7b49\u4fa1\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f2\u672c\u306e\u5e73\u884c\u306a LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308b @LineString1 \u3068 @LineString2 \u3092\u751f\u6210\u3059\u308b\uff0e\u305d\u3057\u3066 STIntersection() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u30662\u672c\u306e LineString \u306e\u4ea4\u5dee\u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0c\u305d\u306e\u524d\u306b\u7d50\u679c\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u4e0a\u306b STIsEmpty() \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\uff0e<\/p>\n<pre>DECLARE @LineString1 geometry<br \/>DECLARE @LineString2 geometry<br \/>SET @LineString1 = geometry::STLineFromText('LINESTRING(2 4, 10 6)', 0)<br \/>SET @LineString2 = geometry::STLineFromText('LINESTRING(0 2, 8 4)', 0)<br \/>SELECT<br \/>  @LineString1.STUnion(@LineString2) AS Shape,<br \/>  @LineString1.STIntersection(@LineString2).STIsEmpty() AS IsEmpty<\/pre>\n<pre>1<\/pre>\n<p>\u3000STIntersection() \u30e1\u30bd\u30c3\u30c9\u304b\u3089\u751f\u6210\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308a\uff0c\u4e00\u3064\u306e\u70b9\u3082\u6709\u3055\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b\uff0e\u8a00\u3044\u63db\u3048\u308b\u3068\uff0c@LineString1 \u3068 @LineString2 \u306f\u4e92\u3044\u306b\u3044\u304b\u306a\u308b\u70b9\u3082\u5171\u901a\u306b\u6301\u305f\u306a\u3044\uff08\u306a\u305c\u306a\u3089\u5e73\u884c\u3060\u304b\u3089\uff09\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u3053\u306e\u4f8b\u3067\u306f STUnion() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\uff0c\u4e21\u8005\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u7d50\u5408\u3057\uff08\u7a7a\u9593\u7d50\u679c\u30bf\u30d6\u306b\u8868\u793a\u3055\u308c\u308b\uff09\uff0cSTIntersection() \u30e1\u30bd\u30c3\u30c9\u306f2\u3064\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u4ea4\u5dee\u3092\u8a08\u7b97\u3059\u308b\uff0e\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3068\u3082\u306b\u7b2c12\u7ae0\u3067\u8a73\u7d30\u3092\u8ff0\u3079\u308b\uff0e<\/p>\n<h3>\u76f4\u4ea4\u5ea7\u6a19\u5024\u3092\u8fd4\u3059<\/h3>\n<p>\u3000geometry \u30c7\u30fc\u30bf\u578b\u306b\u304a\u3044\u3066\u306f\u70b9\u306f\u76f4\u4ea4\u5ea7\u6a19\u306e x \u304a\u3088\u3073 y, \u307e\u305f\u306f\u6295\u5f71\u7a7a\u9593\u53c2\u7167\u7cfb\u7531\u6765\u306e\u6771\u5ea7\u6a19\u304a\u3088\u3073\u5317\u5ea7\u6a19\u306b\u3088\u308a\u5b9a\u7fa9\u3055\u308c\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0e\u751f\u6210\u3055\u308c\u308b\u3044\u304b\u306a\u308b\u500b\u5225\u306e\u5ea7\u6a19\u5024\u3082\u305d\u308c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u306f\uff0cgeometry \u578b\u306e STX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u3000STX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\uff0cSTPointFromText() \u306e\u3088\u3046\u306a\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u76f4\u63a5\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u9069\u7528\u3067\u304d\uff0c\u4ed6\u306e\u30e1\u30bd\u30c3\u30c9\uff0c\u4f8b\u3048\u3070 STPointN() \u3084 STCentroid() \u306a\u3069\u306e\u7d50\u679c\u3068\u3057\u3066\u8fd4\u308b\u70b9\u3082\u540c\u69d8\u3067\u3042\u308b\uff0e\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u672c\u7ae0\u306e\u5f8c\u534a\u3067\u8ff0\u3079\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000Point \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5ea7\u6a19\u5024\u306f\u30e1\u30bd\u30c3\u30c9\u7d4c\u7531\u3068\u3044\u3046\u3088\u308a\u3080\u3057\u308d\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\uff0eSTX \u3084 STY \u3092\u4f7f\u3063\u3066\u5ea7\u6a19\u5024\u3092\u53d6\u5f97\u3059\u308b\u3068\u304d\uff0c\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u306e\u5f8c\u306b\u4e38\u62ec\u5f27\u3092\u542b\u3081\u308b\u3079\u304d\u3067\u306f\u306a\u3044\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u306f geometry \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u6b21\u306e\u3088\u3046\u306b\u9069\u7528\u3059\u308b\uff0e<\/p>\n<pre>Instance.STX\nInstance.STY<\/pre>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\uff0cUTM \u6295\u5f71\uff08\u5357\u534a\u7403 Zone 35\uff09\u3092\u4f7f\u3063\u3066\u5357\u30a2\u30d5\u30ea\u30ab\u306e\u30e8\u30cf\u30cd\u30b9\u30d6\u30eb\u30b0\u3092\u8868\u73fe\u3059\u308b\u6295\u5f71\u5ea7\u6a19\u304b\u3089 Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\uff0e\u305d\u3057\u3066 STX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u305d\u306e Point \u306e x \u5ea7\u6a19\uff08\u6771\u5ea7\u6a19\uff09\u304a\u3088\u3073 y \u5ea7\u6a19\uff08\u5317\u5ea7\u6a19\uff09\u3092\u53d6\u5f97\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @Johannesburg geometry\nSET @Johannesburg = geometry::STGeomFromText('POINT(604931 7107923)', 32735)\nSELECT\n  @Johannesburg.STX AS X,\n  @Johannesburg.STY AS Y<\/pre>\n<pre>X       Y\n604931  7107923<\/pre>\n<h3>\u5730\u7406\u5ea7\u6a19\u5024\u3092\u8fd4\u3059<\/h3>\n<p>\u3000geography \u578b\u3092\u4f7f\u3046\u3068\u304d\uff0cSTX \u304a\u3088\u3073 STY \u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u540c\u7b49\u306e\u6a5f\u80fd\u306f\u4ee3\u308f\u308a\u306b Lat \u304a\u3088\u3073 Long \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u308b\uff0e\u3053\u308c\u3089\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f STX \u304a\u3088\u3073 STY \u3068\u540c\u69d8\u306b\u6b63\u78ba\u306b\u4f5c\u7528\u3059\u308b\u304c\uff0cPoint \u306e x \u5ea7\u6a19\u5024\u304a\u3088\u3073 y \u5ea7\u6a19\u5024\u306b\u95a2\u3059\u308b\u306e\u3068\u9055\u3063\u3066\uff0c\u305d\u308c\u3089\u306f\u7d4c\u5ea6\u3068\u7def\u5ea6\u3092\u53d6\u5f97\u3059\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000Lat \u304a\u3088\u3073 Long \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000Lat \u304a\u3088\u3073 Long \u30d7\u30ed\u30d1\u30c6\u30a3\u306f geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u6b21\u306e\u3088\u3046\u306b\u9069\u7528\u3055\u308c\u308b\uff0e<\/p>\n<pre>Instance.Lat\nInstance.Long<\/pre>\n<p>\u3000\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u3067\u793a\u3057\u305f\u95a2\u9023\u3059\u308b\u5ea7\u6a19\u5024\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\uff0cSri Lanka \u306e Colombo \u306b\u8a72\u5f53\u3059\u308b Well-Known BInary \u8868\u73fe\u304b\u3089 geography \u578b\u3092\u4f7f\u3063\u3066 Point \u3092\u751f\u6210\u3059\u308b\uff0e\u305d\u3057\u3066 Long \u304a\u3088\u3073 Lat \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066\u305d\u306e Point \u306e\u7d4c\u5ea6\u3068\u7def\u5ea6\u3092\u53d6\u5f97\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @Colombo geography\nSET @Colombo = geography::STGeomFromWKB(0x0101000000666666F65340B81E85EB51B81B40, 4326)\nSELECT\n  @Colombo.Long AS Longitude,\n  @Colombo.Lat AS Latitude<\/pre>\n<pre>Longitude  Latitude\n79.85      6.93<\/pre>\n<h3>\u62e1\u5f35\u5ea7\u6a19\u5024\u3092\u8fd4\u3059<\/h3>\n<p>\u3000\u5fc5\u9808\u306e x \u304a\u3088\u3073 y \u5ea7\u6a19\uff08\u307e\u305f\u306f\u7d4c\u5ea6\u3068\u7def\u5ea6\uff09\u306b\u52a0\u3048\u3066\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u5b9a\u7fa9\u5185\u3067\u5404\u70b9\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067 z \u304a\u3088\u3073 m \u5ea7\u6a19\u3092\u3082\u542b\u3081\u3089\u308c\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u305d\u3046\uff0ez \u5ea7\u6a19\u306f\u9ad8\u5ea6\u3084\u6a19\u9ad8\u3092\u84c4\u7a4d\u3059\u308b\uff0em \u5ea7\u6a19\u306f\u305d\u306e\u70b9\u306b\u95a2\u3059\u308b\u4f55\u3089\u304b\u306e\u6e2c\u5b9a\u5024\u3067\u3042\u308a\uff0c\u6d6e\u52d5\u5c0f\u6570\u70b9\u3067\u8868\u73fe\u3055\u308c\u308b\uff0e\u3053\u308c\u3089\u306e\u4ed8\u52a0\u7684\u306a\u5ea7\u6a19\u5024\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\uff0cz \u304a\u3088\u3073 M \u30d7\u30ed\u30d1\u30c6\u30a3\u3092 Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000z \u304a\u3088\u3073 M \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000m \u304a\u3088\u3073 z \u5ea7\u6a19\u30d7\u30ed\u30d1\u30c6\u30a3\u306f geometry \u578b\u3084 geography \u578b Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306b\u3088\u3046\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\uff0e<\/p>\n<pre>Instance.M\nInstance.Z<\/pre>\n<p>\u3000\u305d\u306e\u7d50\u679c\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u3067\u8868\u73fe\u3057\u305f\u9069\u5207\u306a z \u3042\u308b\u3044\u306f m \u5ea7\u6a19\u5024\u3067\u3042\u308b\uff0e\u5ea7\u6a19\u5024\u304c\u5b9a\u7fa9\u3067\u304d\u306a\u3044\u5834\u5408\uff0cNULL \u304c\u8fd4\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u9023\u90a6\u901a\u4fe1\u59d4\u54e1\u4f1a\u306f\u5408\u8846\u56fd\u5185\u306e\u767b\u9332\u6e08\u307f\u306e\u30a2\u30f3\u30c6\u30ca\u69cb\u9020\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u7dad\u6301\u3057\u3066\u3044\u308b\uff0e\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u69d8\u3005\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u7dad\u6301\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306b\u306f\u30a2\u30f3\u30c6\u30ca\u306e\u7def\u5ea6\u3084\u7d4c\u5ea6\uff0c\u5730\u4e0a\u304b\u3089\u306e\u5168\u4f53\u306e\u9ad8\u3055\u3092\u542b\u3093\u3067\u3044\u308b\uff0e\u305d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u691c\u7d22\u3067\u304d\u308b\uff0ehttp:\/\/wireless2.fcc.gov\/UlsApp\/AsrSearch\/asrRegistrationSearch.jsp<\/p>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u305d\u306e\u3088\u3046\u306a\u30a2\u30f3\u30c6\u30ca\u306e\u4e00\u3064\u3092\u8868\u73fe\u3057\u305f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3059\u308b\uff0e\u5317\u7def 39\u00b049&#8217;54&#8221; \u897f\u7d4c 89\u00b038&#8217;52&#8221; \u306b\u4f4d\u7f6e\u3057\uff0c\u7a7a\u9593\u53c2\u7167\u7cfb EPSG 4269 \u3092\u4f7f\u3046\uff0e\u305d\u306e\u30a2\u30f3\u30c6\u30ca\u306f\u5730\u4e0a\u9ad8 34.7 m \u307e\u3067\u4f38\u3073\uff0c\u305d\u306e\u70b9\u306e z \u5ea7\u6a19\u3067\u8868\u73fe\u3059\u308b\uff0em \u5ea7\u6a19\u306f\u5024 1000131 \u304c\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u304a\u308a\uff0c\u305d\u308c\u306f\u3053\u306e\u30a2\u30f3\u30c6\u30ca\u306b\u5272\u308a\u632f\u3089\u308c\u305f\u53c2\u7167\u30ca\u30f3\u30d0\u30fc\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u305d\u3057\u3066\u305d\u306e\u4f8b\u306f\u3044\u304b\u306b\u3057\u3066 z \u304a\u3088\u3073 m \u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u4f7f\u308f\u308c\u305d\u306e Point \u306e\u8a72\u5f53\u3059\u308b\u5ea7\u6a19\u5024\u304c\u53d6\u5f97\u3055\u308c\u308b\u304b\u3092\u793a\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Antenna geography\nSET @Antenna = geography::STPointFromText('POINT(-89.64778 39.83167 34.7 1000131)', 4269)\nSELECT\n  @Antenna.M AS M,\n  @Antenna.Z AS Z<\/pre>\n<pre>M        Z\n1000131  34.7<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u7279\u5b9a\u306e Point \u3092\u8fd4\u3059<\/h3>\n<p>\u3000STPointN() \u30e1\u30bd\u30c3\u30c9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u500b\u5225\u306e\u70b9\u3092\u7279\u5b9a\u3057\u8fd4\u3059\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0e\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u63d0\u4f9b\u3055\u308c\u308b\u30d1\u30e9\u30e1\u30fc\u30bf n \u306b\u57fa\u3065\u304d\uff0cSTPointN() \u30e1\u30bd\u30c3\u30c9\u306f\u3069\u3093\u306a\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5b9a\u7fa9\u3067\u3082\uff0c\u542b\u307e\u308c\u308b n \u756a\u76ee\u306e\u70b9\u3092\u8fd4\u3059\uff0e<\/p>\n<p>\u3000Figure 11-6 \u306f\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u4f7f\u308f\u308c\u305f\u3068\u304d\u306e STPointN() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000STPointN() \u30e1\u30bd\u30c3\u30c9\u3092\u6709\u52b9\u306b\u4f7f\u3046\u306b\u306f\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u70b9\u304c\u5b9a\u7fa9\u3055\u308c\u308b\u9806\u756a\u3092\u7406\u89e3\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u305f\u306a\u3089\uff0c\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u305f\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306b\u3082\u3068\u3082\u3068\u6e21\u3059\u8868\u73fe\u306e\u9806\u306b\u70b9\u306f\u5217\u6319\u3055\u308c\u3066\u3044\u308b\uff0e\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u304c SQL Server 2008 \u306b\u3088\u308a\uff08\u4ed6\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u7531\u6765\u3067\uff09\u751f\u6210\u3055\u308c\u305f\u306a\u3089\uff0c\u70b9\u306f\u307e\u305a\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u9806\u306b\uff0c\u305d\u3057\u3066\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u30ea\u30f3\u30b0\u9806\u306b\uff0c\u3055\u3089\u306b\u5404\u30ea\u30f3\u30b0\u5185\u306e\u70b9\u306e\u9806\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STPointN() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STPointN() \u30e1\u30bd\u30c3\u30c9\u306f\u6574\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf n \u3092\u63d0\u4f9b\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\uff0e\u305d\u308c\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u8fd4\u308b\u3079\u304d\u70b9\u306e\u5e8f\u6570\u3067\u3042\u308b\uff0e\u305d\u306e\u69cb\u6587\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<pre>Instance.STPointN(n)<\/pre>\n<p>\u3000Instance.STPointN(n) \u306f Instance \u3067\u8868\u73fe\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e n \u756a\u76ee\u306e\u70b9\u3092\u8fd4\u3059\uff0e\u30d1\u30e9\u30e1\u30fc\u30bf n \u306e\u6709\u52b9\u306a\u5024\u306e\u7bc4\u56f2\u306f 1 \uff08\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6700\u521d\u306e\u70b9\uff09\u304b\u3089 STNumPoints() \u306e\u5024\uff08\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6700\u7d42\u70b9\uff09\u307e\u3067\u3067\u3042\u308b\uff0e\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u306f geography \u578b\u307e\u305f\u306f geometry \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\uff0e\u305d\u308c\u306f\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3070\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c7\u30fc\u30bf\u578b\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9 LineString \u3092\u751f\u6210\u3057\uff0c\u30ed\u30f3\u30c9\u30f3\u30de\u30e9\u30bd\u30f3\u306b\u304a\u3044\u3066\u30e9\u30f3\u30ca\u30fc\u304c\u7af6\u8d70\u3059\u308b\u30eb\u30fc\u30c8\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u53ce\u7e2e\u3057\u305f LineString \u7531\u6765\u306e\u500b\u3005\u306e\u70b9\u306f\u30b3\u30fc\u30b9\u306b\u6e21\u308b\u3059\u3079\u3066\u306e\u30de\u30a4\u30eb\u306b\u7b49\u9593\u9694\u3067\u3042\u308b\uff0eSTPointN() \u30e1\u30bd\u30c3\u30c9\u306f LineString \u5185\u306e14\u756a\u76ee\u306e\u70b9\u3092\u9078\u629e\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\uff0c\u305d\u308c\u306f\u30ec\u30fc\u30b9\u306e\u304a\u3088\u305d\u306e\u4e2d\u9593\u70b9\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @LondonMarathon geography<br \/>SET @LondonMarathon = geography::STLineFromText(<br \/>'LINESTRING(0.0112 51.04731, 0.0335 51.4749, 0.0527 51.4803, 0.0621 51.4906,<br \/>0.0448 51.4923, 0.0238 51.4870, 0.0021 51.4843, -0.0151 51.4814,<br \/>-0.0351 51.4861, -0.0460 51.4962, -0.0355 51.5011, -0.0509 51.5013,<br \/>-0.0704 51.4989, -0.0719 51.5084, -0.0493 51.5098, -0.0275 51.5093,<br \/>-0.0257 51.4963, -0.0134 51.4884, -0.0178 51.5003, -0.0195 51.5046,<br \/>-0.0087 51.5072, -0.0278 51.5112, -0.0472 51.5099, -0.0699 51.5084,<br \/>-0.0911 51.5105, -0.1138 51.5108, -0.1263 51.5010, -0.1376 51.5031)',<br \/>4326)<br \/>SELECT<br \/>  @LondonMarathon AS Shape,<br \/>  @LondonMarathon.STPointN(14) AS Point14,<br \/>  @LondonMarathon.STPointN(14).STAsText() AS WKT<\/pre>\n<pre>POINT(-0.0719 51.5084)<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u3092\u898b\u3064\u3051\u308b<\/h3>\n<p>\u3000STStartPoint() \u304a\u3088\u3073 STEndPoint() \u306f\u201d\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u201d\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308a\uff0c\u305d\u308c\u305e\u308c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6700\u521d\u306e\u70b9\u3068\u6700\u5f8c\u306e\u70b9\u306e\u8fd4\u308b\u7279\u5225\u306a\u5834\u5408\u306b\u4f7f\u3063\u305f STPointN() \u3068\u540c\u3058\u7d50\u679c\u3092\u63d0\u4f9b\u3059\u308b\uff0e<\/p>\n<ul>\n<li>STStartPoint() \u306f STPointN(1) \u3068\u7b49\u4fa1\u3067\u3042\u308b<\/li>\n<li>STEndPoint() \u306f STPointN(STNumPoints()) \u3068\u7b49\u4fa1\u3067\u3042\u308b<\/li>\n<\/ul>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STStartPoint() \u304a\u3088\u3073 STEndPoint() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STStartPoint() \u304a\u3088\u3073 STEndPoint() \u30e1\u30bd\u30c3\u30c9\u306fgeography \u578b\u3084 geometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STStartPoint()\nInstance.STEndPoint()<\/pre>\n<p>\u3000\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306fgeography \u578b\u306a\u3044\u3057 geometry \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\uff0c\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3070\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u578b\u3068\u4e00\u81f4\u3059\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u30001919 \u5e74 5 \u6708\uff0cAlbert Read \u5c11\u4f50\u306e\u7387\u3044\u308b5\u540d\u306e\u98db\u884c\u58eb\u304c\u5927\u897f\u6d0b\u6a2a\u65ad\u98db\u884c\u306b\u6210\u529f\u3057\u305f\uff0eRockaway Naval \u7a7a\u6e2f\u3092\u51fa\u767a\u3057\uff0cRaed \u306f\u5f7c\u306e\u98db\u884c\u6a5f NC-4 \u3092 Nova Scotia \u306e Halifax \u307e\u3067\u64cd\u7e26\u3057\uff0c\u305d\u3057\u3066\u30a2\u30be\u30ec\u30b9\u8af8\u5cf6\u306e Horta \u5cf6\u306b\u6e21\u308b\u524d\u306b Newgoundland \u306e Trepassey \u4e0a\u7a7a\u3092\u901a\u904e\u3057\u305f\uff0e\u30a2\u30be\u30ec\u30b9\u8af8\u5cf6\u304b\u3089\uff0c\u30af\u30eb\u30fc\u306f\u30dd\u30eb\u30c8\u30ac\u30eb\u306e\u30ea\u30b9\u30dc\u30f3\u306b\u51fa\u767a\u3057\uff0c\u30b9\u30da\u30a4\u30f3\u306b\u5c11\u3057\u7acb\u3061\u5bc4\u308a\uff0c\u6700\u5f8c\u306b\u30a4\u30f3\u30b0\u30e9\u30f3\u30c9\u306e Plymouth \u3067\u65c5\u3092\u5b8c\u4e86\u3057\u305f\uff0e\u6b21\u306e\u4f8b\u306f\u53d6\u3089\u308c\u305f\u7d4c\u8def\u306e\u304a\u3088\u305d\u3092\u8868\u73fe\u3059\u308b LineString \u3092\u751f\u6210\u3057\uff0cSTStartPoint() \u3068 STEndPoint() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u65c5\u306e\u6700\u521d\u3068\u6700\u5f8c\u306e\u70b9\u3092\u8fd4\u3059\uff0e<\/p>\n<pre>DECLARE @TransatLatinCrossing geography\nSET @TransatlatinCrossing = geography::STLineFromText('\nLINESTRING(\n  -73.88 40.57, -63.57 44.65, -53.36 46.74, -28.63 38.54,\n  28.24 38.42, -9.14 38.71, -8.22 43.49, -4.14 50.37)',\n  4326\n)\nSELECT\n  @TransatLatinCrossing AS Shape,\n  @TransatLatinCrossing.STStartPoint().STAsText() AS StartPoint,\n  @TransatLatinCrossing.STEndPoint().STAsText() AS EndPoint<\/pre>\n<pre>StartPoint            EndPoint\nPOINT (-73.88 40.57)  POINT (-4.14 50.37)<\/pre>\n<h3>geometry \u578b\u306e Polygon \u306e\u91cd\u5fc3\u3092\u6c42\u3081\u308b<\/h3>\n<p>\u3000polygon \u306e\u91cd\u5fc3\u306f\u201d\u91cd\u529b\u306e\u4e2d\u5fc3\u201d\u3068\u8003\u3048\u3089\u308c\u3066\u3044\u308b\uff0e\u305d\u306e\u70b9\u3067\u306f Plolygon \u306b\u542b\u307e\u308c\u308b\u9762\u7a4d\u304c\u7b49\u3057\u304f\u5206\u5e03\u3059\u308b\uff0e\u91cd\u5fc3\u306e\u4f4d\u7f6e\u306f\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5f62\u72b6\u5168\u4f53\u306b\u57fa\u3065\u304f\u8a08\u7b97\u304b\u3089\u6570\u5b66\u7684\u306b\u7531\u6765\u3059\u308b\uff0eSQL Server 2008 \u3067\u306f\uff0cSTCentroid() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\uff0c\u3044\u304b\u306a\u308b geometry \u578b\u306e Polygon \u306e\u91cd\u5fc3\u3092\u3082\u8868\u73fe\u3059\u308b Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u3000Figure 11-7 \u306f\u3044\u304f\u3064\u304b\u306e geometry \u578b\u306e Polygon \u306e\u91cd\u5fc3\u3092\u793a\u3057\u3066\u3044\u308b\uff08\u7565\uff09\uff0e<\/p>\n<p>\u6ce8\u610f\u3000Polygon \u306e\u91cd\u5fc3\u306f\u5fc5\u305a\u3057\u3082 Polygon \u5185\u90e8\u306b\u3042\u308b\u5fc5\u8981\u306f\u306a\u3044\uff0ePolygon \u304c\u5747\u7b49\u306b\u5206\u5e03\u3059\u308b\u70b9\u3067\u3042\u308c\u3070\u3088\u3044\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STCentroid() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STCentroid() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8981\u305b\u305a\uff0cgeometry \u578b\u306e Polygon \u307e\u305f\u306f MultiPolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STCentroid()<\/pre>\n<p>\u3000STCentroid() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308a\uff0c\u547c\u3070\u308c\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u540c\u3058 SRID \u3092\u4f7f\u3063\u3066\u5ba3\u8a00\u3055\u308c\u308b\uff0eSTCentroid() \u306f Polygon \u307e\u305f\u306f MultiPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u3057\u304b\u4f7f\u3048\u306a\u3044\u3053\u3068\u306f\u660e\u8a18\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\uff0e\u4eee\u306b Point \u3084 LineString \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u4f7f\u3046\u3068\uff0c\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f NULL \u3092\u8fd4\u3059\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f Colorado \u5dde\u3092\u8868\u73fe\u3059\u308b Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0cSTCentroid() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e Polygon \u306e\u91cd\u5fc3\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Colorado geometry<br \/>SET @Colorado = geometry::STGeomFromText('POLYGON((-102.0423 36.9931, -102.0518 <br \/>41.0025, -109.0501 41.0006, -109.0452 36.9990, -102.0423 36.9931))', 4326)<br \/>SELECT<br \/>  @Colorado.STCentroid() AS Centroid,<br \/>  @Colorado.STCentroid().STAsText() AS WKT<\/pre>\n<pre>POINT (-105.54621375420314 38.99851021101813)<\/pre>\n<p>\u3000\u3053\u308c\u306f\u5dde\u306e\u4e2d\u5fc3\u306b\u3042\u308b Elevenmile Canyon \u8caf\u6c34\u6c60\u304b\u3089\u6570\u30de\u30a4\u30eb\u5317\u306e\u4f4d\u7f6e\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e<\/p>\n<h3>geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4e2d\u5fc3\u3092\u6c42\u3081\u308b<\/h3>\n<p>\u3000STCentroid() \u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u306b\u306f\u9069\u7528\u3067\u304d\u306a\u3044\uff0e\u3057\u304b\u3057\uff0c\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u306f EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\uff0eEnvelopeCenter() \u306f\uff0c\u5730\u7403\u306e\u4e2d\u5fc3\u304b\u3089\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u5404\u70b9\u3078\u306e\u4f4d\u7f6e\u3092\u8a18\u8ff0\u3059\u308b\u4f4d\u7f6e\u30d9\u30af\u30c8\u30eb\u3092\u5e73\u5747\u3057\uff0c\u305d\u306e\u7d50\u679c\u306e\u4f4d\u7f6e\u3092\u30d7\u30ed\u30c3\u30c8\u3059\u308b Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059\uff0e\u3053\u308c\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u3067\u3082\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u4e2d\u5fc3\u4f4d\u7f6e\u306e\u975e\u5e38\u306b\u5358\u7d14\u306a\u8fd1\u4f3c\u3067\u3042\u308b\uff0ePolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u3057\u304b\u4f7f\u3048\u306a\u3044 geometry \u578b\u306e STCentroid() \u30e1\u30bd\u30c3\u30c9\u3068\u306f\u5bfe\u7167\u7684\u306b\uff0cEnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u306a\u3089\u3069\u3093\u306a\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u3082\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u5404\u4e00\u610f\u306e\u70b9\u306e\u5e73\u5747\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\uff0e\u4eee\u306b geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306b\u540c\u3058\u70b9\u304c2\u56de\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\uff0c\u30ea\u30f3\u30b0\u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u306e\u3088\u3046\u306a\u5834\u5408\u3060\u304c\uff0c\u3053\u306e\u70b9\u306f\u8a08\u7b97\u306b\u304a\u3044\u3066\u306f1\u56de\u3060\u3051\u542b\u307e\u308c\u308b\uff0e<\/p>\n<p>\u3000Figure 11-8 \u306f\uff0c\u70b9 P1, P2, P3 \u304a\u3088\u3073 P4 \u3067\u5b9a\u7fa9\u3055\u308c\u305f geography \u578b\u306e Polygon \u304b\u3089\u8a08\u7b97\u3055\u308c\u305f EnvelopeCenter() \u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3092\u793a\u3057\u3066\u3044\u308b\uff0e\u5730\u7403\u306e\u4e2d\u5fc3\u304b\u3089\u5404\u70b9\u306e\u4f4d\u7f6e\u3092\u8a18\u8ff0\u3057\u305f\u4f4d\u7f6e\u30d9\u30af\u30c8\u30eb\u306f\u5e73\u5747\u3055\u308c\u3066\uff08\u70b9 P1 \u306b\u3064\u3044\u3066\u306f Polygon \u30ea\u30f3\u30b0\u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u3092\u8868\u73fe\u3057\u3066\u304a\u308a\uff0c\u4e00\u5ea6\u3060\u3051\u542b\u307e\u308c\u308b\uff09\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u7d50\u679c\u306e\u4f4d\u7f6e\u306b\u4f4d\u7f6e\u3059\u308b\u70b9\u3092\u8fd4\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u3067\u3082 geomgraphy \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u306a\u3089\u6b21\u306e\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<pre>Instance.EnvepopeCenter()<\/pre>\n<p>\u3000\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306fgeography \u578b\u306e Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308a\uff0c\u63d0\u4f9b\u3055\u308c\u305f\u5143\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u540c\u3058\u7a7a\u9593\u53c2\u7167\u7cfb\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f Utah \u5dde\u3092\u8868\u3059geography \u578b\u306e Polygon \u3092\u751f\u6210\u3057\uff0cEnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 Polygon \u306e\u4e2d\u5fc3\u306b\u3042\u308b\u70b9\u3092\u8fd4\u3059\uff0e<\/p>\n<pre>DECLARE @Utah geography\nSET @Utah = geography::STPolyFromText(\n  'POLYGON((-109 37, -109 41, -111 41, -111 42, -114 42, -114 37, -109 37))', 4326)\nSELECT\n  @Utah AS Shape,\n  @Utah.EnvelopeCenter() AS EnvelopeCenter,\n  @Utah.EnvelopeCenter().STAsText() AS WKT<\/pre>\n<pre>POINT (111.33053985766453 40.018634026864916)<\/pre>\n<p>\u3000Figure 11-9 \u306f\u305d\u306e\u5dde\u306e\u5f62\u72b6\u5168\u4f53\u306e Polygon \u8868\u73fe\u306b\u95a2\u9023\u3057\u305f\u3053\u306e\u70b9\u3092\u793a\u3057\u3066\u304a\u308a\uff0c\u30e1\u30eb\u30ab\u30c8\u30eb\u6295\u5f71\u3092\u4f7f\u3063\u3066\u6295\u5f71\u3057\u3066\u3044\u308b\uff0eEnvelopeCenter() \u304b\u3089\u5f97\u3089\u308c\u305f\u3053\u306e\u70b9\u306f\uff0c\u5ea7\u6a19\u5024\u306e\u6700\u5927\u5024\u3068\u6700\u5c0f\u5024\u306e\u5e73\u5747\u304b\u3089\u5f97\u3089\u308c\u305f\u5e7e\u4f55\u5b66\u7684\u4e2d\u5fc3\u304b\u3089\u306f\u5c11\u3057\u5317\u6771\u306b\u305a\u308c\u3066\u3044\u308b\uff0e\u3053\u308c\u306f\u3053\u306e Polygon \u306e\u5b9a\u7fa9\u304c\uff0c\u3053\u306e\u5dde\u306e\u5317\u6771\u90e8\u306b\u304a\u3044\u3066\u51f9\u3093\u3060\u89d2\u3092\u5b9a\u7fa9\u3059\u308b\u70b9\u304c\uff0c\u4ed6\u306e\uff13\u3064\u306e\u89d2\u3088\u308a\u5927\u304d\u306a\u5bc6\u5ea6\u3092\u6709\u3057\u3066\u3044\u308b\u4e8b\u5b9f\u306b\u7531\u6765\u3057\u3066\u3044\u308b\uff0e\u3053\u308c\u306b\u3088\u308a EnvelopeCenter() \u3067\u8a08\u7b97\u3055\u308c\u305f\u5e73\u5747\u30d9\u30af\u30c8\u30eb\u306f\u5317\u6771\u306b\u52a0\u91cd\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\uff08\u7565\uff09\uff0e<\/p>\n<p>\u6ce8\u610f\u3000EnvelopeCenter() \u306f geography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4e2d\u5fc3\u70b9\u306e\u8fd1\u4f3c\u3092\u8a08\u7b97\u3059\u308b\u3060\u3051\u3067\u3042\u308b\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u4efb\u610f\u306e\u70b9\u3092\u8fd4\u3059<\/h3>\n<p>\u3000STPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u306e\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u3082\u4f7f\u308f\u308c\uff0c\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u90e8\u306b\u3042\u308b\u4efb\u610f\u306e\u70b9\u3092\u8fd4\u3059\uff0eSTPointOfSurface() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306b\u4f9d\u5b58\u3059\u308b\uff0e<\/p>\n<ul>\n<li>LineString \u3084 MultiLineString \u306a\u3089\uff0c\u305d\u306e\u7d50\u679c\u306f LineString \u4e0a\u306b\u3042\u308b Point \u3067\u3042\u308b\uff0e<\/li>\n<li>Polygon \u306a\u3089\uff0c\u305d\u306e\u7d50\u679c\u306f\u5916\u90e8\u30ea\u30f3\u30b0\u5185\u306e Point \u3067\u3042\u308b\uff08\u5185\u90e8\u30ea\u30f3\u30b0\u5185\u306e\u70b9\u306f\u542b\u307e\u308c\u306a\u3044\uff09\uff0e<\/li>\n<li>Point \u306a\u3089\uff0c\u305d\u306e\u7d50\u679c\u306f\u305d\u306e Point \u81ea\u8eab\u3067\u3042\u308a\uff0cMultiPoint \u306e\u5834\u5408\u306f\uff0cMultiPoint Collection \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u3044\u305a\u308c\u304b\u4e00\u3064\u306e Point \u3067\u3042\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000\u201d\u306a\u305c\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u4e00\u3064\u306e\uff0c\u4efb\u610f\u306e\u70b9\u304c\u307b\u3057\u3044\u306e\u304b\uff1f\u201d\u305d\u3046\u6238\u60d1\u3046\u304b\u3082\u3057\u308c\u306a\u3044\uff0e\u201d\u78ba\u304b\u306b\uff0cPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5f62\u72b6\u5168\u4f53\u3092\u8868\u73fe\u3059\u308b Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5f97\u305f\u3044\u306a\u3089\uff0c\u4f8b\u3048\u3070\uff0cSTCentroid() \u30e1\u30bd\u30c3\u30c9\u3092\u4ee3\u308f\u308a\u306b\u4f7f\u3063\u305f\u307b\u3046\u304c\u826f\u304f\u306a\u308b\u306e\u3067\u306f\u306a\u3044\u304b\uff1f\u305d\u306e\u5f62\u72b6\u5185\u306e\u4e00\u70b9\u304c\u8fd4\u308b\u306e\u3060\u304b\u3089\u201d\u3053\u306e\u7591\u554f\u306b\u5bfe\u3059\u308b\u7b54\u3048\u306f\u3053\u3046\u3067\u3042\u308b\uff0eSTCentroid() \u30e1\u30bd\u30c3\u30c9\u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u91cd\u5fc3\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\u304c\uff0c\u7d50\u679c\u306e Point \u306f\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u305d\u306e\u3082\u306e\u306e\u5185\u90e8\u306b\u306f\u5fc5\u305a\u3057\u3082\u542b\u307e\u308c\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\uff0e\u5bfe\u7167\u7684\u306b\uff0cSTPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u5e38\u306b\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3070\u308c\u305f\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u90e8\u306b\u3042\u308b\u3053\u3068\u304c\u4fdd\u8a3c\u3055\u308c\u305f\u4e00\u70b9\u3067\u3042\u308b\uff0c\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u306e\u307f\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STPointOnSurface()<\/pre>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0cSTPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066 Polygon \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u4efb\u610f\u306e\u70b9\u3092\u8fd4\u3059\uff0e<\/p>\n<pre>DECLARE @Polygon geometry\nSET @Polygon = geometry::STGeomFromText('POLYGON((10 2, 10 4, 5 4, 5 2, 10 2))', 0)\nSELECT\n  @Polygon AS Shape,\n  @Polygon.STPointOnSurface() AS PoinOnSurface,\n  @Polygon.STPointOnSurface().STAsText() AS WKT<\/pre>\n<pre>POINT (8.3333333333333339 3.3333333333333335)<\/pre>\n<p>\u4ed8\u8a18\u3000STPointOnSurface() \u30e1\u30bd\u30c3\u30c9\u306f\u4efb\u610f\u306e\u70b9\u3092\u8fd4\u3059\u304c\uff0c\u30e9\u30f3\u30c0\u30e0\u306a\u70b9\u3067\u306f\u306a\u3044\uff0e\u5148\u8ff0\u3057\u305f\u4f8b\u3092\u4f55\u5ea6\u304b\u5b9f\u884c\u3059\u308b\u306a\u3089\uff0c\u5404\u72b6\u6cc1\u3067\u540c\u3058\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u3060\u308d\u3046\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u9577\u3055\u3092\u8a08\u6e2c\u3059\u308b<\/h3>\n<p>\u3000STLength() \u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u9577\u3055\u3092\u8fd4\u3059\uff0eLineString \u306b\u4f7f\u3046\u3068\u304d\uff0c\u3053\u308c\u306f\u70b9\u3092\u7d50\u3093\u3060\u7dda\u5206\u306e\u9577\u3055\u306e\u5408\u8a08\u3092\u4e0e\u3048\u308b\uff0ePolygon \u306b\u4f7f\u3046\u3068\u304d\uff0c\u3053\u308c\u306fpolygon \u306e\u5b9a\u7fa9\u3055\u308c\u305f\u30ea\u30f3\u30b0\u3059\u3079\u3066\u306e\u9577\u3055\u3092\u8868\u73fe\u3059\u308b\uff0ePolygon \u304c\u4e00\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080\u5834\u5408\uff0cSTLength() \u306f\u3086\u3048\u306b Polygon \u306e\u5916\u5468\u306e\u9577\u3055\u3092\u8fd4\u3059\uff0eMultiLineString \u306e\u3088\u3046\u306a\u591a\u8981\u7d20\u578b\u306b\u7528\u3044\u305f\u5834\u5408\uff0cSTLength() \u30e1\u30bd\u30c3\u30c9\u306f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\uff0c\u307e\u305f\u306f Geometry Collection \u5185\u90e8\u306e\u3059\u3079\u3066\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u3059\u3079\u3066\u306e\u9577\u3055\u306e\u5408\u8a08\u3092\u8fd4\u3059\uff0eFigure 11-10 \u306f\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b STLength() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STLength() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STLength() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u307e\u305f\u306f geography \u578b\u306e\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u3082\u6b21\u306e\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<pre>Instance.STLength()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u5024\u3067\uff0c\u554f\u984c\u306b\u3057\u3066\u3044\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u9577\u3055\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0egeography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3068\u3063\u3066\uff0c\u305d\u306e\u7d50\u679c\u306f sys.spatial_reference_system \u30c6\u30fc\u30d6\u30eb\u306e unit_of_measure \u5217\u306e\u5358\u4f4d\u3067\u8a18\u8ff0\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\uff0c\u305d\u308c\u306f\u305d\u306e\u5ea7\u6a19\u304c\u8a18\u8ff0\u3055\u308c\u305f SRID \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\uff0egeometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u3068\u3063\u3066\u306f\uff0c\u305d\u306e\u7d50\u679c\u306f\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u81ea\u4f53\u306e\u5ea7\u6a19\u3068\u540c\u3058\u8a08\u6e2c\u5358\u4f4d\u3067\u8a18\u8ff0\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000The Royal Mile \u306f\u30a8\u30c7\u30a3\u30f3\u30d0\u30e9\u57ce\u3068\u30db\u30ea\u30fc\u30eb\u30fc\u30c9\u5bae\u6bbf\u3092\u7d50\u3076\u76f4\u7dda\u9053\u8def\u3067\u3042\u308a\uff0c\u30a8\u30c7\u30a3\u30f3\u30d0\u30e9\u3067\u6700\u3082\u53e4\u3044\u9053\u8def\u306e\u4e00\u3064\u3067\u3042\u308b\uff0e\u6b21\u306e\u4f8b\u306f the Royal Mile \u3092\u8868\u73fe\u3059\u308b LineString \u3092\u751f\u6210\u3057\uff0cSTLength() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e\u9577\u3055\u3092\u5b9a\u7fa9\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @RoyalMile geography;\nSET @RoyalMile = geography::STLineFromText(\n  'LINESTRING(-3.20001 55.94821, -3.17227 55.9528)', 4326)\nSELECT\n  @RoyalMile AS Shape,\n  @RoyalMile.STLength() AS Length<\/pre>\n<pre>1806.77067641223<\/pre>\n<p>\u3000@RoyalMile LineString \u306e\u5ea7\u6a19\u306f EPSG 4326 \u7a7a\u9593\u53c2\u7167\u7cfb\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\uff0c\u305d\u306e\u7d50\u679c\u306f\u305d\u306e\u7cfb\u306e\u8a08\u6e2c\u5358\u4f4d\u3067\u3042\u308b\u30e1\u30fc\u30c8\u30eb\u3067\u8a18\u8ff0\u3055\u308c\u308b\uff0e<\/p>\n<p>\u30001824 \u5e74\u4ee5\u524d\uff0c1807 \u30e1\u30fc\u30c8\u30eb\u306e\u7d50\u679c\u306f the Royal Mile \u306e\u9577\u3055\u3092\u6e2c\u5b9a\u3057\u305f\u306e\u3068\u540c\u69d8\uff0cScottish mile \u306e\u5b9a\u7fa9\u3067\u3042\u3063\u305f\uff0e\u3053\u308c\u306f\u4eca\u65e5\u4f7f\u308f\u308c\u308b\u30de\u30a4\u30eb\uff0c\u305d\u308c\u306f\u7d04 1609 \u30e1\u30fc\u30c8\u30eb\u306b\u7b49\u3057\u3044\u304c\uff0c\u3088\u308a\u3082\u9577\u3044\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u542b\u307e\u308c\u308b\u9762\u7a4d\u3092\u8a08\u7b97\u3059\u308b<\/h3>\n<p>\u3000STArea() \u30e1\u30bd\u30c3\u30c9\u306f\u8a08\u7b97\u306b\u4f7f\u308f\u308c\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3088\u308a\u5360\u3081\u3089\u308c\u308b\u9762\u7a4d\u3092\u8fd4\u3059\uff0e0 \u6b21\u5143\u307e\u305f\u306f 1 \u6b21\u5143\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u4f7f\u308f\u308c\u305f\u5834\u5408\uff08Point \u3084 LineString \u306a\u3069\uff09\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306f 0 \u3092\u8fd4\u3059\uff0e<\/p>\n<p>\u3000geography \u578b\u306b\u4f7f\u308f\u308c\u305f\u3068\u304d\uff0cSTArea() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7a7a\u9593\u53c2\u7167\u578b\u306b\u3088\u308a\u5b9a\u7fa9\u3055\u308c\u305f\u8a08\u6e2c\u5358\u4f4d\u306e\uff12\u4e57\u3067\u8fd4\u308b\uff0e\u4f8b\u3048\u3070\uff0cSRID 4326 \u3067\u7279\u5b9a\u3055\u308c\u305f geography \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066\u4f7f\u3046\u3068\u304d\uff0cSTArea() \u3067\u8fd4\u308b\u7d50\u679c\u306f\u5e73\u65b9\u30e1\u30fc\u30c8\u30eb\u3067\u8868\u73fe\u3055\u308c\u308b\u304c\uff0cSRID 4157 \u3092\u4f7f\u3046\u3068\u304d\u306f\uff0c\u305d\u306e\u8a08\u6e2c\u5358\u4f4d\u306f\u5e73\u65b9\u30d5\u30a3\u30fc\u30c8\u3067\u3042\u308b\uff0egeomatry \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3066\u4f7f\u3046\u3068\u304d\uff0c\u305d\u306e\u8a08\u6e2c\u5358\u4f4d\u306f\u63d0\u4f9b\u3055\u308c\u305f\u5ea7\u6a19\u306e\u5358\u4f4d\u306e\uff12\u4e57\u3067\u3042\u308b\uff0eFigure 11-11 \u306b\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b STArea() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u3068\u304d\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STArea() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STArea() \u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u3084 geometry \u578b\u306e\u3044\u304b\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u3082\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u305b\u308b\uff0e<\/p>\n<pre>Instance.STArea()<\/pre>\n<p>\u3000STArea() \u306e\u7d50\u679c\u306f\u6700\u4f4e\u3067\u30821\u500b\u306e Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u307e\u306a\u3044\u9650\u308a\uff0c\u3044\u304b\u306a\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u5bfe\u3057\u3066\u3082 0 \u3068\u306a\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f geometry \u578b\u306e Polygon \u3092\u751f\u6210\u3057\uff0c\u305d\u308c\u306f UTM Zonre 31N \u6295\u5f71 (EPSG 32631) \u3092\u4f7f\u3063\u3066\u5357\u30d5\u30e9\u30f3\u30b9\u306e\u571f\u5730\u306e\u4e00\u753b\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u305d\u306e\u4e00\u753b\u306b\u306f\u95a2\u9023\u3059\u308b\u30b3\u30b9\u30c8\u304c\u3042\u308a\uff0c\u305d\u308c\u3092\u5909\u6570 @Cost \u3067\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u9069\u7528\u3057\u305f STArea() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3067\u7dcf\u30b3\u30b9\u30c8\u3092\u9664\u7b97\u3059\u308b\u3053\u3068\u3067\uff0c\u571f\u5730\u306e1\u5e73\u65b9\u30e1\u30fc\u30c8\u30eb\u3042\u305f\u308a\u306e\u30b3\u30b9\u30c8\u3092\u3072\u306d\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<pre>DECLARE @Cost money = 80000\nDECLARE @Plot geometry\nSET @Plot = geometry::STPolyFromText(\n  'POLYGON((633000 4913260, 633000 4913447, 632628 4913447, 632642 4913260, 633000 4913260))',\n  32631)\nSELECT\n  @Plot AS Shape,\n  @Cost \/ @Plot.STArea() AS PerUnitAreaCost<\/pre>\n<pre>1.1720753058384<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e SRID \u3092\u8a2d\u5b9a\u30fb\u53d6\u5f97\u3059\u308b<\/h3>\n<p>\u3000geography \u578b\u3084 geometry \u578b\u306e\u3044\u305a\u308c\u304b\u3089\u751f\u6210\u3057\u305f\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3082\u3059\u3079\u3066\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u95a2\u9023\u3059\u308b\u7a7a\u9593\u53c2\u7167\u8b58\u5225\u5b50\u3092\u6709\u3057\u3066\u3044\u308b\uff0e\u305d\u308c\u306f\u5ea7\u6a19\u306e\u5f97\u3089\u308c\u305f\u30b7\u30b9\u30c6\u30e0\u3092\u5b9a\u7fa9\u3057\uff0c\u5730\u7403\u4e0a\u306e\u4f4d\u7f6e\u3092\u4e00\u610f\u306b\u8b58\u5225\u3059\u308b\u3053\u3068\u3092\u53ef\u80fd\u3068\u3059\u308b\uff0eSTSrid \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3044\u304b\u306a\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e SRID \u3092\u3082\u8fd4\u3057\uff0c\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STSrid \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STSrid \u30d7\u30ed\u30d1\u30c6\u30a3\u306fgeometry \u578b\u304a\u3088\u3073 geography \u578b\u306e\u4e21\u8005\u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STSrid<\/pre>\n<p>\u3000STSrid \u3067\u306f\u4e00\u822c\u7684\u3067\u306f\u306a\u3044\u304c\uff0c\u305f\u3044\u3066\u3044\u306e\u7a7a\u9593\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u30ea\u30fc\u30c9\u30aa\u30f3\u30ea\u30fc\u3060\u304c\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e SRID \u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u5ea7\u6a19\u306e\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\uff0c\u7a7a\u9593\u53c2\u7167\u7cfb\u306e\u8a18\u8ff0\u3055\u308c\u3066\u3044\u306a\u3044\uff0c\u672a\u77e5\u306e\u30bd\u30fc\u30b9\u304b\u3089\u6295\u5f71\u5ea7\u6a19\u3092\u8a18\u8ff0\u3057\u305f\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u3044\u304f\u3064\u304b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3044\u3068\u4eee\u5b9a\u3057\u3088\u3046\uff0e\u6295\u5f71\u5ea7\u6a19\u306f\u5e73\u9762\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\uff0c\u307e\u305a\u305d\u306e\u30c7\u30fc\u30bf\u3092 SRID 0 \u3092\u4f7f\u3063\u3066 geometry \u578b\u306e\u5217\u306b\u6b21\u306e\u3088\u3046\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<pre>CREATE TABLE #Imported_Data (\n  Location geometry\n)\nINSERT INTO #Imported_Data VALUES\n(geometry::STGeomFromText('LINESTRING(122 74, 123 72)', 0))\n(geometry::STGeomFromText('LINESTRING(140 65, 132 63)', 0))<\/pre>\n<pre>SELECT\n  Location.STAsText(),\n  Location.STSrid\nFROM #Imported_Data<\/pre>\n<pre>LINESTRING (122 74, 123 72)  0\nLINESTRING(140 65, 132 63)  0<\/pre>\n<p>\u3000\u4eca\u5ea6\u306f\uff0c\u633f\u5165\u3055\u308c\u305f\u30c7\u30fc\u30bf\uff0cEPSG 32731 \u53c2\u7167\u7cfb\u306b\u57fa\u3065\u304f\u6295\u5f71\u5ea7\u6a19\u306b\u95a2\u3059\u308b\u30c7\u30fc\u30bf\u3092\u767a\u898b\u3059\u308b\u3068\u4eee\u5b9a\u3057\u3088\u3046\uff0e\u3086\u3048\u306b\u3053\u308c\u3092\u53cd\u6620\u3059\u308b\u305f\u3081\u306b\u3042\u306a\u305f\u306e\u30c7\u30fc\u30bf\u3059\u3079\u3066\u3092\u66f4\u65b0\u3057\u305f\u3044\uff0e\u3053\u308c\u3092\u884c\u3046\u305f\u3081\uff0cSTSrid \u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5024\u3092 UPDATE \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u6b21\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3067\u304d\u308b\uff0e<\/p>\n<pre>UPDATE #Imported_Data\n  SET Location.STSrid = 32731<\/pre>\n<pre>SELECT\n  Location.STAsText(),\n  Location.STSrid\nFROM #Imported_Data<\/pre>\n<pre>LINESTRING (122 74, 123 72)  32731\nLINESTRING (140 65, 132 63)  32731<\/pre>\n<p>\u4ed8\u8a18\u3000\u6307\u5b9a\u3057\u3066\u3044\u308b\u7570\u306a\u308b SRID \u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5ea7\u6a19\u5024\u3092\u305d\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u518d\u6295\u5f71\u3057\u306a\u3044\uff0e\u305d\u308c\u306f\u305f\u3060\uff0c\u305d\u308c\u3089\u306e\u5ea7\u6a19\u304c\u5b9a\u7fa9\u3055\u308c\u305f\u30b7\u30b9\u30c6\u30e0\u306e\u8a18\u8ff0\u3092\u63d0\u4f9b\u3059\u308b\u306e\u307f\u3067\u3042\u308b\uff0e<\/p>\n<h3>Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5916\u90e8\u30ea\u30f3\u30b0\u3092\u5358\u96e2\u3059\u308b<\/h3>\n<p>\u3000\u5148\u8ff0\u3057\u305f\u3088\u3046\u306b\uff0cPolygon \u306f\u3044\u304f\u3064\u304b\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u542b\u3080\u5834\u5408\u304c\u3042\u308b\uff0e\u305d\u308c\u306f\u201d\u7a74\u201d\u3068\u5b9a\u7fa9\u3055\u308c\uff0c\u4e3b\u8981\u306a Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u5207\u308a\u53d6\u308b\u7a7a\u9593\u306e\u9762\u7a4d\u306e\u3053\u3068\u3067\u3042\u308b\uff0e\u3068\u304d\u306b\uff0c\u3057\u304b\u3057\uff0c\u305d\u306e\u5185\u90e8\u306b\u5b9a\u7fa9\u3055\u308c\u308b\u3044\u304b\u306a\u308b\u5185\u90e8\u30ea\u30f3\u30b0\u3082\u7121\u8996\u3057\u3066 Polygon \u306e\u5916\u90e8\u30ea\u30f3\u30b0\u3060\u3051\u3092\u8fd4\u3059\u3053\u3068\u304c\u6709\u76ca\u3067\u3042\u308b\u3053\u3068\u3082\u3042\u308b\uff0eSTExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u3053\u306e\u5834\u5408\u306b\u4f7f\u308f\u308c\u308b\uff0e\u305d\u308c\u306f LineString \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\uff0cPolygon \u5f62\u72b6\u306e\u5916\u90e8\u5468\u7e01\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0eFigure 11-12 \u306b geometry \u578b\u306e Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066 STExteriorRIng() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u3068\u304d\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u306e Polygon \u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STExterorRing()<\/pre>\n<p>\u3000STExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306fLineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3042\u308a\uff0c\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3070\u308c\u305f\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u540c\u3058 SRID \u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u5927\u6587\u5b57\u306e A \u306e\u5f62\u3092\u3057\u305f geometry \u578b\u306e Polygon \u3092\u751f\u6210\u3059\u308b\uff0eSTExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u305d\u306e Polygon \u306e\u5916\u5468\u3092\u8fd4\u3059\uff0e<\/p>\n<pre>DECLARE @A geometry<br \/>SET @A = geometry::STPolyFromText(<br \/>'POLYGON((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0),<br \/>(7 8, 13 8, 10 16, 7 8))',<br \/>0)<br \/>SELECT<br \/>  @A AS Shape,<br \/>  @A.STExteriorRing() AS ExteriorRing,<br \/>  @A.STExteriorRing().STAsText() AS WKT<\/pre>\n<pre>LINESTRING (0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0)<\/pre>\n<p>\u4ed8\u8a18\u3000STExteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u5916\u5468\u30ea\u30f3\u30b0\u306e LineString \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059\uff0e\u305d\u306e\u30ea\u30f3\u30b0\u5185\u90e8\u306e\u9762\u3092\u56f2\u3080 Polygon \u3067\u306f\u306a\u3044\uff0ePolygon \u5185\u90e8\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u306b\u3088\u308a\u751f\u6210\u3055\u308c\u305f\uff0c\u5358\u306b\u201d\u7a74\u3092\u57cb\u3081\u305f\u201d\u3082\u306e\u3067\u306f\u306a\u3044\uff0e<\/p>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u6570\u3048\u308b<\/h3>\n<p>\u3000STNumInteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\uff0cPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u90e8\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u7dcf\u6570\u3092\u8868\u73fe\u3059\u308b\u6574\u6570\u5024\u3092\u8fd4\u3059\uff0e\u4eee\u306b Polygon \u304c\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u4e00\u3064\u3082\u6301\u305f\u306a\u3044\u5834\u5408\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f 0 \u3067\u3042\u308b\uff0eFigure 11-14 \u306b2\u3064\u306e\u7570\u306a\u308b MultiPolygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067 STNumInteriorRing() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STNumInteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STNumInteriorRing() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8981\u305b\u305a\uff0cgeometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STNumInteriorRIng()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6574\u6570\u5024\u3067\u3042\u308a\uff0c\u30bc\u30ed\u306b\u7b49\u3057\u3044\u304b\u305d\u308c\u3088\u308a\u5927\u304d\u304f\uff0cPolygon \u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u6570\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f Polygon \u3092\u751f\u6210\u3057\uff0cSTNumInteriorRing() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e Polygon \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u6570\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Polygon geometry\nSET @Polygon = geometry::STPolyFromText('\n  POLYGON(\n    (0 0, 20 0, 20 10, 0 10, 0 0),\n    (3 1, 3 8, 2 8, 3 1),\n    (14 2, 18 6, 12 4, 14 2))',\n  0)\nSELECT\n  @Polygon AS Shape,\n  @Polygon.STNumInteriorRing() AS NumInteriorRing<\/pre>\n<pre>2<\/pre>\n<h3>Polygon \u304b\u3089\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u5358\u96e2\u3059\u308b<\/h3>\n<p>\u3000STInteriorRingN() \u30e1\u30bd\u30c3\u30c9\u306f n \u756a\u76ee\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092 Polygon \u304b\u3089\u5358\u96e2\u3059\u308b\uff0ePolygon \u306e\u305d\u306e\u30ea\u30f3\u30b0\u306f\u9589\u3058\u305f LineString \u3067\u3042\u308b\u305f\u3081\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u3082\u5e38\u306b\u5358\u7d14\u3067\u9589\u3058\u305f LineString \u3067\u3042\u308b\uff0eFigure 11-15 \u306b\u7570\u306a\u308b Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u4e0a\u3067 STInteriorRingN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u751f\u6210\u3057\u305f LineString \u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STInteriorRingN() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STInteriorRing() \u30e1\u30bd\u30c3\u30c9\u306e\u69cb\u6587\u306f\uff0cgeometry \u578b\u306e Polygon \u4e0a\u3067\u4f7f\u308f\u308c\uff0c\u6b21\u306e\u3088\u3046\u3067\u3042\u308b\uff0e<\/p>\n<pre>Instance.STInteriorRIngN(n)<\/pre>\n<p>\u3000\u3053\u308c\u306f LineString \u3092\u8fd4\u3057\uff0cInstance \u306e n \u756a\u76ee\u306e\u30ea\u30f3\u30b0\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0en \u306e\u6709\u52b9\u306a\u5024\u306e\u7bc4\u56f2\u306f 1 \uff08\u6700\u521d\u306e\u5185\u90e8\u30ea\u30f3\u30b0\uff09\u304b\u3089 STNumInteriorRing() \u306e\u7d50\u679c\uff08\u6700\u5f8c\u306e\u5185\u90e8\u30ea\u30f3\u30b0\uff09\u307e\u3067\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u5927\u6587\u5b57\u306e A \u306e\u5f62\u306b geometry \u578b\u306e Polygon \u3092\u751f\u6210\u3059\u308b\uff0e\u3064\u3044\u3067STInteriorRIngN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u6700\u521d\u306e\uff08\u304b\u3064\u552f\u4e00\u306e\uff09\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u5358\u96e2\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @A geometry\nSET @A = geometry::STPolyFromText('\n  POLYGON((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0),\n    (7 8, 13 8, 10 16, 7 8))', 0)\nSELECT\n  @A AS Shape,\n  @A.STInteriorRingN(1) AS InteriorRing,\n  @A.STInteriorRingN(1).STAsText() AS WKT<\/pre>\n<pre>LINESTRING (7 8, 13 8, 10 16, 7 8)<\/pre>\n<h3>geography \u578b\u306e Polygon \u5185\u306e\u30ea\u30f3\u30b0\u3092\u6570\u3048\u308b<\/h3>\n<p>\u3000geography \u578b\u3092\u4f7f\u3046\u3068\u304d\u306f\uff0c\u5730\u7403\u306e\u7403\u4f53\u30e2\u30c7\u30eb\u4e0a\u306e\u4f4d\u7f6e\u3092\u5b9a\u7fa9\u3057\u3066\u304a\u308a\uff0cPolygon \u306e\u30ea\u30f3\u30b0\u3092\u611f\u899a\u7684\u306b\u201d\u5185\u90e8\u201d\u3084\u201d\u5916\u90e8\u201d\u306e\u30ab\u30c6\u30b4\u30ea\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\uff0e\u3059\u3079\u3066\u306e\u30ea\u30f3\u30b0\u306f\u7a7a\u9593\u30922\u3064\u306e\u9818\u57df\u306b\u5206\u5272\u3059\u308b\uff0e\u305d\u308c\u306fPolygon \u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u9818\u57df\u3068\uff0c\u305d\u3053\u304b\u3089\u9664\u5916\u3055\u308c\u308b\u9818\u57df\u3068\u3067\u3042\u308b\uff0e\u3053\u306e\u7406\u7531\u3067\uff0cgeography \u578b\u306f STNumInteriorRing()\u00a0 \u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u3066\u304a\u3089\u305a\uff0c\u5225\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b NumRIngs() \u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\uff0eNumRings() \u30e1\u30bd\u30c3\u30c9\u306fgeography \u578b\u306e Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u30ea\u30f3\u30b0\u306e\u7dcf\u6570\u3092\u6570\u3048\uff0c\u305d\u308c\u3089\u304c\u201d\u5185\u90e8\u201d\u306a\u306e\u304b\u201d\u5916\u90e8\u201d\u306a\u306e\u304b\u306f\u533a\u5225\u3057\u306a\u3044\uff0eFigure 11-17 \u306b2\u3064\u306e\u7570\u306a\u308b geography \u578b\u306e Polygon \u4e0a\u3067 NumRings() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000NumRings() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000NumRings() \u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u306e Polygon \u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.NumRings()<\/pre>\n<p>\u3000\u7d50\u679c\u306f\u6574\u6570\u5024\u3067 Polygon \u306b\u5b9a\u7fa9\u3055\u308c\u305f\u30ea\u30f3\u30b0\u306e\u7dcf\u6570\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f2\u3064\u306e\u30ea\u30f3\u30b0\u3092\u542b\u3080 geography \u578b\u306e Polygon \u3092\u751f\u6210\u3057\uff0c\u5408\u8846\u56fd\u56fd\u9632\u7701 Pentagon \u306e\u5efa\u7269\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u3064\u3044\u3067 NumRings() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\uff0c\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u30ea\u30f3\u30b0\u306e\u6570\u3092\u6570\u3048\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Pentagon geography\nSET @Pentagon = geography::STPolyFromText(\n  'POLYGON(\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    (-77.05582022666931 38.8702866652523,\n     -77.0569360256195 38.870337733163644,\n     -77.05673217773439 38.87170668418343,\n     -77.0554769039154 38.871848684516294,\n     -77.05491900444031 38.87097997215688,\n     -77.05582022666931 38.8702866652523)\n  )', 4326)\nSELECT\n  @Pentagon AS Shape,\n  @Pentagon.NumRings() AS NumRings<\/pre>\n<pre>2<\/pre>\n<h3>geography \u578b\u306e Polygon \u304b\u3089\u4e00\u3064\u306e\u30ea\u30f3\u30b0\u3092\u5358\u96e2\u3059\u308b<\/h3>\n<p>\u3000geography \u578b\u3067 STNumInteriorRing() \u3067\u306f\u306a\u304f NumRings() \u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\uff0cPolygon \u304b\u3089\u3044\u304b\u306a\u308b\u4e0e\u3048\u3089\u308c\u305f\u30ea\u30f3\u30b0\u3092\u3082\u5358\u96e2\u3059\u308b\u305d\u308c\u81ea\u8eab\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u304a\u308a\uff0c\u201d\u5185\u90e8\u201d\u3084\u201d\u5916\u90e8\u201d\u306e\u5206\u985e\u3092\u6301\u305f\u306a\u3044\uff0egeography \u578b\u306e Polygon \u304b\u3089\u3044\u304b\u306a\u308b\u30ea\u30f3\u30b0\u3092\u3082\u5358\u96e2\u3059\u308b\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306f RingN() \u3067\u3042\u308b\uff0eFigure 11-18 \u306bgeography \u578b\u306e Polygon \u306b RingN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000RingN() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000RingN() \u30e1\u30bd\u30c3\u30c9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf n \u3092\u63d0\u4f9b\u3055\u308c\u306a\u3051\u308c\u3070\u306a\u3089\u305a\uff0cgeography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u8fd4\u308b\u30ea\u30f3\u30b0\u3092\u6b21\u306e\u3088\u3046\u306b\u7279\u5b9a\u3059\u308b\u3082\u306e\u3067\u3042\u308b\uff0e<\/p>\n<pre>Instance.RingN(n)<\/pre>\n<p>\u3000n \u306e\u5024\u306f\u6574\u6570\u5024\u3067\u306a\u304f\u3066\u306f\u306a\u3089\u305a\uff0c\u305d\u306e\u7bc4\u56f2\u306f 1 \u304b\u3089\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b\u30ea\u30f3\u30b0\u306e\u7dcf\u6570\u307e\u3067\u3067\u3042\u308b\uff08\u305d\u308c\u306f NumRings() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff09\uff0e\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f geography \u578b\u306e LineString \u3067\u3042\u308a\uff0cInstance \u306eSRID \u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u30b3\u30fc\u30c9\u306f2\u3064\u306e\u30ea\u30f3\u30b0\u3092\u6301\u3064 geography \u578b\u306e Polygon \u3092\u751f\u6210\u3057\uff0c\u5408\u8846\u56fd\u56fd\u9632\u7701 Pentagon \u306e\u5efa\u7269\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u3064\u3044\u3067 RingN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\uff0c\u305d\u306e\u5b9a\u7fa9\u304b\u3089\u6700\u521d\u306e\u30ea\u30f3\u30b0\u3092\u5358\u96e2\u3057\uff0c\u7d50\u679c\u306e WKT \u8868\u73fe\u3092\u8fd4\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Pentagon geography\nSET @Pentagon = geography::STPolyFromText(\n  'POLYGON(\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    (-77.05582022666931 38.8702866652523,\n     -77.0569360256195 38.870337733163644,\n     -77.05673217773439 38.87170668418343,\n     -77.0554769039154 38.871848684516294,\n     -77.05491900444031 38.87097997215688,\n     -77.05582022666931 38.8702866652523)\n  )', 4326)\nSELECT\n  @Pentagon AS Shape,\n  @Pentagon.RingN(1) AS Ring1,\n  @Pentagon.RingN(1).STAsText() AS WKT<\/pre>\n<pre>LINESTRING (-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)<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5883\u754c\u3092\u8b58\u5225\u3059\u308b<\/h3>\n<p>\u3000STBoundary() \u30e1\u30bd\u30c3\u30c9\u306f geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5883\u754c\u3092\u8868\u73fe\u3059\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059\uff0e\u7a7a\u9593\u30c7\u30fc\u30bf\u306b\u304a\u3044\u3066\uff0c\u5883\u754c\u3068\u3044\u3046\u8a00\u8449\u306f\uff0c\u3042\u306a\u305f\u304c\u8003\u3048\u3066\u3044\u308b\u3088\u3046\u306b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5916\u5468\u3092\u610f\u5473\u3059\u308b\u306e\u3067\u306f\u306a\u304f\uff0c\u554f\u984c\u306b\u3057\u3066\u3044\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306b\u4f9d\u5b58\u3059\u308b\u7279\u7570\u7684\u306a\u5b9a\u7fa9\u3092\u6709\u3057\u3066\u3044\u308b\uff0e<\/p>\n<ul>\n<li>Point \u304a\u3088\u3073 LineString \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u5883\u754c\u3092\u6301\u305f\u306a\u3044\uff0e<\/li>\n<li>LineString \u304a\u3088\u3073 MultiLineString \u306f\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u958b\u59cb\u70b9\u3068\u7d42\u4e86\u70b9\u304b\u3089\u5f62\u6210\u3055\u308c\u308b\u5883\u754c\u3092\u6709\u3059\u308b\u304c\uff0c\u4f55\u5ea6\u3082\u767a\u751f\u3059\u308b\u3044\u304b\u306a\u308b\u70b9\u3082\u9664\u53bb\u3059\u308b\uff0e<\/li>\n<li>Polygon \u306e\u5883\u754c\u306f LineString \u304b\u3089\u5f62\u6210\u3055\u308c\uff0c\u5404\u3005\u306e\u30ea\u30f3\u30b0\u3092\u8868\u73fe\u3059\u308b\uff0e<\/li>\n<\/ul>\n<p>\u3000Figure 11-19 \u306b\u69d8\u3005\u306a\u7570\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b STBoundary() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u306a\u3044 Polygon \u306b\u5bfe\u3057\u3066\u4f7f\u3046\u3068\uff0cSTBoundary() \u306b\u3088\u308a\u751f\u6210\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306f STExteriorRing() \u30e1\u30bd\u30c3\u30c9\u3068\u5168\u304f\u540c\u3058\u306b\u306a\u308b\uff0e\u3057\u304b\u3057\uff0cSTExteriorRing() \u304c\u5b9a\u7fa9\u3055\u308c\u305f\u9806\u306b\u70b9\u7fa4\u3092\u8fd4\u3059\u306e\u3068\u9055\u3044\uff0cSTBoundary() \u306f\u6700\u5c0f\u5ea7\u6a19\u5024\u304b\u3089\u958b\u59cb\u3059\u308b\u70b9\u7fa4\u3092\u8fd4\u3059\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STBoundary() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STBoundary() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u53d6\u3089\u305a\uff0cgeometry \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\uff0e<\/p>\n<pre>Instance.STBoundary()<\/pre>\n<p>\u3000STBoundary() \u30e1\u30bd\u30c3\u30c9\u306e\u623b\u308a\u5024\u306b\u3088\u308a\u8868\u73fe\u3055\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306f\uff0c\u547c\u3073\u51fa\u3057\u305f\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306b\u4f9d\u5b58\u3059\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u5927\u6587\u5b57\u306e A \u306e\u5f62\u306b polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\uff0c\u3064\u3044\u3067STBoundary() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e Polygon \u306e\u5883\u754c\u3092\u8b58\u5225\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @A geometry\nSET @A = geometry::STPolyFromText('\n  POLYGON((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0),\n    (7 8, 13 8, 10 16, 7 8))', 0)\nSELECT\n  @A AS Shape,\n  @A.STBoundary() AS Boundary,\n  @A.STBoundary().STAsText() AS WKT<\/pre>\n<pre>MULTILINESTRING((7 8, 8 10, 16 7, 7 8), (0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0))<\/pre>\n<h3>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5883\u754c\u30dc\u30c3\u30af\u30b9\u3092\u8a08\u7b97\u3059\u308b<\/h3>\n<p>\u3000\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u30a8\u30f3\u30d9\u30ed\u30fc\u30d7\u306f\u6700\u5c0f\u306e\u8ef8\u65b9\u5411\u306e\u9577\u65b9\u5f62\u3067\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u3059\u3079\u3066\u306e\u90e8\u5206\u3092\u5305\u542b\u3059\u308b\u3082\u306e\u3067\u3042\u308b\uff0e\u305d\u308c\u306f\u5883\u754c\u30dc\u30c3\u30af\u30b9\u3068\u3082\u547c\u3070\u308c\u308b\uff0e\u4eee\u306b MinX, MaxX, MinY \u304a\u3088\u3073 MaxY \u304c\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306b\u542b\u307e\u308c\u308b\u3059\u3079\u3066\u306e\u70b9\u306e x \u5ea7\u6a19\u3068 y \u5ea7\u6a19\u306e\u6700\u5c0f\u5024\u3068\u6700\u5927\u5024\u3067\u3042\u308b\u306a\u3089\uff0c\u305d\u306e\u5883\u754c\u30dc\u30c3\u30af\u30b9\u306f\u6b21\u306e WKT \u8868\u73fe\u3067\u5b9a\u7fa9\u3055\u308c\u308b Polygon \u3067\u3042\u308b\uff0e<\/p>\n<pre>POLYGON ((MinX, MinY), (MaxX, MinY), (MaxX, MaxY), (MinX, MaxY), (MInX, MinY))<\/pre>\n<p>\u3000STEnvelope() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u3082\u305d\u306e\u5883\u754c\u30dc\u30c3\u30af\u30b9\u3092\u8fd4\u3059\uff0eFigure 11-21 \u306b\u69d8\u3005\u306a geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066 STEnvelope() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u751f\u6210\u3057\u305f\u5883\u754c\u30dc\u30c3\u30af\u30b9\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u4eee\u306b Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066 STEnvelope() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\uff0cSQL Server \u306f\u305d\u306e\u70b9\u5468\u56f2\u306e\u6700\u5c0f\u9762\u7a4d\u306e Polygon \u3092\u751f\u6210\u3059\u308b\uff0e\u4f8b\u3048\u3070\uff0cPOINT (30 20) \u3068\u3044\u3046 Point \u5468\u56f2\u306e STEnvelope() \u306e\u7d50\u679c\u306f POLYGON ((29.999999 19.999999, 30.000001 19.99999, 30.000001 20.000001, 29.99999 20.000001, 29.99999 19.999999)) \u3067\u3042\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STEnvelope() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STEnvelope() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u8981\u305b\u305a\uff0cgeometry \u578b\u306e\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u3082\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.STEnvelope<\/pre>\n<p>\u3000STEnvelope() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u5e38\u306b Polygon \u3067\u3042\u308a\uff0c\u547c\u3073\u51fa\u3055\u308c\u305f\u305d\u306e geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u540c\u3058 SRID \u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u5927\u6587\u5b57 A \u306e\u5f62\u306b Polygon \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u751f\u6210\u3057\uff0c\u3064\u3044\u3067\u305d\u306e Polygon \u5468\u56f2\u306b STEnvelope() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u5883\u754c\u30dc\u30c3\u30af\u30b9\u3092\u751f\u6210\u3059\u308b\uff0e<\/p>\n<pre>DECLARE @A geometry\nSET @A = geometry::STPolyFromText('\n  POLYGON((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0),\n  (7 8, 13 8, 10 16, 7 8))', 0)\nSELECT<br \/>  @A AS Shape,<br \/>  @A.STEnvelope() AS Envelope,<br \/>  @A.STEnvelope().STAsText() AS WKT<\/pre>\n<pre>PLYGON ((0 0, 4 0, 6 5, 14 5, 16 0, 20 0, 13 20, 7 20, 0 0))<\/pre>\n<h3>geography \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5305\u56f2\u89d2\u3092\u8a08\u7b97\u3059\u308b<\/h3>\n<p>\u3000STEnvelope() \u30e1\u30bd\u30c3\u30c9\u306f geography \u578b\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\uff0e\u8ef8\u306b\u6cbf\u3063\u305f\u76f4\u7dda\u306e\u5358\u7d14\u306a\u9577\u65b9\u5f62\u306e\u5883\u754c\u30dc\u30c3\u30af\u30b9\u306f\uff0c\u5730\u7403\u306e\u6955\u5186\u5f62\u30e2\u30c7\u30eb\u306b\u306f\u9069\u7528\u3067\u304d\u306a\u3044\u304b\u3089\u3067\u3042\u308b\uff0e\u3057\u304b\u3057\uff0cSQL Server \u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7bc4\u56f2\u3092\u8a18\u8ff0\u3059\u308b\u4ee3\u308f\u308a\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\uff0c\u305d\u308c\u306f EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u3068 EnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u3067\u3042\u308b\uff0e<\/p>\n<p>\u3000\u7b46\u8005\u306f\u3059\u3067\u306b EnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u672c\u7ae0\u306e\u6700\u521d\u306e\u65b9\u3067\u7d39\u4ecb\u3057\u305f\uff0e\u305d\u308c\u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u3059\u3079\u3066\u306e\u70b9\u7fa4\u306e\u30d9\u30af\u30c8\u30eb\u5e73\u5747\u304b\u3089\u8a08\u7b97\u3055\u308c\u305f Point \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u306e\u306b\u4f7f\u308f\u308c\uff0c\u3044\u304b\u306a\u308b\u7a2e\u985e\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3067\u3082\u305d\u306e\u4e2d\u5fc3\u3092\u8fd1\u4f3c\u3059\u308b\u306e\u306b\u4f7f\u308f\u308c\u308b\uff0eEnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u306f\uff0cEnvelopeCenter() \u30e1\u30bd\u30c3\u30c9\u3067\u5f97\u3089\u308c\u305f\u70b9\u3068\uff0c\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u3067 EnvelopeCenter() \u306e\u70b9\u304b\u3089\u6700\u3082\u9060\u3044\u70b9\u3068\u306e\u9593\u306e\u89d2\u5ea6\u3092\u8fd4\u3059\uff0e\u305d\u306e\u623b\u308a\u5024\u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5730\u7403\u306e\u4e2d\u5fc3\u70b9\u307e\u3067\u5e83\u304c\u3063\u305f\u70b9\u306b\u307e\u3067\u53ca\u3076\u8a08\u6e2c\u3067\u3042\u308b\uff0efigure 11-23 \u306bEnvelopeCenter() \u306e\u8a08\u7b97\u3055\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000EnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000EnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u53d6\u3089\u305a\uff0cgeography \u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<pre>Instance.EnvelopeAngle()<\/pre>\n<p>\u3000EnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3067\u3042\u308a\uff0c\u5f27\u5ea6\u6cd5\u3067\u6e2c\u5b9a\u3057\u305f\u89d2\u5ea6\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u8fd4\u308a\u3046\u308b\u6700\u5927\u5024\u306f 90 \u3067\u3042\u308a\uff0c\u305d\u308c\u3088\u308a\u5927\u304d\u306a\u89d2\u5ea6\u306f Polygon \u306e\u5360\u3081\u308b\u5358\u4e00\u306e\u534a\u7403\u3088\u308a\u3082\u5927\u304d\u306a\u3068\u3053\u308d\u306b\u70b9\u304c\u542b\u307e\u308c\u308b\u3068\u3044\u3046\u7406\u7531\u306b\u3088\u308b\uff0egeography \u578b\u306e\u5236\u7d04\u306e\u4e00\u3064\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f geography \u578b\u306e Polygon @NorthernHemisphere \u3092\u751f\u6210\u3057\uff0c\u5317\u534a\u7403\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\uff0e@NorthernHemisphere \u306f\u8d64\u9053\u4e0a\u306b\u4f4d\u7f6e\u3059\u308b\u70b9\u7fa4\u306e\u5916\u90e8\u30ea\u30f3\u30b0\u5185\u306b\u542b\u307e\u308c\u308b\u9762\u3068\u3057\u3066\u5b9a\u7fa9\u3055\u308c\uff0c\u305d\u308c\u306f\u5317\u7def 0.1\u00b0 \u306b\u3042\u308b\uff0e\u4f8b\u3067\u306f\u3064\u3044\u3067 EnvelopeAngle() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\uff0c@NorthernHemisphere Polygon \u5185\u306e\u4efb\u610f\u306e\u70b9\u3068\u30a8\u30f3\u30d9\u30ed\u30fc\u30d7\u306e\u4e2d\u5fc3\u70b9\u3068\u306e\u9593\u306e\u6700\u5927\u306e\u89d2\u5ea6\u3092\u8a08\u7b97\u3057\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @NorthernHemisphere geography\nSET @NorthernHemisphere = geography::STGeomFromText('POLYGON((0 0.1, 90 0.1, 180 0.1, -90 0.1, 0 0.1))', 4326)\nSELECT\n  @NorthernHemisphere AS SHape,\n  @NorthernHemisphere.EnvelopeAngle() AS EnvelopeAngle<\/pre>\n<p>\u3000\u30a8\u30f3\u30d9\u30ed\u30fc\u30d7\u306e\u4e2d\u5fc3\u70b9\u304c\u5317\u6975\u70b9\u3067\u3042\u308b\u3053\u3068\uff0c\u305d\u306e Polygon \u304c\u8d64\u9053\u4e0a\u306b\u307e\u3067\u5e83\u304c\u3063\u3066\u3044\u308b\u3053\u3068\u304b\u3089\uff0c\u305d\u306e\u7d50\u679c\u306f 90\u00b0 \u8fd1\u304f\u306b\u898b\u3048\u308b\uff0e<\/p>\n<pre>89.90000000000014<\/pre>\n<p>\u30c1\u30c3\u30d7\u30b9\u3000EnvelopeAngle() \u306e\u7d50\u679c\u304c 90 \u3092\u8d85\u3048\u308b\u3053\u3068\u306f\u6c7a\u3057\u3066\u306a\u3044\uff0e\u95a2\u9023\u3059\u308b geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u5358\u4e00\u306e\u534a\u7403\u3092\u8d85\u3048\u3089\u308c\u306a\u3044\u304b\u3089\u3067\u3042\u308b\uff0e<\/p>\n<h3>Geometry Collection \u306e\u8981\u7d20\u6570\u3092\u6570\u3048\u308b<\/h3>\n<p>\u3000STNumGeometries() \u30e1\u30bd\u30c3\u30c9\u306f\u672c\u7ae0\u306e\u6700\u521d\u3067\u7d39\u4ecb\u3057\u305f STNumPoints() \u30e1\u30bd\u30c3\u30c9\u3068\u591a\u304f\u306e\u70b9\u3067\u540c\u69d8\u306b\u52d5\u4f5c\u3059\u308b\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u5185\u306e\u70b9\u306e\u6570\u3092\u6570\u3048\u308b\u4ee3\u308f\u308a\u306b\uff0cSTNumGeometries() \u306f geometry \u578b\u307e\u305f\u306f geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u90e8\u306b\u542b\u307e\u308c\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6570\u3092\u8a18\u8ff0\u3059\u308b\u6574\u6570\u5024\u3092\u8fd4\u3059\uff0eGeometry Collection \u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\u305f\u3068\u304d\uff0c\u305d\u306e\u7d50\u679c\u306f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u90e8\u306e\u8981\u7d20\u6570\u3068\u306a\u308b\uff0e\u5358\u4e00\u8981\u7d20\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066\u4f7f\u308f\u308c\u305f\u5834\u5408\uff0cPoint, LineString \u307e\u305f\u306f Polygon \u306e\u5834\u5408\u3060\u304c\uff0cSTNumGeometries() \u306e\u7d50\u679c\u306f 1 \u306b\u306a\u308b\uff0e\u3044\u304b\u306a\u308b\u7a2e\u985e\u3067\u3082\u7a7a\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u4f7f\u308f\u308c\u305f\u5834\u5408\uff0c\u7d50\u679c\u306f 0 \u306b\u306a\u308b\uff0eFigure 11-24 \u306b\u69d8\u3005\u306a\u7a2e\u985e\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b STNumGeometries() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u3068\u304d\u306e\u7d50\u679c\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STNumGeometries() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STNumGeometries() \u30e1\u30bd\u30c3\u30c9\u306f\u3044\u304b\u306a\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u53d6\u3089\u305a\uff0cgeometry \u578b\u304a\u3088\u3073 geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\uff0e<\/p>\n<pre>Instance.STNumGeometries()<\/pre>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306b\u304a\u3044\u3066\uff0c\uff082\u3064\u306e Point \u304b\u3089\u306a\u308b\uff09MultiPoint \u8981\u7d20\uff0c\u4e00\u3064\u306e LineStirng, \u4e00\u3064\u306e Polygon \u3092\u542b\u3080 Geometry Collection \u304c\u751f\u6210\u3055\u308c\u308b\uff0eSTNumGeometries() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5185\u306e\u8981\u7d20\u306e\u7dcf\u6570\u3092\u6570\u3048\u3066\u3044\u308b\uff0e<\/p>\n<pre>DECLARE @Collection geometry\nSET @Collection = geometry::STGeomFromText('\n  GEOMETRYCOLLECTION(\n    MULTIPOINT((32 2), (23 12)),\n    LINESTRING(30 2, 31 5),\n    POLYGON((20 2, 23 2.5, 21 3, 20 2)))', 0)\nSELECT\n  @Collection AS Shape,\n  @Collection.STNumGeometries() AS NumGeometries<\/pre>\n<pre>3<\/pre>\n<p>\u3000MultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u304c2\u3064\u306e Point \u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u542b\u3093\u3067\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\uff0c\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5168\u4f53\u306e STNumGeometries() \u306e\u7d50\u679c\u306f 3 \u3067\u3042\u308b\uff0e\u3053\u308c\u306f MultiPoint \u30b8\u30aa\u30e1\u30c8\u30ea\u304c Geometry Collection \u306b\u304a\u3044\u3066\u306f\u552f\u4e00\u3064\u306e\u8981\u7d20\u3068\u3057\u3066\u6570\u3048\u3089\u308c\u308b\u304b\u3089\u3067\u3042\u308b\uff0eSTNumGeometries() \u306f\u5358\u4e00\u306e\u8981\u7d20\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\uff08Point, LineString \u304a\u3088\u3073 Polygon\uff09\uff0c\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\uff08MultiPoint, MultiLineString \u304a\u3088\u3073 MultiPolygon\uff09\u304a\u3088\u3073\u7a7a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u542b\u307e\u308c\u308b\u3044\u304b\u306a\u308b\u7a2e\u985e\u3067\u3042\u3063\u3066\u3082\u5358\u4e00\u306e\u30a2\u30a4\u30c6\u30e0\u3068\u3057\u3066\u6570\u3048\u308b\uff0e<\/p>\n<h3>Geometry Collection \u304b\u3089\u500b\u5225\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n<p>\u3000STGeometryN() \u30e1\u30bd\u30c3\u30c9\u306f Geometry Collection \u304b\u3089 n \u756a\u76ee\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059\uff0e\u305d\u308c\u306f\u6c4e\u7528\u306e Geometry Collection \u3067\u3082\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u7279\u7570\u7684\u306a\u30b5\u30d6\u30bf\u30a4\u30d7\uff08MultiPoint, MultiLineString \u3042\u308b\u3044\u306f MultiPolygon\uff09\u306e\u4e00\u3064\u3067\u3082\u3069\u3061\u3089\u3067\u3082\u4f7f\u308f\u308c\u308b\uff0eFigure 11-25 \u306b STGeometryN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7bc4\u56f2\u304b\u3089\u500b\u5225\u306e\u8981\u7d20\u3092\u5358\u96e2\u3059\u308b\u3068\u3053\u308d\u3092\u793a\u3059\uff08\u7565\uff09\uff0e<\/p>\n<p>\u4ed8\u8a18\u3000\u5358\u4e00\u8981\u7d20\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306b\u306f STGeometryN(1) \u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e\u305d\u306e\u5834\u5408\u30e1\u30bd\u30c3\u30c9\u306e\u7d50\u679c\u306f\u305d\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u81ea\u4f53\u3067\u3042\u308b\uff0e<\/p>\n<h4>\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u30c7\u30fc\u30bf\u578b<\/h4>\n<p>\u3000STGeometryN() \u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u30c7\u30fc\u30bf\u578b\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e0a\u3067\u4f7f\u308f\u308c\u308b\uff0e<\/p>\n<ul>\n<li>geometry \u578b<\/li>\n<li>geography \u578b<\/li>\n<\/ul>\n<h4>\u4f7f\u7528\u6cd5<\/h4>\n<p>\u3000STGeometryN() \u30e1\u30bd\u30c3\u30c9\u306f\u4e00\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf n \u3092\u63d0\u4f9b\u3055\u308c\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\uff0e\u4f7f\u3044\u65b9\u306e\u69cb\u6587\u306f\u6b21\u306e\u901a\u308a\uff0e<\/p>\n<pre>Instance.STGeometryN(n)<\/pre>\n<p>\u3000\u3053\u3053\u3067 n \u306f\uff0c\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u7531\u6765\u306e\u53d6\u5f97\u3057\u305f\u3044\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u5e8f\u6570\u3067\u3042\u308b\uff0e n \u306e\u5024\u306e\u7bc4\u56f2\u306f 1 \u304b\u3089 Geometry Collection \u5185\u306e\u8981\u7d20\u306e\u7dcf\u6570\u307e\u3067\u3067\u3042\u308b\uff08STNumGeometries() \u3067\u53d6\u5f97\u3067\u304d\u308b\uff09\uff0e<\/p>\n<h4>\u4f8b<\/h4>\n<p>\u3000\u6b21\u306e\u4f8b\u306f\u30c0\u30e9\u30b9\u30fb\u30d5\u30a9\u30fc\u30c8\u30ef\u30fc\u30b9\u56fd\u969b\u7a7a\u6e2f\u306b\u3042\u308b7\u672c\u306e\u6ed1\u8d70\u8def\u3092\u8868\u73fe\u3059\u308b MultiLineString \u3092\u751f\u6210\u3057\uff0c\u305d\u306e\u6570\u306f\u5168\u4e16\u754c\u3067\u6700\u5927\u3067\u3042\u308b\uff0e\u3064\u3044\u3067 STGeometryN() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u4e00\u672c\u306e\u6ed1\u8d70\u8def\u3092\u793a\u3059\u4e00\u3064\u306e LineString \u3092\u5358\u96e2\u3057\u3066\u8fd4\u3059\uff0e<\/p>\n<pre>DECLARE @DFRunways geography\nSET @DFRunways = geography::STMLineFromText(\n  'MULTILINESTRING(\n    (-97.0214781 32.9125542, -97.0008442 32.8949814),\n    (-97.0831328 32.9095756, -97.0632761 32.8902694),\n    (-97.0259706 32.9157078, -97.0261717 32.8788783),\n    (-97.0097789 32.8983206, -97.0099086 32.8749594),\n    (-97.0298833 32.9157222, -97.0300811 32.8788939),\n    (-97.0507357 32.9157992, -97.0509261 32.8789717),\n    (-97.0546419 32.9258147, -97.0548336 32.8789861))', 4326)\nSELECT\n  @DFRunways AS Shape,\n  @DFRunways.STGeometryN(3) AS Geometry3,\n  @DFRunways.STGeometryN(3).STAsText() AS WKT<\/pre>\n<pre>LINESTRING (-97.0259706 32.9157078, -97.0261717 32.8788783)<\/pre>\n<h3>\u8981\u7d04<\/h3>\n<p>\u3000Table 11-2 \u306b\u672c\u7ae0\u3067\u7d39\u4ecb\u3057\u305f\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u793a\u3057\uff0c\u305d\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3082\u3068\u3082\u306b\u63b2\u8f09\u3059\u308b\uff0e<\/p>\n<table><caption>Table 11-2. \u5404\u30c7\u30fc\u30bf\u578b\u306b\u3088\u308a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8fd4\u3059\u30e1\u30bd\u30c3\u30c9<\/caption>\n<tbody>\n<tr>\n<th>\u30e1\u30bd\u30c3\u30c9<\/th>\n<th>\u8a18\u8ff0<\/th>\n<th>geometry \u578b<\/th>\n<th>geography \u578b<\/th>\n<\/tr>\n<tr>\n<th colspan=\"4\">\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8a18\u8ff0\u3059\u308b<\/th>\n<\/tr>\n<tr>\n<td>STGeometryType()<\/td>\n<td>\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u306e\u540d\u524d\u3092\u8fd4\u3059\uff08\u4f8b Point, LineString\uff09<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>InstanceOf()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7a2e\u985e\u3067\u3042\u308b\u304b\u5426\u304b\u691c\u67fb\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STDimension()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5360\u3081\u308b\u6b21\u5143\u6570\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STIsSimple()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u5358\u7d14\u304b\u5426\u304b\u5224\u5b9a\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STIsClosed()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u9589\u3058\u3066\u3044\u308b\u304b\u5426\u304b\u5224\u5b9a\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STIsRIng()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30ea\u30f3\u30b0\u3067\u3042\u308b\u304b\u5426\u304b\u5224\u5b9a\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STNumPoints()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u70b9\u306e\u6570\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STIsEmpty()<\/td>\n<td>\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u7a7a\u3067\u3042\u308b\u304b\u5426\u304b\u5224\u5b9a\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<th colspan=\"4\">Point \u306e\u5ea7\u6a19\u5024\u3092\u8fd4\u3059<\/th>\n<\/tr>\n<tr>\n<td>STX<\/td>\n<td>geometry \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e x \u5ea7\u6a19\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STY<\/td>\n<td>geometry \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e y \u5ea7\u6a19\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>Lat<\/td>\n<td>geography \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7def\u5ea6\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>Long<\/td>\n<td>geography \u578b\u306e Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7d4c\u5ea6\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>M<\/td>\n<td>Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e m\uff08\u8a08\u6e2c\uff09\u5ea7\u6a19\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>Z<\/td>\n<td>Point \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e z\uff08\u6a19\u9ad8\uff09\u5ea7\u6a19\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<th colspan=\"4\">\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u500b\u5225\u306e Point \u3092\u8fd4\u3059<\/th>\n<\/tr>\n<tr>\n<td>STPointN()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9a\u7fa9\u5185\u306e n \u756a\u76ee\u306e\u70b9\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STStartPoint()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9a\u7fa9\u5185\u306e\u6700\u521d\u306e\u70b9\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STEndPoint()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9a\u7fa9\u5185\u306e\u6700\u5f8c\u306e\u70b9\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STCentroid()<\/td>\n<td>Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5e7e\u4f55\u5b66\u7684\u4e2d\u5fc3\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>EnvelopeCenter()<\/td>\n<td>geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a8\u30f3\u30d9\u30ed\u30fc\u30d7\u306e\u4e2d\u5fc3\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STPointOnSurface()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5185\u90e8\u7531\u6765\u306e\u4efb\u610f\u306e\u70b9\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STLength()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u3059\u3079\u3066\u306e\u7dda\u306e\u9577\u3055\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STArea()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u542b\u307e\u308c\u308b\u9762\u7a4d\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STSrid<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9a\u7fa9\u3055\u308c\u305f\u7a7a\u9593\u53c2\u7167\u7cfb\u306e SRID \u3092\u53d6\u5f97\u307e\u305f\u306f\u8a2d\u5b9a\u3059\u308b<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<th colspan=\"4\">Polygon \u306e\u30ea\u30f3\u30b0\u3092\u64cd\u4f5c\u3059\u308b<\/th>\n<\/tr>\n<tr>\n<td>STExteriorRing()<\/td>\n<td>Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5916\u90e8\u30ea\u30f3\u30b0\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STNumInteriorRing()<\/td>\n<td>Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u306e\u6570\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STInteriorRingN()<\/td>\n<td>Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7279\u5b9a\u306e\u5185\u90e8\u30ea\u30f3\u30b0\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>NumRIngs()<\/td>\n<td>geography \u578b\u306e Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30ea\u30f3\u30b0\u306e\u6570\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>RingN()<\/td>\n<td>geography \u578b\u306e Polygon \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u7279\u5b9a\u306e\u30ea\u30f3\u30b0\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<th colspan=\"4\">\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u7bc4\u56f2\u3092\u8a18\u8ff0\u3059\u308b<\/th>\n<\/tr>\n<tr>\n<td>STBoundary()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5883\u754c\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STEnvelope()<\/td>\n<td>geometry \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a8\u30f3\u30d9\u30ed\u30fc\u30d7\uff08\u5883\u754c\u30dc\u30c3\u30af\u30b9\uff09\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u00a0<\/td>\n<\/tr>\n<tr>\n<td>STEnvelopeAngle()<\/td>\n<td>geography \u578b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u591a\u304f\u306e\u5916\u308c\u3066\u3044\u308b\u70b9\u3068\u306e\u4e2d\u5fc3\u9593\u306e\u89d2\u5ea6\u3092\u8fd4\u3059<\/td>\n<td>\u00a0<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<th colspan=\"4\">\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u64cd\u4f5c\u3059\u308b<\/th>\n<\/tr>\n<tr>\n<td>STNumGeometries()<\/td>\n<td>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5185\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u306e\u6570\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<tr>\n<td>STGeometryN()<\/td>\n<td>\u591a\u8981\u7d20\u30b8\u30aa\u30e1\u30c8\u30ea\u304b\u3089\u7279\u5b9a\u306e\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059<\/td>\n<td>\u25cf<\/td>\n<td>\u25cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3000\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u30de\u30a4\u30af\u30ed\u30bd\u30d5\u30c8\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306f\uff0cMicrosoft SQL Server 2008 Books Online \u3067\u53c2\u7167\u53ef\u80fd\u3067\u3042\u308b\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c 4 \u90e8\u3000\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u89e3\u6790 \u3000\u672c\u66f8\u306e\u3053\u306e\u90e8\u3067\u306f\uff0cgeography \u578b\u304a\u3088\u3073 geometry \u578b\u3067\u30c7\u30fc\u30bf\u3092\u30d5\u30a3\u30eb\u30bf\u30fc\u3057\u89e3\u6790\u3067\u304d\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u8ad6\u305a\u308b\uff0e\u305d\u308c\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u7a7a\u9593\u30c7\u30fc\u30bf\u306e\u529b\u3092\u958b\u767a\u3059\u308b\u306e\u306b\u4f7f\u3046\u306e\u306b\u5fc5\u8981 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=15956\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u7b2c 11 \u7ae0\u3000\u7a7a\u9593\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u691c\u67fb\u3059\u308b(Begining 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":[5921,7901,7752,12422,12384,7450,4673,7587,7228,12172,7724,7605,2474,7263,7262,7264,12159,467,12410,7465,7602,12411,4569,7727,8464,12412,12397,4672,4657,2740,2750,7448,12398,12413,12419,12406,12427,12409,12392,12425,12408,12393,12394,7460,6392,12404,5479,12121,7311,7312,691,11947,7816,2796,12117,12395,12416,11388,4581,3891,3204,4594,9582,5521,12429,32,2499,7717,1669,4328,4255,12396,4552,7314,4275,7238,12403,4510,12401,12423,5039,7804,12426,7247,3435,12420,7310,8175,12400,12405,4503,4627,9175,7193,7244,12415,12166,7245,12407,12301,12173,255,7755,5302,12388,12428,12424,2601,3527,3528,12414,7309,11888,12421,7754,9162,5391,12430,4578,7305,3573,7194,7181,12402,7445,6540,4016,7234,2782,6756,7231,4017,7857,5457,4960,2445,7208,7444,446,7317,12417,7221,7226,12418,3970,3992,7227,5621,4023,12399],"class_list":{"0":"post-15956","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-technology","8":"tag-5921","9":"tag-create-table","10":"tag-declare","11":"tag-envelopeangle","12":"tag-envelopecenter","13":"tag-epsg","14":"tag-from","15":"tag-geography","16":"tag-geometry","17":"tag-geometrycollection","19":"tag-linestring","20":"tag-long","21":"tag-multilinestring","22":"tag-multipoint","23":"tag-multipolygon","24":"tag-m","25":"tag-null","26":"tag-numrings-2","27":"tag-ogc","28":"tag-open-geospatial-consortium","29":"tag-pentagon","30":"tag-point","31":"tag-polygon","32":"tag-property","33":"tag-ringn","34":"tag-scottish-mile","35":"tag-select","36":"tag-set","37":"tag-sql-server","38":"tag-sql-server-management-studio","39":"tag-srid","40":"tag-starea","41":"tag-stboundary","42":"tag-stenvelope","43":"tag-stexteriorring","44":"tag-stgeometryn","45":"tag-stinteriorringn","46":"tag-stlength","47":"tag-stnumgeometries","48":"tag-stnuminteriorring","49":"tag-sys-spatial_reference_system","50":"tag-the-royal-mile","51":"tag-unit_of_measure","52":"tag-update","54":"tag-values-2","55":"tag-wkt","56":"tag-x","57":"tag-y","58":"tag-691","59":"tag-11947","60":"tag-7816","61":"tag-2796","62":"tag-12117","63":"tag-12395","64":"tag-12416","65":"tag-11388","66":"tag-4581","67":"tag-3891","68":"tag-3204","69":"tag-4594","70":"tag-9582","71":"tag-5521","72":"tag-12429","73":"tag-32","74":"tag-2499","75":"tag-7717","76":"tag-1669","77":"tag-4328","78":"tag-4255","79":"tag-12396","80":"tag-4552","81":"tag-7314","82":"tag-4275","83":"tag-7238","84":"tag-12403","85":"tag-4510","86":"tag-12401","87":"tag-12423","88":"tag-5039","89":"tag-7804","90":"tag-12426","91":"tag-7247","92":"tag-3435","93":"tag-12420","94":"tag-7310","95":"tag-8175","96":"tag-12400","97":"tag-12405","98":"tag-4503","99":"tag-4627","100":"tag-9175","101":"tag-7193","102":"tag-7244","103":"tag-12415","104":"tag-12166","105":"tag-7245","106":"tag-12407","107":"tag-12301","108":"tag-12173","109":"tag-255","110":"tag-7755","111":"tag-5302","112":"tag-12388","113":"tag-12428","114":"tag-12424","115":"tag-2601","116":"tag-3527","117":"tag-3528","118":"tag-12414","119":"tag-7309","120":"tag-11888","121":"tag-12421","122":"tag-7754","123":"tag-9162","124":"tag-5391","125":"tag-12430","126":"tag-4578","127":"tag-7305","128":"tag-3573","129":"tag-7194","130":"tag-7181","131":"tag-12402","132":"tag-7445","133":"tag-6540","134":"tag-4016","135":"tag-7234","136":"tag-2782","137":"tag-6756","138":"tag-7231","139":"tag-4017","140":"tag-7857","141":"tag-5457","142":"tag-4960","143":"tag-2445","144":"tag-7208","145":"tag-7444","146":"tag-446","147":"tag-7317","148":"tag-12417","149":"tag-7221","150":"tag-7226","151":"tag-12418","152":"tag-3970","153":"tag-3992","154":"tag-7227","155":"tag-5621","156":"tag-4023","157":"tag-12399"},"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15956","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=15956"}],"version-history":[{"count":160,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15956\/revisions"}],"predecessor-version":[{"id":16726,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15956\/revisions\/16726"}],"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=15956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}