LINK-Node


適当につないだリンクノードのテストデータのメモ

use でーたべーすめい;
GO


CREATE TABLE tmpEdge (SHP geography,FID int,TID int);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.7399662 40.82435392,141.152709 39.70358439)',4326),1,2);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.8720061 38.26892558,141.152709 39.70358439)',4326),3,2);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.7399662 40.82435392,140.1031778 39.71803056)',4326),1,4);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(141.152709 39.70358439,140.7399662 40.82435392)',4326),2,1);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.7399662 40.82435392,141.3467972 43.06428056)',4326),1,0);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.3634278 38.24048889,140.1031778 39.71803056)',4326),5,4);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.4466188 36.34159972,140.8720061 38.26892558)',4326),7,3);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.8720061 38.26892558,140.3634278 38.24048889)',4326),3,5);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.3634278 38.24048889,140.4675816 37.74997969)',4326),5,6);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.0604359 36.39060111,140.4466188 36.34159972)',4326),9,7);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.4466188 36.34159972,139.8830857 36.56548547)',4326),7,8);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.4466188 36.34159972,139.0604359 36.39060111)',4326),7,9);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.1231833 35.60458889,139.0604359 36.39060111)',4326),11,9);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.0604359 36.39060111,139.6487866 35.85692781)',4326),9,10);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.6487866 35.85692781,139.8830857 36.56548547)',4326),10,8);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.6425361 35.44771111,139.6487866 35.85692781)',4326),13,10);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.6487866 35.85692781,139.6917222 35.68956667)',4326),10,12);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.8830857 36.56548547,140.4675816 37.74997969)',4326),8,6);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.1231833 35.60458889,139.6425361 35.44771111)',4326),11,13);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.0238251 37.90243547,139.6917222 35.68956667)',4326),14,12);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.0238251 37.90243547,136.6257139 36.594283)',4326),14,16);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.6425361 35.44771111,139.0238251 37.90243547)',4326),13,14);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(137.2111942 36.69537383,139.6425361 35.44771111)',4326),15,13);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.6257139 36.594283,136.2218332 36.06542211)',4326),16,17);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(138.5683861 35.66394444,136.2218332 36.06542211)',4326),18,17);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.8720061 38.26892558,140.4466188 36.34159972)',4326),3,7);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(138.5683861 35.66394444,138.1809972 36.65131389)',4326),18,19);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.7221532 35.39119222,138.383025 34.97691111)',4326),20,21);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(138.1809972 36.65131389,136.2218332 36.06542211)',4326),19,17);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.7221532 35.39119222,138.1809972 36.65131389)',4326),20,19);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(137.2111942 36.69537383,138.5683861 35.66394444)',4326),15,18);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.7221532 35.39119222,136.9067417 35.18019722)',4326),20,22);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(137.2111942 36.69537383,136.7221532 35.39119222)',4326),15,20);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.9067417 35.18019722,138.383025 34.97691111)',4326),22,21);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.9067417 35.18019722,135.8683028 35.00439167)',4326),22,24);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.5085972 34.730275,136.9067417 35.18019722)',4326),23,22);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(137.2111942 36.69537383,136.5085972 34.730275)',4326),15,23);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.5200224 34.68631997,135.8683028 35.00439167)',4326),26,24);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.7556361 35.02128056,135.5200224 34.68631997)',4326),25,26);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.7556361 35.02128056,136.5085972 34.730275)',4326),25,23);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(138.383025 34.97691111,136.2218332 36.06542211)',4326),21,17);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.5200224 34.68631997,135.1828524 34.69110236)',4326),26,27);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.1231833 35.60458889,137.2111942 36.69537383)',4326),11,15);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.1031778 39.71803056,141.3467972 43.06428056)',4326),4,0);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.1674939 34.22603522,135.8327707 34.68471414)',4326),29,28);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.8327707 34.68471414,135.1828524 34.69110236)',4326),28,27);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.1828524 34.69110236,134.2381983 35.50363722)',4326),27,30);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.1828524 34.69110236,135.8683028 35.00439167)',4326),27,24);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.8327707 34.68471414,135.1674939 34.22603522)',4326),28,29);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.9349 34.66176389,135.1674939 34.22603522)',4326),32,29);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.1674939 34.22603522,133.0505309 35.47221683)',4326),29,31);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.0505309 35.47221683,131.4715498 34.18580211)',4326),31,34);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(132.459375 34.396275,133.0505309 35.47221683)',4326),33,31);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(134.5594889 34.06573333,131.4715498 34.18580211)',4326),35,34);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.0505309 35.47221683,134.2381983 35.50363722)',4326),31,30);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.7556361 35.02128056,135.8327707 34.68471414)',4326),25,28);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(132.459375 34.396275,134.5594889 34.06573333)',4326),33,35);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(134.0432789 34.34003492,131.4715498 34.18580211)',4326),36,34);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(134.5594889 34.06573333,134.0432789 34.34003492)',4326),35,36);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.7556361 35.02128056,133.9349 34.66176389)',4326),25,32);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.9349 34.66176389,132.459375 34.396275)',4326),32,33);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.6257139 36.594283,139.6917222 35.68956667)',4326),16,12);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(130.2988056 33.24932778,133.9349 34.66176389)',4326),40,32);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.9349 34.66176389,132.7661028 33.84164444)',4326),32,37);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(134.5594889 34.06573333,130.4181167 33.60626111)',4326),35,39);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(132.7661028 33.84164444,134.5594889 34.06573333)',4326),37,35);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.5311167 33.55975556,133.9349 34.66176389)',4326),38,32);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(130.2988056 33.24932778,130.7416619 32.78976539)',4326),40,42);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(132.7661028 33.84164444,129.8736411 32.74508975)',4326),37,41);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(131.6125898 33.23812308,133.5311167 33.55975556)',4326),43,38);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(139.6917222 35.68956667,140.4675816 37.74997969)',4326),12,6);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.8683028 35.00439167,136.2218332 36.06542211)',4326),24,17);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.4675816 37.74997969,141.3467972 43.06428056)',4326),6,0);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(136.2218332 36.06542211,140.4675816 37.74997969)',4326),17,6);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.5311167 33.55975556,130.2988056 33.24932778)',4326),38,40);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(130.7416619 32.78976539,129.8736411 32.74508975)',4326),42,41);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.5311167 33.55975556,131.4238818 31.91100714)',4326),38,44);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(131.6125898 33.23812308,130.5582808 31.56022022)',4326),43,45);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(135.7556361 35.02128056,133.5311167 33.55975556)',4326),25,38);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(133.5311167 33.55975556,131.6125898 33.23812308)',4326),38,43);
INSERT INTO tmpEdge (SHP,FID,TID) VALUES(geography::STGeomFromText('LINESTRING(140.1231833 35.60458889,135.7556361 35.02128056)',4326),11,25);
SELECT * FROM tmpEdge;


