Skip to content

Instantly share code, notes, and snippets.

@ChiiAyano
Created Jun 22, 2022
Embed
What would you like to do?
逆ジオコーディングのやつ2
CREATE TABLE `ExpressWay` (
gid serial,
`road_id` varchar(10),
`prefecture_id` varchar(10),
`prefecture` varchar(20),
`road_name` varchar(128),
`road_num` varchar(32),
`popular_road_name` varchar(128));
ALTER TABLE `ExpressWay` ADD PRIMARY KEY (gid);
ALTER TABLE `ExpressWay` ADD COLUMN geom MULTIPOLYGON REF_SYSTEM_ID=0;
INSERT INTO `ExpressWay` (`road_id`,`prefecture_id`,`prefecture`,`road_name`,`road_num`,`popular_road_name`,`geom`) VALUES ('100101','13','東京都','首都高速1号上野線','1',null,ST_GeomFromText('MULTIPOLYGON(((139.77842082138184 35.68359196747183,139.7782905144098 35.68363587525592,139.77831034373162 35.68380017535113,139.77829901269058 35.68393189870332,139.7782678523277 35.68405370739459,139.77821827902312 35.6841316083018,139.77817720399932 35.684178348846125,139.7780398151266 35.684314321338704,139.77786843313072 35.68439647138631,139.7777041330355 35.68444887745116,139.77748742687547 35.684489952474955,139.77735145438288 35.6845239455981,139.7772282293115 35.68456643700203,139.7771135025209 35.684610344786094,139.77702002143224 35.68467974741252,139.7769492024257 35.684722238816455,139.77683447563507 35.6848383819872,139.7767664893888 35.684975770859914,139.7767268307451 35.68514148733525,139.77671549970407 35.685257630506,139.77669850314248 35.6855083297892,139.77666167725909 35.68590916536629,139.77664184793727 35.68612162238595,139.77661210395453 35.686450222576354,139.77659510739295 35.686625853712606,139.7765653634102 35.686860972814365,139.7765427013281 35.68701819100891,139.776520039246 35.687128668659135,139.77647046594143 35.687278804953024,139.77641239435604 35.68743460676745,139.77632032964752 35.68765272930763,139.77618435715493 35.687982745878166,139.77603422086102 35.68834392281158,139.77590674664924 35.68864702815963,139.775763692256 35.68896571368912,139.77566879478724 35.68921358021206,139.7755356550549 35.68949968899854,139.77540676446299 35.68982687280881,139.7752934540525 35.69010589969463,139.77512348843675 35.69047699128897,139.77491669693762 35.690981222615626,139.7748076356675 35.69124466932,139.77474531494175 35.6914358806377,139.7747014071577 35.691601597113035,139.7746886597365 35.6916865799209,139.77468016145573 35.69186362743728,139.77469574163717 35.69205058961458,139.7747438985616 35.692430179489705,139.7747991373867 35.692795605563525,139.77484729431117 35.69317661181878,139.7749081986568 35.69358452929653,139.77495352282097 35.69389613292537,139.77498468318385 35.69411850460594,139.77505975133082 35.6947091351206,139.77508666255332 35.69495416888328,139.77512065567646 35.69524735957041,139.7751957238234 35.69532526047762,139.77522971694657 35.69561136926409,139.77530336871337 35.69611276783049,139.7753501092577 35.696464030103,139.77537560410008 35.696684985403444,139.77538976790137 35.69690594070389,139.7753996825623 35.697214711572464,139.7754039317027 35.69760138334825,139.77541242998348 35.69806453965111,139.77542376102454 35.69853052871423,139.77542942654506 35.698937029811844,139.7754365084457 35.699408684395486,139.77544359034636 35.699735868205764,139.77544642310662 35.70012537274181,139.77545492138742 35.70035907546343,139.77546483604834 35.700575781623485,139.7754818326099 35.70080098606432,139.77552007487344 35.70113383539512,139.77557531369854 35.70164656500257,139.77555123523632 35.7017527935124,139.7755823955992 35.7020034927956,139.7756277197634 35.702092724743856,139.77564896546536 35.70228960158207,139.7757013715302 35.702718764761784,139.77573961379375 35.70313659690045,139.77579485261887 35.70361391700462,139.77584442592345 35.70405299484525,139.7758699207658 35.7042923630874,139.77590957940947 35.704646458120166,139.77593507425183 35.70494389794769,139.77596765099486 35.70523992139508,139.77602288981996 35.70574415272175,139.77606254846364 35.706106746035296,139.77608945968612 35.7064211824244,139.77613761661058 35.706844680083584,139.77615886231254 35.707153450952156,139.77617869163439 35.707535873587545,139.77619143905557 35.707656265898684,139.7762339304595 35.7081038420201,139.77630333308593 35.708786537243256,139.7763514900104 35.709273772008345,139.77640672883552 35.709820494738956,139.7764378891984 35.710218497555786,139.77645913490036 35.710501773581996,139.77647754784206 35.710721312502315,139.7764931280235 35.71084878671411,139.77652570476653 35.710983342826566,139.77656819617047 35.711115066178756,139.77662910051612 35.711252455051465,139.77670700142332 35.711377096503,139.77678206957026 35.71148049225257,139.7768967963609 35.711606550084234,139.77697186450783 35.71168445099144,139.77712341718185 35.711797761401925,139.77725655691418 35.7118784950694,139.77754408208077 35.712045627924866,139.77770838217597 35.71214194177378,139.77789676073343 35.71226375046505,139.77809788671203 35.712413886758945,139.7781885350404 35.71249178766615,139.77828059974894 35.71258810151507,139.77840382482034 35.71273257228844,139.77854404645333 35.712912452565085,139.77870551378825 35.713148988046974,139.77894629841055 35.71349033565856,139.7791913321732 35.71384726345159,139.77947885733983 35.714250931788946,139.77969556349987 35.71455970265752,139.77994909554334 35.71492087959094,139.7802167913881 35.71530896774685,139.78038109148332 35.71554550322874,139.78054680795864 35.71576929128945,139.78092214869338 35.71631318125978,139.7809476435357 35.71629618469821,139.7810283772032 35.71640949510869,139.781361226534 35.71684149104867,139.78166433188204 35.71722533006419,139.78192352944603 35.717551097494336,139.7823314469238 35.7180510796806,139.78274219716178 35.718572307568834,139.78310337409522 35.719031214731295,139.78326059228976 35.71895048106383,139.78284134377097 35.71841933851468,139.7825099108203 35.717997257235616,139.7821048261028 35.717491609528835,139.78186545786065 35.71719275332118,139.7816544172211 35.71694063765784,139.78138247223595 35.71658937538534,139.78113743847328 35.716267857095595,139.78075501583788 35.715752294727885,139.7807691796392 35.71574379644709,139.78071818995448 35.71568147572133,139.78057938470164 35.715487431643375,139.7804632415309 35.71530330222633,139.78020121120664 35.71493645977238,139.78012331029944 35.71483448040295,139.77999441970752 35.7146772622084,139.7797437204243 35.71433874735707,139.77951001770268 35.71399739974548,139.77912901144745 35.71346342443607,139.77892930184896 35.71317165012907,139.7787480051922 35.71290537066443,139.77855537749437 35.71263909119979,139.7784236541422 35.71247620748472,139.7782876816496 35.71234448413253,139.77815170915702 35.71223683924257,139.77801432028429 35.7121376926334,139.77779336498386 35.7120059692812,139.77757524244367 35.71188416058993,139.77743643719083 35.711809092442984,139.77731179573928 35.71172127687486,139.77717865600698 35.71161646474516,139.7770610964561 35.71150740347507,139.77696336622705 35.71139975858511,139.77688121617945 35.71128219903422,139.77679906613184 35.71115189206216,139.77674099454646 35.71101733594971,139.7767013359028 35.71088277983726,139.77668292296107 35.71075530562547,139.7766744246803 35.71061650037262,139.77667017553992 35.71032047692523,139.77666875915978 35.71007119402216,139.77664892983793 35.709817661978704,139.7766021892936 35.7094168264016,139.7765427013281 35.70885735624983,139.77649029526327 35.70835595768343,139.7764364728183 35.70776957630917,139.77634865725014 35.707136454390586,139.77627925462372 35.70645234278728,139.77620701923703 35.70578947688594,139.77615744593245 35.70530649126125,139.77609795796695 35.7047300245479,139.77612486918946 35.70465070726056,139.77609229244644 35.7043334381112,139.77604696828223 35.704221544080845,139.77596623461477 35.70354309799807,139.7758996647486 35.70290289417883,139.77584867506388 35.7024595671978,139.77580476727982 35.70205306610018,139.77576085949576 35.70167914174558,139.77570703705078 35.70123439838442,139.7756673784071 35.700860474029824,139.77564613270513 35.70058427990426,139.7756362180442 35.70026134523438,139.7756263033833 35.699759946667974,139.77561922148266 35.6993095377863,139.77561497234225 35.698843548723175,139.77560647406145 35.6984568769474,139.77560080854093 35.69799088788427,139.77559089388 35.69748948931788,139.77558239559923 35.6971438925659,139.77556964817802 35.69690877346414,139.77555973351713 35.69672606042723,139.77554273695554 35.69655184567111,139.77551582573307 35.696337972271316,139.77544642310664 35.695825242663865,139.77536993857953 35.69530259839551,139.77543225930532 35.69529976563524,139.77533877821665 35.694745961003996,139.77524671350812 35.69412417012646,139.77518722554262 35.693686508665955,139.77514190137842 35.69337207227686,139.77509232807384 35.69301372810369,139.77504417114937 35.69268796067355,139.77498609956402 35.692263046634224,139.77496485386206 35.69205483875496,139.77495635558125 35.69183529983464,139.77496060472166 35.691750317026774,139.77498893232428 35.69156052208921,139.77502009268716 35.69145429357938,139.77508949531358 35.69124325293985,139.7752169695254 35.69093164931102,139.77557389731842 35.690080404852246,139.77585717334463 35.689416122570776,139.77613195109006 35.68878583341245,139.77637840123285 35.68820228479846,139.77658094359157 35.68772354831415,139.77667584106035 35.687512507674626,139.776736745406 35.68734962395955,139.77677923680994 35.68720940232658,139.77681181355297 35.687084760875045,139.77683589201519 35.68693462458115,139.7768628032377 35.686700921859526,139.77693362224423 35.68590349984573,139.77697894640843 35.6853369477933,139.77700302487068 35.6851273235339,139.77704409989448 35.68500268208237,139.77710358785998 35.68490353547319,139.77717440686652 35.68482421818585,139.77724239311283 35.68476756298061,139.7773372905816 35.68471515691576,139.77746334841328 35.684671249131696,139.77761348470716 35.684630174107895,139.77781036154536 35.684586266323834,139.7780086547637 35.684526778358325,139.77813187983512 35.68447437229348,139.7782636031873 35.68438797310549,139.77835566789582 35.68429874115723,139.77843356880302 35.68420526006857,139.77849022400827 35.684082034997175,139.77850863695 35.68398855390852,139.77851146971025 35.68385258141594,139.77850297142945 35.68376193308755,139.77842082138184 35.68359196747183)))', 0));
COMMIT;
ANALYZE TABLE `ExpressWay`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment