middenpount van een polygon WKT in mariadb 10
Ik heb een geometry kolom in de database waarin polygon waarden instaan bijv
Code (php)
1
geomfromtext : 'POLYGON((71.181686401367 36.491958618164,71.185600280762 36.49435043335,71.191741943359 36.507308959961,71.194053649902 36.509212493897,71.200614929199 36.521530151367,71.20231628418 36.531177520752,71.195869445801 36.546714782715,71.167289733887 36.563282012939,71.156921386719 36.574726104736,71.150276184082 36.583194732666,71.144287109375 36.5876121521,71.124237060547 36.592399597168,71.116172790527 36.596622467041,71.110336303711 36.604587554932,71.108772277832 36.614574432373,71.107849121094 36.628849029541,71.110412597656 36.65145111084,71.109031677246 36.665645599365,71.105171203613 36.675170898438,71.097190856934 36.687580108643,71.059761047363 36.742202758789,71.052963256836 36.752796173096,71.040771484375 36.770446777344,71.033699035645 36.785301208496,71.028732299805 36.790672302246,71.019950866699 36.809661865234,71.017158508301 36.836643218994,71.01838684082 36.852745056152,71.018699645996 36.864757537842,71.013160705566 36.881725311279,71.004081726074 36.897323608399,70.997566223145 36.906600952148,70.97681427002 36.91792678833,70.957023620606 36.932121276855,70.902351379395 36.949649810791,70.89722442627 36.952743530273,70.891578674316 36.953460693359,70.858688354492 36.968158721924,70.833938598633 36.988487243652,70.80729675293 37.001976013184,70.793853759766 37.015392303467,70.784255981445 37.027713775635,70.76668548584 37.041896820068,70.753852844238 37.054611206055,70.735824584961 37.065479278565,70.712364196777 37.07621383667,70.717102050781 37.093868255615,70.721519470215 37.098697662354,70.730010986328 37.10400390625,70.800819396973 37.125389099121,70.838104248047 37.13387298584,70.853057861328 37.141250610352,70.860992431641 37.151626586914,70.857070922852 37.166416168213,70.863121032715 37.171394348145,70.867027282715 37.177635192871,70.86686706543 37.186374664307,70.856071472168 37.194667816162,70.852661132813 37.201908111572,70.849014282227 37.205116271973,70.836517333984 37.208045959473,70.829612731934 37.211402893066,70.82763671875 37.217456817627,70.815620422363 37.229175567627,70.811401367188 37.239730834961,70.802284240723 37.253189086914,70.789710998535 37.262104034424,70.786346435547 37.273880004883,70.782722473145 37.276775360108,70.806823730469 37.27730178833,70.81485748291 37.281341552734,70.81623840332 37.288684844971,70.817092895508 37.293460845947,70.82154083252 37.296821594238,70.832092285156 37.298454284668,70.84578704834 37.292789459229,70.862701416016 37.294372558594,70.871932983398 37.299053192139,70.870475769043 37.309513092041,70.875663757324 37.312309265137,70.893600463867 37.313289642334,70.906814575195 37.305732727051,70.927421569824 37.309814453125,70.931213378906 37.312465667725,70.937789916992 37.326686859131,70.953063964844 37.338672637939,70.963157653809 37.354091644287,70.967704772949 37.356811523438,70.999214172363 37.364978790283,71.010688781738 37.365013122559,71.018081665039 37.367965698242,71.02710723877 37.376575469971,71.029144287109 37.387474060059,71.034072875977 37.395420074463,71.042518615723 37.402751922607,71.051818847656 37.405422210693,71.067611694336 37.402088165283,71.083312988281 37.392303466797,71.095489501953 37.387729644775,71.14640045166 37.380290985107,71.175636291504 37.382122039795,71.199844360352 37.392368316651,71.211944580078 37.394992828369,71.239273071289 37.397239685059,71.281455993652 37.395385742188,71.305793762207 37.398525238037,71.315452575684 37.395584106445,71.316703796387 37.391048431397,71.310157775879 37.384712219238,71.294975280762 37.380226135254,71.287055969238 37.375469207764,71.286834716797 37.371250152588,71.291038513184 37.36457824707,71.289749145508 37.360179901123,71.279151916504 37.355991363525,71.251136779785 37.352821350098,71.226654052734 37.344116210938,71.208198547363 37.33264541626,71.197898864746 37.317386627197,71.196342468262 37.306930541992,71.202392578125 37.287467956543,71.212715148926 37.279781341553,71.243942260742 37.264961242676,71.259651184082 37.261459350586,71.272666931152 37.26106262207,71.290061950684 37.25634765625,71.306991577148 37.254852294922,71.31681060791 37.251407623291,71.3193359375 37.248477935791,71.312614440918 37.240592956543,71.312339782715 37.236389160156,71.310646057129 37.230506896973,71.309364318848 37.22615814209,71.306411743164 37.217082977295,71.306884765625 37.210605621338,71.313804626465 37.199138641358,71.315521240234 37.192070007324,71.315185546875 37.183647155762,71.309188842773 37.168186187744,71.309989929199 37.155742645264,71.308616638184 37.146099090576,71.309143066406 37.136882781982,71.311866760254 37.129943847656,71.324966430664 37.113998413086,71.336715698242 37.080135345459,71.348991394043 37.057903289795,71.357421875 37.029747009277,71.36018371582 37.022480010986,71.36710357666 37.012664794922,71.385772705078 36.996658325195,71.392608642578 36.986087799072,71.388900756836 36.980766296387,71.378936767578 36.977100372315,71.369194030762 36.97119140625,71.35228729248 36.950366973877,71.343826293945 36.94535446167,71.332511901856 36.94327545166,71.328620910644 36.940628051758,71.327133178711 36.936370849609,71.35376739502 36.913974761963,71.354614257812 36.902984619141,71.351364135742 36.889720916748,71.344520568848 36.878917694092,71.330642700195 36.863201141357,71.319488525391 36.854846954346,71.305679321289 36.851322174072,71.285758972168 36.850807189942,71.253540039063 36.854606628418,71.247787475586 36.852821350098,71.242897033691 36.847885131836,71.242645263672 36.838844299316,71.249412536621 36.828449249268,71.261825561524 36.819633483887,71.263679504395 36.814254760742,71.257957458496 36.802688598633,71.249977111817 36.796363830566,71.233215332031 36.789009094238,71.222351074219 36.785427093506,71.218818664551 36.77991104126,71.219718933105 36.770435333252,71.238204956055 36.758903503418,71.251998901367 36.752750396729,71.25804901123 36.74560546875,71.266670227051 36.742485046387,71.271949768067 36.737644195557,71.271484375 36.732460021973,71.265098571777 36.732200622559,71.257530212402 36.734645843506,71.252395629883 36.732387542725,71.25284576416 36.728996276855,71.257873535156 36.724418640137,71.256271362305 36.720592498779,71.250549316406 36.718845367432,71.235939025879 36.720634460449,71.230857849121 36.719085693359,71.229804992676 36.715347290039,71.233818054199 36.703407287598,71.231826782227 36.694248199463,71.226829528809 36.68677520752,71.226654052734 36.68106842041,71.23112487793 36.672252655029,71.235977172852 36.668792724609,71.242622375488 36.659057617188,71.263290405273 36.645160675049,71.285789489746 36.622016906738,71.294960021973 36.614582061768,71.318328857422 36.603073120117,71.345649719238 36.586452484131,71.361404418945 36.582630157471,71.369689941406 36.576610565186,71.372688293457 36.572875976563,71.379257202148 36.567924499512,71.386962890625 36.564640045166,71.400909423828 36.561626434326,71.411491394043 36.557174682617,71.411033630371 36.55290222168,71.408042907715 36.551830291748,71.395584106445 36.554534912109,71.373947143555 36.554740905762,71.364364624023 36.552261352539,71.33878326416 36.540874481201,71.318428039551 36.534461975098,71.301895141602 36.523551940918,71.287742614746 36.521125793457,71.281829833984 36.517208099365,71.279960632324 36.507617950439,71.275947570801 36.499774932861,71.268157958984 36.494251251221,71.259765625 36.483253479004,71.246864318848 36.47709274292,71.241592407227 36.476539611817,71.231857299805 36.478649139404,71.2216796875 36.484298706055,71.202224731445 36.480026245117,71.193450927734 36.481369018555,71.188102722168 36.484413146973,71.186332702637 36.488296508789,71.181686401367 36.491958618164))
Ik wil 1 centrpoint latitide en longitude krijgen
als ik deze functie wil gebruiken bijv:
ST_GEOMFROMTEXT('POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1))');
Dan is het een null.
Wat is hier verkeerd aan?
Hoe kan ik
Er zijn nog geen reacties op dit bericht.