CREATE TABLE tmpNode (SHP geography,PID int PRIMARY KEY, name NVARCHAR(255));
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(43.06428056,141.3467972,4326),0,N'札幌市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(40.82435392,140.7399662,4326),1,N'青森市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(39.70358439,141.152709,4326),2,N'盛岡市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(38.26892558,140.8720061,4326),3,N'仙台市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(39.71803056,140.1031778,4326),4,N'秋田市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(38.24048889,140.3634278,4326),5,N'山形市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(37.74997969,140.4675816,4326),6,N'福島市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.34159972,140.4466188,4326),7,N'水戸市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.56548547,139.8830857,4326),8,N'宇都宮市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.39060111,139.0604359,4326),9,N'前橋市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.85692781,139.6487866,4326),10,N'さいたま市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.60458889,140.1231833,4326),11,N'千葉市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.68956667,139.6917222,4326),12,N'新宿区');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.44771111,139.6425361,4326),13,N'横浜市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(37.90243547,139.0238251,4326),14,N'新潟市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.69537383,137.2111942,4326),15,N'富山市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.594283,136.6257139,4326),16,N'金沢市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.06542211,136.2218332,4326),17,N'福井市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.66394444,138.5683861,4326),18,N'甲府市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(36.65131389,138.1809972,4326),19,N'長野市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.39119222,136.7221532,4326),20,N'岐阜市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.97691111,138.383025,4326),21,N'静岡市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.18019722,136.9067417,4326),22,N'名古屋市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.730275,136.5085972,4326),23,N'津市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.00439167,135.8683028,4326),24,N'大津市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.02128056,135.7556361,4326),25,N'京都市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.68631997,135.5200224,4326),26,N'大阪市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.69110236,135.1828524,4326),27,N'神戸市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.68471414,135.8327707,4326),28,N'奈良市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.22603522,135.1674939,4326),29,N'和歌山市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.50363722,134.2381983,4326),30,N'鳥取市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(35.47221683,133.0505309,4326),31,N'松江市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.66176389,133.9349,4326),32,N'岡山市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.396275,132.459375,4326),33,N'広島市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.18580211,131.4715498,4326),34,N'山口市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.06573333,134.5594889,4326),35,N'徳島市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(34.34003492,134.0432789,4326),36,N'高松市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(33.84164444,132.7661028,4326),37,N'松山市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(33.55975556,133.5311167,4326),38,N'高知市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(33.60626111,130.4181167,4326),39,N'福岡市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(33.24932778,130.2988056,4326),40,N'佐賀市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(32.74508975,129.8736411,4326),41,N'長崎市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(32.78976539,130.7416619,4326),42,N'熊本市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(33.23812308,131.6125898,4326),43,N'大分市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(31.91100714,131.4238818,4326),44,N'宮崎市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(31.56022022,130.5582808,4326),45,N'鹿児島市');
INSERT INTO tmpNode (SHP,PID,name) VALUES(geography::Point(26.212375,127.6809806,4326),46,N'那覇市');
SELECT * FROM tmpNode;
カテゴリー: 開発 タグ: パーマリンク