根据this documentation,STGeomFromText
支持FullGlobe:
此地理数据类型方法支持 FullGlobe 实例或 大于半球的空间实例。
但是,我不知道这个文档指的是哪个版本的MS-SQL。
在“其他版本”下,它会列出 2008 和 2008 R2 ,但如果点击,则表示他们不支持 FullGlobe 。
为了让FullGlobe正常工作,我必须安装哪个版本的MS-SQL或Service Pack?
这是我的sql:
SELECT geography::STGeomFromText('POLYGON((14.1977984372468 49.7086179545186,14.0975789966719 49.490931050796,12.5900898047007 45.9899553708373,11.2416180142584 42.4725018717541,10.0189326479206 38.9414519482468,8.89701484835269 35.3990096092695,7.85664665475729 31.8469172968655,6.88278698469561 28.2865986360566,5.9634518930894 24.7192549336294,5.08892530812995 21.1459314523495,4.25119070563764 17.5675630126313,3.44351321077389 13.985005924225,2.66012537113857 10.3990599134859,1.89598509474054 6.81048335641945,1.1465837262999 3.22000326571774,0.407788590200467 -0.371677988700824,-0.324291851935639 -3.96387852745089,-1.05342955105917 -7.55593436365933,-1.78339318076703 -11.1471976352728,-2.51806681006348 -14.7370348965234,-3.26157909469963 -18.3248253652926,-4.01845238057626 -21.9099575448643,-4.79378397261009 -25.4918242201927,-5.59347616002234 -29.0698144501277,-6.42453876771587 -32.6433010407778,-7.29549969159991 -36.211621758752,-8.21697775205904 -39.774051024648,-9.20250398028347 -43.3297576050588,-10.2697317463825 -46.8777402574098,-11.4422726186086 -50.4167283166232,-12.7525722806525 -53.9450245293382,-14.2465807422689 -57.460247128251,-15.9916555981513 -60.9588899763672,-18.0905888714589 -64.4355326552956,-20.7079207471342 -67.8813344075985,-24.1225654627664 -71.2809433475941,-28.8408188355059 -74.6055692800629,-35.8463883696685 -77.7924382401655,-47.2063856590074 -80.7065857738326,-66.9785058803618 -83.0052691165418,-97.9750390100537 -83.9384177606558,-128.643556044951 -82.9375576334944,-148.00391894514 -80.6054307189309,-159.139108412103 -77.6779603190499,-166.029981462794 -74.4857156018706,-170.684840043845 -71.1595774540993,-174.061735811063 -67.7603847042112,-176.654974376848 -64.3161893679373,-178.737627762043 -60.8419881952857,179.528828146465 -57.3464295623487,178.043316526901 -53.8348168444905,176.739494352815 -50.3105766671909,175.572040277034 -46.7760308036764,174.508913762508 -43.2328270400433,173.526773241969 -39.6821924739992,172.608150515157 -36.1250880589781,171.739644782635 -32.5623067842119,170.910730829305 -28.9945370682842,170.112949405406 -25.4224048384334,169.339341980169 -21.846501773014,168.58404528169 -18.2674039867933,167.841992255889 -14.6856847908136,167.10868448838 -11.1019226955191,166.380012729174 -7.51670676722884,165.941432353483 -5.35533773778457,159.776665988585 -6.57902683369825,160.177433883186 -8.72380367556899,160.822079257621 -12.2824960195651,161.443414585553 -15.8408809387369,162.043430549844 -19.398296263682,162.623815450699 -22.9541494522971,163.185982448494 -26.5079178675654,163.73108551617 -30.0591498688561,164.26002344831 -33.6074656910582,164.773430063532 -37.1525586793143,165.271646700603 -40.6941960473808,165.754670150563 -44.2322194161788,166.222063966029 -47.7665451784619,166.672811789969 -51.2971640454233,167.105074008517 -54.8241408276084,167.515774078978 -58.3476136686714,167.899867192761 -61.8677941701833,168.248975202488 -65.3849687010856,168.548650592718 -68.899502591151,168.772353767069 -72.4118497117796,168.86640163402 -75.9225678964884,168.706491743022 -79.4152462878817,167.927467291569 -82.8961624959035,164.732805578133 -86.3800283841654,90.7183887585475 -89.5255796637184,0.869476212320378 -86.5107511675832,-2.53511419326111 -83.0263801264859,-3.35347936173547 -79.5441534398354,-3.52714539202692 -76.0510262182095,-3.43943131235962 -72.5383029542796,-3.21903289869946 -69.0235405384683,-2.9212128486995 -65.5061918147878,-2.57316966777165 -61.9858166317077,-2.18966563058102 -58.4620663215801,-1.77924490961034 -54.9346738854397,-1.34704681853976 -51.4034493155988,-0.896205077108871 -47.8682781762759,-0.428595677041346 -44.329121290399,0.0547408943611908 -40.786015213663,0.553351609541117 -37.2390723089532,1.06722155761446 -33.6884808125902,1.59668364420096 -30.1345044451656,2.14236556311945 -26.5774814836359,2.70516170545828 -23.0178236671284,3.28622299594447 -19.4560147963763,3.88696070360683 -15.8926094397698,4.50906229046143 -12.3282317178813,5.15451864742359 -8.76357458301829,5.82566311373916 -5.19940031270823,6.5252236911824 -1.63654187123703,7.25639066630586 1.92409340837588,8.02290309530139 5.48151764590984,8.82915889854057 9.03465271716534,9.6803551482695 12.5823158658826,10.5826675131422 16.1231989255446,11.5434812953803 19.6558394558106,12.5716910643249 23.1785804132512,13.6780927958767 26.689514921038,14.8759019115514 30.1864100426377,16.1814448369554 33.6666019429789,17.6150918852402 37.1268498599495,19.2025294573402 40.5631314224601,20.9765131252558 43.9703521754743,22.979305680181 47.3419272187238,23.1129487986833 47.550807797626,14.1977984372468 49.7086179545186))', 4326)
错误:
指定的输入不代表有效的地理位置实例 因为它超过了一个半球。每个地理位置实例必须 适合单个半球。
答案 0 :(得分:2)
显然该功能是new in SQL Server 2012。
答案 1 :(得分:1)
问题的答案是“SQL Server 2012”。但是,这可能不是您的问题的答案 ...
通常情况下,人们触及“大于一个半球”的限制的原因是当他们使用不正确的环方向时 - 定义他们的多边形“由内向外”,就像它一样。这意味着你的多边形最终排除它要包含的区域,包括地球表面的其余部分。
我在SQL Server 2012中添加了一个显示您的Polygon为蓝色的图像 - 您要尝试定义的区域是什么?