- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当您有一个带有 Geometry 类型字段(或 Geography)的表时,您可以调用 Reduce()
函数来减少形状的顶点数量。效果非常好。然而,当多个多边形相邻时(它们共享其边界的一部分),缩减的多边形不一定这样做。
SQL 批处理:
CREATE TABLE #Shapes (
shape geometry,
naam varchar(50)
)
-- exact:
insert into #Shapes (naam, shape) VALUES ('Area A',Geometry::STGeomFromText('POLYGON ((52.084744368912652 5.1304192959796637, 52.085234231548384 5.1304194002877921, 52.085474282948049 5.1304486630822, 52.0857341082301 5.1304792705923319, 52.086134375073016 5.1306082883384079, 52.086594087770209 5.13079824927263, 52.087194303050637 5.1311187236569822, 52.089074697112665 5.1323992793913931, 52.089834430487826 5.1333390253130347, 52.090353938518092 5.1341692635323852, 52.090254480473 5.1342997345712416, 52.090824429301414 5.13520842681262, 52.09141399711384 5.1360295349486274, 52.091884278226644 5.1365492835175246, 52.092085719574243 5.1367767199408263, 52.092194211203605 5.1368992186617106, 52.092494247804545 5.1372492032188495, 52.092884057915427 5.13754907634854, 52.093083867570385 5.137679290259257, 52.093254011290028 5.1378082139755827, 52.093554640188813 5.1380093733314425, 52.094204571098089 5.1384683684445918, 52.094214495038614 5.1384888619650155, 52.093702809136488 5.1390791568504124, 52.0939114689827 5.1395669728517532, 52.0938675517682 5.1396009074524045, 52.093849835848111 5.1396084928439114, 52.093797143315896 5.1396473892964423, 52.093789743114428 5.1396500989447063, 52.093731224210721 5.13969055645838, 52.093728204024956 5.1396938753314316, 52.093717452138662 5.1397007238119841, 52.09355255169794 5.139717671321705, 52.093311328208074 5.1395945930853486, 52.093306955655407 5.1395602072316251, 52.093115365831181 5.1400826557073742, 52.093052050564438 5.1401469679549336, 52.092979203676805 5.1401289247442037, 52.092756105586886 5.1398569964803755, 52.092737412561 5.1397823067194368, 52.09235419591127 5.1398883965623128, 52.092214386788811 5.1400686172528616, 52.092164272349919 5.1401695687556135, 52.09208471653983 5.1403786691371351, 52.0920239102561 5.1405293103307486, 52.091924546519294 5.1407297900877893, 52.091534494888037 5.1407990844454616, 52.091654436912947 5.1401591910829172, 52.091713753540262 5.1397284107361845, 52.091763769509271 5.1391488309018314, 52.091774359305148 5.1390583129178058, 52.09170373348757 5.1383788494901648, 52.0907391263172 5.1386201300192624, 52.090711282333359 5.1385075189173222, 52.090718721970916 5.1384486802853644, 52.090745792724192 5.1383893731981516, 52.090758387919244 5.1383728119598793, 52.090776969445869 5.1383237342815846, 52.090780415022657 5.1383173598065737, 52.090745287947357 5.1382717578671873, 52.090742629869759 5.1382662602414895, 52.090704807080328 5.1382211977615952, 52.0906867091544 5.1381677808240056, 52.090701617482885 5.1380081428639635, 52.090564404382455 5.138029116065514, 52.09062412660569 5.1386488282587379, 52.090704361908138 5.1396187201607972, 52.09069472597912 5.1397384563460946, 52.090674098813906 5.1398086878471076, 52.090624484543433 5.1397491229489587, 52.090589968811038 5.1397359627815975, 52.090441891923547 5.140045978827402, 52.090305342804641 5.1400443047750741, 52.0902322656475 5.139729289803654, 52.090199632104486 5.1394877941347659, 52.090188750764355 5.1393666968215257, 52.0902532400633 5.1393868076773792, 52.09003754449077 5.1387802169192582, 52.090024582457204 5.1386965749382565, 52.090020758565515 5.1386840578634292, 52.0900124781623 5.1386172670806785, 52.090003480669111 5.1385827830526978, 52.08999918546494 5.1385372205978728, 52.089985796017572 5.1384773049503565, 52.089996868744493 5.1384535257238895, 52.090046249330044 5.138385351980105, 52.090212456043091 5.1382693609882955, 52.090183896290647 5.1379786310671935, 52.090166853580648 5.1378115779987894, 52.0899735938292 5.137785307597369, 52.089885840192437 5.1377143466379493, 52.08985487697646 5.137671007309109, 52.089845903217793 5.1376524229999632, 52.089844238944352 5.1376464897766709, 52.089850628050044 5.1375868958421052, 52.089852778393364 5.137576853302618, 52.089863699774533 5.1374888862706634, 52.089867451693863 5.1373642447870225, 52.089883847394958 5.1373361134901643, 52.089941705111414 5.1372730266302824, 52.090002277167514 5.1372403032146394, 52.090108146462811 5.1372361269295483, 52.09006458793673 5.1368091938053615, 52.089683820260689 5.1369396857917309, 52.089193989204269 5.1364887236994123, 52.088854428613558 5.1373995044268668, 52.088474480202422 5.1383894786704332, 52.088474343996495 5.1383894337341189, 52.088464433038652 5.1383690948872287, 52.088414154422111 5.13834898790222, 52.088394471909851 5.1383694768883288, 52.0883943233639 5.1383694719988853, 52.08832395415709 5.1382487505018526, 52.087933741509914 5.1377592226490378, 52.087544413445592 5.1372594955892383, 52.087484167695806 5.1372292107739481, 52.087364645209163 5.1372284211684018, 52.0869538753575 5.1372190437554366, 52.085683952551335 5.1372596949804574, 52.085304662585258 5.137269108556211, 52.085084051657141 5.1370588609653955, 52.084904317976907 5.137469710316509, 52.084444417446747 5.1384497439414369, 52.084454428168293 5.1385195698547266, 52.084484005579725 5.1385092278942466, 52.084537888644263 5.1385357407853007, 52.084511198022149 5.1389506391238067, 52.084534639492631 5.1391157133039087, 52.084215438459069 5.139372929232195, 52.084103818604156 5.1389697602953825, 52.083964082412422 5.1391396226827055, 52.083963935496286 5.139139630831778, 52.083883681101725 5.1390291205607355, 52.083994359437455 5.1386593720505784, 52.084013982437057 5.1385892418004318, 52.084053878448593 5.1383293403318735, 52.084054407430678 5.1377297231794907, 52.084053982747719 5.1375283871311694, 52.084063940448686 5.1371387927792966, 52.084070490673184 5.13703247718513, 52.084070608951151 5.1370323959272355, 52.084217049471441 5.1370617711960529, 52.0842700656977 5.1370595147110754, 52.084318579515468 5.1370449147663777, 52.084365648221834 5.137017846536426, 52.084410294202549 5.1369791406907863, 52.084451525192954 5.1369308069453, 52.084497402298688 5.1368615722581685, 52.084511263761669 5.1368357082828879, 52.084539652187722 5.1367929205345337, 52.084559679031372 5.1367565956898034, 52.084580525973493 5.1367251129565776, 52.0845936126653 5.1367018828692963, 52.084593039704487 5.1366802926640958, 52.084593520236 5.1366613829106731, 52.084592797560617 5.136602794053033, 52.0845930285151 5.1365417347624449, 52.084591784281656 5.1365062294062227, 52.084592622431977 5.1364672367903337, 52.084591892315075 5.1364289335906506, 52.084595442516729 5.13633631542325, 52.084596794845957 5.1363224481129421, 52.084599652094766 5.13625919749029, 52.084600140111739 5.1362545876124468, 52.084603969780289 5.1361925578721053, 52.084604394622147 5.1361672168131918, 52.084607248043845 5.1361305358165161, 52.084609296828042 5.13606852098146, 52.084609103156254 5.1360535530839115, 52.084611643842678 5.1360064989442122, 52.08461217648793 5.1359452261162533, 52.084612038685009 5.1359415214974433, 52.084614087827504 5.1358594063203782, 52.084640604443848 5.1355516116600484, 52.084642857778817 5.135543460957706, 52.084982043160878 5.1354961035347806, 52.085083917947486 5.1345288194715977, 52.085104202153161 5.1343492493033409, 52.08524441709433 5.1330996853375064, 52.085165794240311 5.1330994283780456, 52.085158604676472 5.1330777355575146, 52.084887840552256 5.1328501671087, 52.084870130718066 5.1327825202649118, 52.084810143569484 5.132734818616882, 52.084766256157309 5.1326845148578286, 52.084753367166229 5.1326649976350005, 52.084720281418413 5.1326657184399664, 52.084673544857651 5.1326567681971937, 52.084627489326522 5.13263783371076, 52.084616634761915 5.1326309095602483, 52.084607382304966 5.1326056816615164, 52.084589018020779 5.1325388213153929, 52.084566780831665 5.1324195361230522, 52.08455663616769 5.1322953840717673, 52.084555578185245 5.1322289216332138, 52.084558193339035 5.1321669477038085, 52.084565328201279 5.1320932512171566, 52.084573237691075 5.1320388016756624, 52.084590001497418 5.1319514436181635, 52.084614846622571 5.1318454830907285, 52.084674907008818 5.1317076328407039, 52.084733415627852 5.1315451303962618, 52.084768428234277 5.1314570531469457, 52.084772500442341 5.131445026723668, 52.084790059469135 5.1313976899708305, 52.084790684864267 5.1313653332182225, 52.084789962507784 5.1313581170979887, 52.084786229995423 5.1313093374080232, 52.084781658835709 5.1312665985897183, 52.084776584757492 5.131205978570506, 52.084776126593319 5.1311985920700378, 52.084773858077824 5.1311737054493278, 52.084770929767942 5.1311195062007151, 52.084764682454988 5.1310441740788519, 52.084762406875207 5.1310067452953634, 52.084759807214141 5.1309909871779382, 52.084745739819482 5.1308908765204251, 52.084737451048568 5.1308199469931424, 52.084731393493712 5.1307550501078367, 52.084726219235463 5.130682019587562, 52.084717591805187 5.130595849588774, 52.084696356672794 5.1304316397290677, 52.084744368912652 5.1304192959796637))', 1) );
insert into #Shapes (naam, shape) VALUES ('Area B', Geometry::STGeomFromText('POLYGON ((52.089193944586441 5.1364884474314749, 52.089683880347387 5.1369394774090678, 52.090064640389755 5.1368089618626982, 52.090064767515287 5.13680902402848, 52.090108351781964 5.1372362461406738, 52.0900023451254 5.137240494616317, 52.089941830607358 5.1372731845887953, 52.089884013120034 5.1373362265352416, 52.089867649300196 5.13736428650584, 52.089863897534087 5.1374888976570219, 52.089852973818779 5.1375768855214119, 52.089850827719964 5.1375869208953633, 52.08984444080243 5.1376464707614575, 52.089846089016071 5.1376523461555816, 52.089855048116348 5.13767090524721, 52.089885986401136 5.1377142074887443, 52.089973680692943 5.137785122508185, 52.090167043032125 5.1378114717081189, 52.090184094849974 5.1379786091856658, 52.090212659211829 5.138269433286041, 52.090046387117965 5.1383854977954284, 52.089997038751484 5.1384536319841185, 52.089986001565585 5.1384773087642488, 52.0899993844796 5.138537187827751, 52.090003677353721 5.1385827515141784, 52.0900126749184 5.1386172289494425, 52.090020956756526 5.1386840232833055, 52.0900247762911 5.1386965326964855, 52.090037737332914 5.1387801609122805, 52.090253500966355 5.1393869426101446, 52.090253373142332 5.1393870580941439, 52.09018895904866 5.1393668668649326, 52.09019982968524 5.1394877681651483, 52.090232462748588 5.1397292593531256, 52.090305473417473 5.1400441225035083, 52.090441768325739 5.1400458008552627, 52.0905898406636 5.1397357748355716, 52.090624607168138 5.1397489595692605, 52.090674059544682 5.1398083794509937, 52.090694529374325 5.1397384163970843, 52.090704163346672 5.1396187301667995, 52.0906239267189 5.1386488468750029, 52.090564216952771 5.1380289690569043, 52.090701825218275 5.138007998932153, 52.090686907175666 5.1381677433547006, 52.090704979235063 5.1382210930865915, 52.090742795495316 5.13826614478603, 52.090745454392028 5.1382716438933382, 52.090780634433031 5.138317345874384, 52.090777151606311 5.1383238151729582, 52.090758565347642 5.1383729032240808, 52.090745967798135 5.1383894728374937, 52.090718918413778 5.1384487237036574, 52.09071148235433 5.1385074989634694, 52.090739235906476 5.1386199161658359, 52.091703911079094 5.1383786785881966, 52.091774561209604 5.1390583219472319, 52.091763966455993 5.1391488551129392, 52.091713952366263 5.1397284283302724, 52.091654634801671 5.1401592225302011, 52.091534660555041 5.1407988700928273, 52.091924405223438 5.1407296329252166, 52.092023730557614 5.1405292234111544, 52.092084533682055 5.1403785903667165, 52.092164086876437 5.1401694919914007, 52.092214212752879 5.1400685210246593, 52.092354092746973 5.1398882211651653, 52.092737518250942 5.1397820895072073, 52.092756280866688 5.1398568955139261, 52.092979332917338 5.1401287692562034, 52.093051998862443 5.14014675848039, 52.093115186976668 5.1400825616937738, 52.093306944705546 5.1395597066730261, 52.093307103263214 5.139559774659574, 52.093311476645688 5.1395944439214718, 52.093552575019729 5.1397174675798443, 52.093717376162488 5.1397005364784905, 52.093728081547653 5.1396937158987059, 52.093731097411364 5.1396904007997364, 52.093789641978219 5.1396499255206436, 52.09379703433958 5.139647218074332, 52.093849730910733 5.139608321711421, 52.0938674450952 5.1396007388582916, 52.093911277158938 5.13956686834194, 52.093702596845105 5.1390791060402989, 52.094214342534542 5.1384887341409922, 52.094234085874632 5.1384696427267045, 52.094364419566851 5.1384893088412067, 52.094364145770669 5.1383595434017479, 52.094394268468022 5.1381287302356213, 52.09443390479516 5.138148912037261, 52.094484106955747 5.1381194878988437, 52.094514668919146 5.1380682252347469, 52.094674076435417 5.1382088991813486, 52.095094393635229 5.1384881954232995, 52.0952940530714 5.1385585838544232, 52.095604252303019 5.1385889891535044, 52.095554116032766 5.1386696371579523, 52.095534724403237 5.1388492132525849, 52.095524277190037 5.1390082753444624, 52.095594465266913 5.1390487975440919, 52.095594199141487 5.1393494226504117, 52.09559461963309 5.1399783839006, 52.095604153974683 5.1410990775805754, 52.095644179129778 5.1413294123732438, 52.09575448022224 5.1416396433487535, 52.095824270925078 5.1419194503811445, 52.096084321906162 5.1429293346052836, 52.096143952025322 5.1430793148784755, 52.096264120657 5.1433793206233531, 52.096193926805284 5.1433798011214318, 52.096113997035054 5.14339920294765, 52.096024247104872 5.1434492955148228, 52.095944452364236 5.1435387324349744, 52.095874538511147 5.14362958598761, 52.095844099589421 5.143679338650661, 52.095844470186279 5.1438587997111922, 52.095854729064243 5.1440396906996444, 52.095894579105732 5.1441883100385768, 52.095964113250375 5.144369007088244, 52.09580374216273 5.144229786732418, 52.095674295010134 5.1441983953353239, 52.095563816432822 5.14421941922198, 52.095403983902024 5.1442888717546564, 52.095254029380158 5.1443597327452153, 52.094414402963594 5.1447291097138077, 52.094194360597214 5.1448091029165, 52.093554132385179 5.1451087987516075, 52.09298392268829 5.14536870829761, 52.092384074527615 5.1456389861371825, 52.091314621968991 5.1461291963244005, 52.091214230906282 5.1462493549551356, 52.091174073517323 5.1464188823010772, 52.0911739426665 5.146418813848868, 52.09113409327086 5.1462687528401041, 52.091084660668564 5.146199182483377, 52.091033940669149 5.1464488115161657, 52.090953806928624 5.1464084108564867, 52.090854425442245 5.1464496781230418, 52.089684411417693 5.1471287335734814, 52.0895846124041 5.1471190678897267, 52.088994233263378 5.1476095448153067, 52.088864096673205 5.1477386702317744, 52.088784483494237 5.1475289191585034, 52.088713807872537 5.1472491544173726, 52.088664193741309 5.1471487923554067, 52.088594123489734 5.1471287621828763, 52.088524112701435 5.1471597642893574, 52.088323859963566 5.1472586041782051, 52.088194384938106 5.1472490853630006, 52.088083737995476 5.147229231428355, 52.087984558660537 5.1470896604005247, 52.0871439545881 5.144788873847574, 52.086584153570342 5.1431184258301306, 52.086113808001116 5.1425490758657, 52.085764196002856 5.142129332292825, 52.085273851326242 5.1414594290601263, 52.084604130359367 5.1405483337584883, 52.08448414108716 5.1403388837352395, 52.084363697096705 5.1399091542698443, 52.084215331124142 5.1393728284165263, 52.084534444796994 5.1391156225659822, 52.084510998101905 5.1389506384730339, 52.084537685041475 5.1385358115798789, 52.084483979582181 5.1385094355204064, 52.084454281721264 5.138519779080525, 52.084444217151031 5.1384497005492449, 52.084904137838336 5.1374696237373572, 52.08508396637626 5.1370586035773158, 52.085304709049147 5.1372689084542849, 52.085683944402767 5.1372594968589222, 52.08695387118496 5.1372188439127058, 52.087364651495307 5.1372282228088277, 52.087484228890389 5.137229019543156, 52.087544555542991 5.1372593543492258, 52.087933897256818 5.1377590987963755, 52.088324117939919 5.1382486345246434, 52.088394418613781 5.138369242607296, 52.088414155179635 5.1383487726561725, 52.0884645585902 5.1383689332287759, 52.0884744236222 5.1383891381781037, 52.088854240353591 5.1373994332191018, 52.089193944586441 5.1364884474314749))', 1) );
insert into #Shapes (naam, shape) VALUES ('Area C', Geometry::STGeomFromText('POLYGON ((52.081104027922265 5.1258389879949391, 52.081314665614627 5.1259588550310582, 52.082414517994039 5.1266395719721913, 52.082954646321014 5.1270186660112813, 52.083513987367041 5.127549389610067, 52.083794155623764 5.1278395495610312, 52.084174386574887 5.1282589976908639, 52.084274505455781 5.1284189013796713, 52.08453426125925 5.1288288246141747, 52.085124507819643 5.1299386160409242, 52.08521465482071 5.1300693768952019, 52.0853342462746 5.1301182725468744, 52.0854241597699 5.1300988405710086, 52.0854743384989 5.1304488354362547, 52.085234220619661 5.130419600171515, 52.084744388967557 5.1304194940048324, 52.08439406089019 5.1305090384557843, 52.083914360133932 5.1306285039224422, 52.083414051565342 5.1307787221157923, 52.082813916262239 5.13094844610896, 52.082724283281529 5.1306586048111562, 52.082483787322417 5.1300093204481527, 52.08225411306649 5.1293789464909949, 52.082194455789093 5.1292188489812043, 52.082134172902443 5.1291885531973094, 52.082084508962 5.1290896165883169, 52.082023798371665 5.1288696515839547, 52.081883911043406 5.1281993770971894, 52.081856097793207 5.12798699515406, 52.081856237724423 5.1279869175050408, 52.082000762340613 5.1280515332473442, 52.082027135184035 5.1280940270517021, 52.0820355968099 5.1281161647869, 52.08205282002023 5.1281410993754166, 52.08213594150827 5.1278323108932256, 52.0820438895719 5.1277594091965328, 52.081953932996839 5.1277496579568833, 52.081884289887846 5.1271693162703134, 52.081813924670755 5.1270196131258938, 52.081552422139794 5.1268787173321471, 52.08152364961375 5.1267665265884057, 52.081485387952739 5.1266524291002371, 52.081442847483068 5.1265567842247837, 52.081396028901857 5.1264795880384764, 52.081344932177927 5.1264208389159505, 52.081293396464417 5.1263833287749234, 52.081279310281388 5.1263776289997622, 52.081249886541627 5.1263603481929749, 52.081222431567454 5.12633884719625, 52.081221418222412 5.1263384295161813, 52.081197269726545 5.126324187265709, 52.081195053295232 5.1263138890499249, 52.081184833077714 5.1262332251062617, 52.0811841667945 5.1261982778874859, 52.081168951815926 5.1261331316782162, 52.081164751928249 5.1260440781433525, 52.081066497950815 5.1259329431923106, 52.081104027922265 5.1258389879949391))', 1) );
insert into #Shapes (naam, shape) VALUES ('Area D', Geometry::STGeomFromText('POLYGON ((52.084103860426694 5.1389694481622428, 52.084363892148971 5.1399091025981294, 52.084484331319835 5.1403388143996294, 52.084604299141489 5.1405482272725367, 52.08527401345782 5.1414593127556145, 52.085764355740025 5.1421292096101565, 52.086113962111995 5.1425489480607212, 52.086584335425869 5.1431183374952525, 52.087144145466013 5.1447888108543749, 52.087984736636635 5.1470895681108679, 52.088083857744529 5.1472290623707631, 52.088194406595086 5.14724888795369, 52.088323822820605 5.1472584035787792, 52.088524032849818 5.14715958177112, 52.088594117900357 5.1471285563893616, 52.08866433496587 5.1471486398950219, 52.088713997742161 5.1472490890882909, 52.088784678140655 5.1475289016962051, 52.088534413350153 5.1477695436890123, 52.088604030199349 5.1479895326774567, 52.08846407078854 5.1481186849763318, 52.088304384844378 5.1482683648355305, 52.087993860917578 5.1484991029959017, 52.087834112113342 5.1486196045298129, 52.0874739959836 5.1487791088875383, 52.087183827068657 5.1488594498950988, 52.087034655727216 5.1488792099405627, 52.086844170233235 5.1489094072021544, 52.086553779430687 5.1488890685141087, 52.086283983197063 5.1488190072122961, 52.086004210880986 5.148699401849246, 52.085884556407109 5.148648968199268, 52.085783737245947 5.148579464526847, 52.085444359574467 5.1483186569530517, 52.08505431888625 5.147909271530807, 52.085063869832084 5.14774867403321, 52.085103993769735 5.1475894195027649, 52.085123664481678 5.1475485048696683, 52.084903807879783 5.1472594002206034, 52.084644382136524 5.1469792136778958, 52.08418409107253 5.1464885615278035, 52.0837237383239 5.1459687419701368, 52.083234543621856 5.145409702023275, 52.082664410911732 5.1448292277490495, 52.082063829526305 5.1443087360821664, 52.082091124779964 5.1440836547198483, 52.081992223858833 5.1440890550147742, 52.08196270884946 5.14405638189055, 52.081944186007604 5.1439888756722212, 52.08194406144986 5.1439872064089114, 52.08192484639585 5.1439289392437786, 52.081920254660311 5.1439031759941996, 52.081906982464716 5.1438652367796749, 52.081898384261621 5.143827152704362, 52.081886463514792 5.1437939475605585, 52.081860758494884 5.143810536588699, 52.081833417158236 5.1438379039788957, 52.081759569933638 5.14407270308584, 52.0816137263635 5.1439596123534246, 52.081454453474372 5.1438598307431391, 52.081304313847795 5.14384896773845, 52.080264462672268 5.1430187125121805, 52.079664091113955 5.1425989381968975, 52.079524534521624 5.14249899610877, 52.079534315969795 5.1424492821097374, 52.079674492839317 5.1419992103874552, 52.079703816364884 5.1418385940623406, 52.079714205814525 5.141648898134008, 52.079727753764018 5.1414623958989978, 52.080252137147674 5.1417998058748831, 52.08029427562046 5.1417563394152745, 52.080314928898588 5.1417286938522011, 52.0803562682122 5.1416860464960337, 52.080404439009726 5.1416505186352879, 52.080450373701751 5.1416298456024379, 52.080458209152553 5.1416284950795994, 52.080495744477957 5.141600257018581, 52.080541761592031 5.141581037081778, 52.080577370766676 5.1415776146752092, 52.080586124956035 5.1415745182313319, 52.080565002281219 5.1411468000151217, 52.080635850084946 5.1411388639826328, 52.081214110314008 5.1410789246463136, 52.081586783519015 5.1409964717458934, 52.081614242866635 5.1412574960850179, 52.081570835318416 5.1413511682767421, 52.08156742547277 5.1413547724810877, 52.081523078051127 5.1414396720759816, 52.081520885843375 5.1414458907124478, 52.0815235725604 5.1414493722841144, 52.081564587075263 5.1415304632391781, 52.081586116692051 5.1416122366208583, 52.081591385416651 5.1417623861789625, 52.081744097638875 5.1417384068481624, 52.081754462670077 5.14239915706246, 52.081888611945665 5.1424242914485125, 52.081887235166505 5.1422738104593009, 52.081907565006986 5.1422072551213205, 52.081948822597042 5.1421398329548538, 52.081990273194968 5.1420943139491024, 52.082000561989844 5.1420720012392849, 52.082041298272088 5.1420040489174426, 52.08205503895892 5.1419854623652519, 52.082057312844228 5.1419532595345077, 52.082057383609936 5.141936854692176, 52.082061406905325 5.1418724298121266, 52.082061399472877 5.1418698709458113, 52.082065169426741 5.1418023992023132, 52.08206505025737 5.1417857583146542, 52.082067978335544 5.1417265709023923, 52.082068552136519 5.1417210444026873, 52.08207146529282 5.1416510321596576, 52.082074348499624 5.1415691960222105, 52.082074102712795 5.1415587870869786, 52.082077217031589 5.141500341455882, 52.082077142713729 5.1414836310842942, 52.082064611044075 5.1414689618560345, 52.08204338257201 5.1414488023146987, 52.0820095549712 5.1414023755017455, 52.08195383178483 5.1413428048418419, 52.0819458400365 5.1413370133377612, 52.081897551489291 5.141270585100548, 52.081845151958987 5.1412304241675884, 52.081783577566966 5.1409387167077512, 52.082063805446388 5.1408189585007031, 52.082534100375206 5.1404983382591407, 52.082604082068428 5.1404395992867649, 52.082693810134288 5.1403690781753832, 52.083284175475136 5.1398683352445742, 52.083963928950048 5.1391394941752653, 52.084103860426694 5.1389694481622428))', 1) );
select naam, shape, shape.Reduce(0.001) as reducedShape from #Shapes
drop table #Shapes
这将返回两组多边形。首先是未缩减的集合:
然后是缩减集:
这些形状要简单得多,并且它们的大致形状确实正确,但我想要的是仍然共享边框部分。因此,它们必须以某种方式一起减少。
我认为你必须首先将它们分解成多段线(从边到边),然后减少线,然后再次将它们重新组装成多边形。但我不知道如何在 T-SQL 中执行此操作。
有什么想法吗?
编辑:我已经接受了 alphadaogg 的回答。目前的两个答案都不完全让我信服,但 alphadogg 确实付出了最大的努力,我真的很感谢任何想法的分享。所以赏金归他所有。
如果我找到满意的方法,我会在稍后进行 self 解答。
后续:我向 SqlServer Geo 团队的项目经理 Isaac Kunen 发送了电子邮件。他的有用回复如下:
Your problem is not at all rare, but it isn't something we directly support: it's an operation that requires knowledge of the topology of your figures, and we don't have anything like this built in. Essentially, you don't want to store separate polygons for each neighborhood. Rather, you want to store curves representing portions of boundaries, and reuse these boundaries for multiple polygons. When you generalize, you generalize the shared boundary, and all dependent polygons are affected.
You could build this yourself---as the posters in the thread you cite hint---but it may be real effort to do so.
I don't know the third-party software you're using, but this is the other option. If you don't want a full-fledged GIS, you could use a package like the FME from Safe Software (http://www.safe.com). The FME doesn't do general-purpose topology, but I believe it has enough functionality to do what you're looking for. See: http://www.safe.com/products/desktop/under-the-hood.php#3b.
I hope this helps.
Cheers,
-Isaac
最佳答案
我不确定您如何从形状中获取“共享”LineStrings。其次,一旦您减少了形状的“子集”,因为您的端点可能会从原始位置移动,并且您将无法在减少后使它们匹配。
简而言之,我要做的基本上是使用 bool 运算来处理简化的形状。
首先,执行您所做的操作,即创建一个简化形状的临时表(称为#ReducedShapes
)。
然后,我将创建第二个临时表并查找所有形状之间的重叠区域(使用 STIntersection
)。在此表中,我基本上有列 naam1
、naam2
和 intsec
,最后一列的类型为 shape。像(未经测试)的东西:
INSERT INTO #IntSecs(naam1, naam2, intsec)
SELECT s1.naam, s2.naam, s1.naam.STIntersection(s2.naam)
FROM #ReducedShapes s1, #ReducedShapes s2
WHERE s1.naam.STIntersection(s2.naam) IS NOT NULL
这将为您提供形状对重叠位置的列表。事实上,每个重叠都有两行。例如,如果 A 和 B 重叠,您将得到 和 。我会通过并删除每次出现的两个中的一个。
最后,对于每个重叠,我会从 #ReducedShapes 中的两个区域之一减去 (
表。想象一下你有两个半重叠的正方形 A 和 B。该操作将涉及 A.STDifference(B),这意味着您保留所有 B 和 A 的一半。我会将修改后的形状插入到第三个表中(例如 STDifference
) 交集。#ModifiedShapes
)。
两个问题:a)正如您从“橙色”和“蓝色”形状中看到的那样,它们并没有类似地减少,因此您将获得两种可能的减少之一,具体取决于您如何处理“获胜者”。b) 问题的一个更复杂的形式是,根据初始形状的复杂性,您可能会在三个或更多区域之间出现重叠。您必须根据您的特定需求确定自己的方式来确定哪种形状在该交叉点“获胜”。目前尚不清楚是否存在限制。可以像通过订购任意选择获胜者一样简单,也可以更复杂,因为准确性很重要。
不幸的是,上述概念并没有解决间隙问题。这个有点复杂,我不 100% 确定如何解决它。但是,如果您创建第三个表,从 #Shapes
中的所有原始形状中减去(再次STDifference
)所有修改的形状#ModifiedShapes
(当然,在实际减去之前测试重叠),您将在间隙中留下剩余的形状。您希望聚合相邻的形状并指定“获胜颜色”,可能会将其与相关形状合并回来。
这个答案很长,我就这样吧。我可能找错了树。根据您的反馈/问题,我将添加到帖子中。
关于sql-server - 我将如何概括多个相邻的多边形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/541545/
我已经实现了 Bentley-Ottmann-algorithm检测多边形-多边形交叉点。这通常非常有效:由于多边形不自相交,因此两个多边形的线段并集中的任何线段相交表明两个多边形相交。 但是如果我看
我在 Silverlight 中有一个多边形(棋盘游戏的十六进制),例如; public class GridHex : IGridShape { ..... public IList
我创建了一个简单的 DirectX 应用程序来渲染一个顶点场。顶点呈现如下(如果从顶部查看): |\|\|\|\| |\|\|\|\| 每个三角形都是这样渲染的: 1 |\ 2 3 这应该意味着多边形
我的代码的某些部分here : var stage = new Kinetic.Stage({ container: "canvas", width: 300,
我正在尝试从 map 数据构造导航网格物体。步骤之一涉及将二进制图像(其中0表示占用空间,1表示自由空间)转换成平面直线图。 我正在尝试找到一种可靠的方法。我目前的想法是使用Canny边缘检测器,然后
我的任务是编写 MATLAB 代码来生成一个由 4 部分组成的 Logo ,如屏幕截图所示。左上角应为黑色,右下角应为白色。另一个程序应随机选择两种颜色。 我采取了以下方法: clear all cl
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
如何向 google.maps.Rectangle 和 google.maps.Polygon 添加标题? title 属性在 RectangleOptions 中不可用.我试过了,但没用(对于 go
我有一个表,用于将表上的段存储为多边形。然后我想获取所有被另一个多边形接触的线段,例如正方形或圆形。图片上:http://img.acianetmedia.com/GJ3 我将灰色小框表示为段和 bi
我正在我的网站上使用 CSS 来制作形状。它在 chrome 中运行良好,但在 mozilla、internet explorer 中打开时,它无法运行。 有人知道怎么解决吗? 这是 fiddle h
我使用 DrawingManager 在 Google map 上绘制圆形和多边形。我尝试使用下面的代码删除圆形/多边形。 selectedShape.setMap(null); 这里selected
我看到了很多如何检测碰撞的教程,但没有看到如何解决它。我正在制作一个自上而下的游戏,玩家具有圆形碰撞形状,而墙壁是各种多边形。 我正在使用 slick2d。我应该做的是,如果玩家与角落碰撞,我会按法线
我对 tkinter 比较陌生,我正在制作一个只使用正方形的游戏。我正在抄写的书只显示三角形。这是代码: # The tkinter launcher (Already complete) from
我在 OpenCV/Python 中工作,我遇到了这个问题。我已经使用 cv2.minAreaRect() 来获取围绕一组点的边界框。是否有任何其他函数/通用算法可以给我内接多边形(点集)的最大矩形?
如果给定一组线段 S ,我们能否设计一种算法来测试集合 S 中的线段是否可以形成多边形,我对它们是否相交多边形不感兴趣,我只想知道我可以测试什么标准, 任何建议 最佳答案 构建一个图形数据结构,其中节
如何从多个地理位置(经度、纬度值)创建多边形地理围栏。此外,如何在 Android 上跟踪用户进入此地理围栏区域或从该区域退出。 最佳答案 地理围栏只是一组形成多边形的纬度/经度点。获得纬度/经度点列
我想要一个 complex image like this在我的申请中。我想让用户点击复杂的多边形(在这种情况下是有边界的国家/地区)并突出显示他们点击的多边形。我有我需要用于该状态的图像。 我怎样才
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,
我想在 python tkinter 中移动对象,特别是多边形。问题出在 is_click 函数中。我似乎无法弄清楚如何确定我是否单击了该对象。代码还没有 100% 完成,移动仍然需要完成,但我现在需
我有一个大多边形,我想找到与该多边形相交的要素,但由于多边形太大,我遇到超时异常。 我试图研究 JTS 方法,但不知道如何使用它。 final List coordinates = List.of(n
我是一名优秀的程序员,十分优秀!