How to randomly generate random coordinates in an irregular shape surrounded by longitude and latitude coordinates?

for example,
how to generate random longitude and latitude points within a shape surrounded by irregular latitudes and longitudes?
obtain the longitude and latitude list of the administrative region of a city through Amap api
this list indicates that the area of the city is an irregular shape
how to generate random coordinate points in this area?
ask for ideas
example:

const lnglat = "118.157144,24.553129;118.156304,24.553130;118.155265,24.553492;118.154711,24.553893;118.154468,24.554292;118.154589,24.554733;118.155022,24.555131;118.155663,24.555249;118.159413,24.555364;118.159889,24.555123;118.160054,24.554682;118.159976,24.554163;118.158460,24.553806;118.157741,24.553447;118.157144,24.553129|118.189718,24.448028;118.189773,24.448503;118.190170,24.449205;118.190675,24.449956;118.191391,24.450536;118.192184,24.450796;118.192859,24.450805;118.193428,24.450603;118.193737,24.450198;118.193843,24.449556;118.193610,24.449007;118.192223,24.447627;118.191756,24.447334;118.191090,24.447182;118.190353,24.447218;118.189864,24.447522;118.189718,24.448028|118.414092,24.551675;118.412619,24.551718;118.412390,24.551876;118.412075,24.551905;118.411489,24.551762;118.410603,24.551276;118.409716,24.550346;118.409273,24.550187;118.408901,24.550246;118.408729,24.550132;118.408558,24.549817;118.408458,24.549373;118.408472,24.549030;118.408515,24.548758;118.408529,24.548529;118.408200,24.548358;118.408014,24.548072;118.407885,24.547686;118.407900,24.547285;118.407871,24.546956;118.407556,24.546627;118.407185,24.546698;118.406970,24.546870;118.406655,24.546827;118.406312,24.546684;118.406155,24.546498;118.406040,24.546140;118.405883,24.545912;118.405583,24.545726;118.405111,24.545811;118.403795,24.546355;118.403251,24.546827;118.403194,24.547199;118.403466,24.547499;118.404224,24.547714;118.404410,24.548014;118.404753,24.548472;118.405211,24.548629;118.405955,24.548672;118.406784,24.549188;118.407299,24.549688;118.407256,24.550518;118.406970,24.551147;118.406999,24.551863;118.407357,24.552249;118.408100,24.552463;118.408744,24.552649;118.408987,24.552964;118.409273,24.553793;118.409902,24.554137;118.410231,24.554151;118.411218,24.553679;118.412333,24.553407;118.412976,24.552977;118.413462,24.552834;118.414177,24.552877;118.414649,24.552619;118.414778,24.552376;118.414764,24.552047;118.414563,24.551718;118.414092,24.551675|118.390952,24.559322;118.391936,24.558786;118.392518,24.558161;118.393435,24.557960;118.393949,24.558072;118.394172,24.558855;118.394754,24.559570;118.395648,24.559705;118.397973,24.559416;118.398376,24.558857;118.398510,24.558388;118.398510,24.557560;118.398331,24.557158;118.397593,24.556689;118.396542,24.556800;118.396207,24.556666;118.395737,24.555972;118.395514,24.554989;118.394888,24.554430;118.393882,24.554161;118.392786,24.554160;118.391824,24.553847;118.390460,24.553600;118.390013,24.553555;118.389073,24.553174;118.388201,24.552816;118.387262,24.552882;118.386837,24.553284;118.386032,24.553261;118.385428,24.552903;118.383705,24.551605;118.382475,24.551291;118.381066,24.551491;118.379320,24.552026;118.378224,24.552471;118.377240,24.553566;118.376748,24.554325;118.376860,24.555107;118.378940,24.556272;118.380439,24.556855;118.381245,24.557236;118.382073,24.558220;118.382811,24.559338;118.384109,24.559942;118.385384,24.560056;118.388738,24.559857;118.390952,24.559322|118.072102,24.448597;118.073177,24.447902;118.074958,24.446874;118.076452,24.445044;118.077781,24.442759;118.078033,24.441525;118.077909,24.441214;118.077814,24.439968;118.077613,24.438725;118.077411,24.438037;118.077109,24.437550;118.076201,24.436844;118.075394,24.436406;118.071915,24.435537;118.071342,24.435178;118.070291,24.435292;118.069543,24.435408;118.067936,24.435911;118.066363,24.436553;118.064181,24.436881;118.062520,24.437271;118.061373,24.437870;118.060660,24.438435;118.059791,24.439002;118.058304,24.440053;118.057156,24.441108;118.056635,24.442257;118.056348,24.444038;118.056522,24.445125;118.057661,24.447240;118.058826,24.449306;118.059461,24.450379;118.060400,24.452015;118.061035,24.452801;118.061835,24.453146;118.063599,24.453125;118.064860,24.453585;118.066390,24.453770;118.067268,24.453634;118.067998,24.452926;118.069049,24.451417;118.070405,24.450391;118.071413,24.449043;118.072102,24.448597|118.099319,24.426778;118.097039,24.427554;118.090087,24.430762;118.088931,24.431295;118.084347,24.435659;118.083133,24.437730;118.081424,24.440644;118.080812,24.441688;118.080285,24.442740;118.079405,24.444495;118.078520,24.446262;118.077578,24.447154;118.074358,24.450210;118.072773,24.451753;118.071960,24.452543;118.071717,24.452780;118.070336,24.455197;118.069693,24.458255;118.069223,24.461291;118.068902,24.463364;118.068789,24.465547;118.069016,24.467728;118.070059,24.468879;118.071093,24.471408;118.071540,24.472471;118.072162,24.473951;118.072353,24.474396;118.073509,24.481634;118.074036,24.485729;118.074252,24.487411;118.075634,24.494314;118.075709,24.494687;118.076619,24.497462;118.077533,24.500247;118.082477,24.513922;118.085431,24.522086;118.085983,24.525458;118.088789,24.531917;118.089058,24.532537;118.089871,24.534149;118.091526,24.537427;118.093529,24.540687;118.096462,24.544320;118.100287,24.548087;118.104349,24.550661;118.105414,24.551327;118.106609,24.552074;118.107350,24.552607;118.109089,24.553857;118.111704,24.555283;118.122779,24.557366;118.130857,24.559395;118.135331,24.561310;118.138149,24.561801;118.140956,24.561532;118.142533,24.561609;118.145106,24.560553;118.148146,24.557620;118.151298,24.553286;118.153160,24.549538;118.155611,24.547778;118.158529,24.547190;118.162270,24.547183;118.170210,24.545881;118.176911,24.543056;118.179840,24.541822;118.191684,24.536829;118.198689,24.530498;118.201608,24.525579;118.203244,24.518088;118.204456,24.504797;118.204646,24.502755;118.206161,24.493041;118.206345,24.490314;118.207159,24.487270;118.206810,24.481514;118.204285,24.476372;118.198888,24.468269;118.196336,24.466000;118.193405,24.463395;118.185962,24.458331;118.183157,24.455288;118.173823,24.447698;118.172353,24.446653;118.165293,24.441630;118.156538,24.434393;118.153385,24.430888;118.150354,24.426330;118.143225,24.420840;118.135017,24.419740;118.134587,24.419683;118.126752,24.420158;118.120072,24.421225;118.117173,24.421688;118.106193,24.424435;118.099319,24.426778|118.051969,24.442973;118.051312,24.437616;118.050503,24.431011;118.049693,24.423991;118.049067,24.418897;118.049015,24.418307;118.037026,24.419979;118.027619,24.419407;118.018432,24.418846;117.998464,24.411603;117.996086,24.419736;117.993594,24.428254;117.988338,24.433043;117.983564,24.435196;117.963577,24.444219;117.954741,24.448214;117.955193,24.450135;117.955564,24.456910;117.955734,24.461123;117.955632,24.462505;117.954797,24.462956;117.954996,24.463541;117.955896,24.465629;117.958410,24.465026;117.958617,24.465867;117.959003,24.466780;117.958968,24.466966;117.959050,24.467191;117.959242,24.467258;117.959547,24.467666;117.960285,24.470005;117.956285,24.471365;117.957080,24.473280;117.957153,24.473458;117.957572,24.473424;117.958234,24.473313;117.958946,24.473078;117.959147,24.473459;117.959292,24.473494;117.959397,24.473752;117.959152,24.473966;117.959236,24.474092;117.959239,24.474424;117.959961,24.474380;117.959969,24.474683;117.959578,24.474727;117.959013,24.475061;117.959825,24.476373;117.959078,24.476791;117.959209,24.477051;117.959150,24.477243;117.959508,24.477430;117.960048,24.476901;117.960307,24.476823;117.960362,24.476868;117.960444,24.476796;117.960881,24.477126;117.960834,24.477211;117.960927,24.477212;117.960944,24.477290;117.961157,24.477088;117.961398,24.477189;117.961271,24.477550;117.961354,24.477595;117.961242,24.477995;117.961700,24.479090;117.961708,24.480077;117.961903,24.480621;117.961850,24.480858;117.961927,24.481447;117.961803,24.482061;117.961876,24.482140;117.961852,24.482231;117.962404,24.482625;117.962425,24.482759;117.962676,24.482933;117.962758,24.483128;117.962802,24.483373;117.962625,24.483990;117.962715,24.484214;117.962678,24.484588;117.962843,24.484764;117.962894,24.486489;117.963459,24.487147;117.965511,24.489459;117.965239,24.489767;117.964494,24.490049;117.964294,24.490378;117.964057,24.490565;117.963534,24.490599;117.963307,24.490740;117.963178,24.491670;117.962514,24.492903;117.962795,24.494154;117.962703,24.494287;117.962142,24.494522;117.960967,24.495433;117.959738,24.497412;117.959811,24.498022;117.960787,24.499759;117.960711,24.499985;117.960301,24.500225;117.959843,24.500378;117.958745,24.500546;117.958451,24.500785;117.958258,24.500846;117.957479,24.500801;117.957042,24.500668;117.956349,24.500604;117.955972,24.501088;117.955076,24.501990;117.953840,24.503624;117.952470,24.503947;117.951803,24.504014;117.951572,24.504188;117.951383,24.504659;117.950999,24.504843;117.950579,24.504853;117.949829,24.504488;117.949543,24.504458;117.949306,24.504625;117.949081,24.505034;117.949042,24.505588;117.949303,24.506144;117.949244,24.506461;117.949003,24.506993;117.948766,24.507275;117.948523,24.507414;117.948367,24.507920;117.948535,24.509138;117.948907,24.510650;117.948682,24.510985;117.948365,24.511145;117.947568,24.511143;117.945766,24.511379;117.944684,24.511884;117.942960,24.511694;117.940969,24.512012;117.939799,24.512442;117.938531,24.512689;117.938066,24.514185;117.938155,24.514576;117.938440,24.515018;117.937705,24.514955;117.937228,24.515337;117.936377,24.516286;117.936011,24.516537;117.936049,24.516898;117.936201,24.517293;117.936848,24.518484;117.936867,24.518796;117.937132,24.519568;117.937139,24.521729;117.937018,24.521990;117.936535,24.522053;117.936250,24.522485;117.935791,24.522584;117.935584,24.522849;117.935544,24.523063;117.935368,24.522999;117.935152,24.523227;117.935211,24.523302;117.934703,24.523572;117.934489,24.523603;117.934507,24.523876;117.934233,24.523921;117.934139,24.524004;117.934109,24.524175;117.933673,24.524479;117.933601,24.524622;117.933987,24.524754;117.934231,24.525167;117.934527,24.525120;117.934790,24.525186;117.935051,24.525545;117.934882,24.525439;117.934394,24.525398;117.934027,24.525481;117.933898,24.525535;117.933753,24.525791;117.933303,24.526079;117.933134,24.526162;117.932815,24.526109;117.932406,24.526521;117.932202,24.526571;117.932004,24.526971;117.932111,24.527189;117.932154,24.527692;117.932063,24.527808;117.931817,24.527855;117.932117,24.528408;117.932137,24.528573;117.931392,24.528826;117.931071,24.529086;117.931281,24.529344;117.931111,24.529492;117.931184,24.529603;117.931074,24.529721;117.931211,24.529762;117.931029,24.529960;117.931097,24.530085;117.930879,24.530274;117.930620,24.530269;117.930471,24.530541;117.930188,24.530355;117.930082,24.530188;117.930066,24.529808;117.930185,24.529419;117.929816,24.529742;117.929873,24.529901;117.929776,24.530151;117.929643,24.530081;117.929470,24.530100;117.929455,24.530387;117.929194,24.530516;117.929183,24.530833;117.928197,24.530187;117.928041,24.530016;117.927908,24.530047;117.927575,24.530616;117.927500,24.530695;117.927303,24.530678;117.926707,24.531382;117.926348,24.531106;117.926202,24.531245;117.926076,24.531159;117.925502,24.531301;117.925478,24.531096;117.925008,24.531296;117.924828,24.531229;117.924615,24.531527;117.924432,24.531453;117.924051,24.531997;117.924016,24.532180;117.923636,24.532555;117.922491,24.532404;117.921033,24.532509;117.920723,24.532381;117.920828,24.531775;117.920313,24.531777;117.920300,24.531922;117.920224,24.531946;117.920063,24.531864;117.919009,24.532012;117.918709,24.531968;117.918338,24.531800;117.917944,24.531832;117.917481,24.531707;117.917356,24.532195;117.917256,24.532156;117.917191,24.532632;117.916939,24.532569;117.916776,24.532920;117.916492,24.532874;117.916425,24.533160;117.916429,24.533770;117.916265,24.534068;117.916817,24.534341;117.916768,24.534488;117.916580,24.535142;117.916272,24.535006;117.915465,24.534822;117.914212,24.534182;117.913632,24.534855;117.913427,24.534725;117.913096,24.535295;117.912775,24.535620;117.912541,24.535713;117.912313,24.536036;117.911448,24.536261;117.911608,24.537699;117.912340,24.537740;117.911937,24.539538;117.912044,24.539765;117.911808,24.540037;117.911911,24.541724;117.911970,24.542048;117.912097,24.542254;117.911038,24.542357;117.911009,24.542700;117.910938,24.542748;117.911035,24.542937;117.910805,24.543193;117.910448,24.543300;117.910376,24.543615;117.910201,24.543524;117.910196,24.543396;117.910086,24.543365;117.910066,24.543523;117.909938,24.543603;117.909909,24.543885;117.910035,24.544167;117.910024,24.544312;117.910300,24.544492;117.910714,24.544452;117.911292,24.544632;117.911427,24.544577;117.911924,24.544787;117.911766,24.545075;117.911602,24.544993;117.911556,24.545150;117.911498,24.545207;117.911371,24.545145;117.911328,24.545283;117.911446,24.545387;117.911368,24.545670;117.911519,24.545710;117.911485,24.545928;117.911237,24.545866;117.911200,24.546366;117.911310,24.546394;117.911285,24.546565;117.911476,24.546627;117.911475,24.546929;117.911442,24.547055;117.911241,24.547040;117.911040,24.547644;117.911291,24.547729;117.911111,24.548357;117.911170,24.548595;117.910951,24.548751;117.910943,24.548934;117.910718,24.549281;117.910277,24.549481;117.910136,24.549394;117.909850,24.550025;117.909856,24.550183;117.910113,24.550264;117.910516,24.549787;117.910777,24.549777;117.910806,24.550542;117.910945,24.550609;117.910950,24.550697;117.910889,24.550700;117.911009,24.551068;117.910914,24.551139;117.909873,24.551361;117.909876,24.551429;117.909753,24.551481;117.909836,24.551603;117.909722,24.551619;117.909682,24.551793;117.909405,24.551932;117.909231,24.551904;117.909220,24.551994;117.908966,24.551994;117.908822,24.551846;117.908705,24.552292;117.908836,24.552415;117.908691,24.552559;117.908604,24.552853;117.908630,24.553028;117.908167,24.552912;117.908060,24.552803;117.907627,24.552631;117.907477,24.552923;117.907561,24.553404;117.907424,24.553783;117.907404,24.554132;117.908223,24.554025;117.908455,24.554912;117.908375,24.554920;117.908344,24.554811;117.908089,24.554822;117.908173,24.555174;117.907802,24.555160;117.907383,24.555009;117.907363,24.555339;117.907185,24.555293;117.907183,24.555383;117.906821,24.555418;117.906699,24.555518;117.906329,24.555237;117.906338,24.555377;117.906825,24.555662;117.907179,24.555990;117.907502,24.556192;117.907687,24.556203;117.907829,24.556336;117.907820,24.556451;117.907990,24.556684;117.907984,24.556941;117.908098,24.557243;117.908188,24.557424;117.908397,24.557568;117.908433,24.557842;117.908834,24.557996;117.909470,24.558693;117.909503,24.558851;117.909288,24.558824;117.909306,24.559248;117.909088,24.559332;117.909180,24.559403;117.909523,24.559351;117.909535,24.559582;117.909698,24.559846;117.909632,24.560132;117.909651,24.560710;117.909854,24.561342;117.910269,24.562126;117.910380,24.562513;117.910404,24.563058;117.909932,24.563328;117.909725,24.563736;117.909734,24.564007;117.911405,24.565691;117.912871,24.566064;117.913231,24.566453;117.913436,24.566948;117.913434,24.567498;117.913287,24.568005;117.913251,24.568554;117.912813,24.569548;117.912272,24.571638;117.912034,24.572130;117.911272,24.573065;117.910605,24.573833;117.910677,24.574671;117.910410,24.575454;117.910022,24.575259;117.908915,24.575154;117.907872,24.575466;117.906233,24.575785;117.905362,24.575568;117.904995,24.575552;117.903634,24.576315;117.903282,24.576742;117.903232,24.577182;117.902279,24.577883;117.901593,24.578874;117.900706,24.579749;117.900193,24.580071;117.899731,24.580172;117.899363,24.580493;117.898800,24.580758;117.898107,24.581893;117.897825,24.582777;117.897450,24.582909;117.896396,24.583487;117.895868,24.584083;117.895333,24.584913;117.894653,24.585450;117.893322,24.586695;117.892462,24.587201;117.892307,24.587523;117.892120,24.587562;117.891422,24.587466;117.890910,24.587626;117.890685,24.587626;117.889960,24.588258;117.889232,24.588747;117.889098,24.588743;117.888780,24.588485;117.888505,24.588456;117.888310,24.588520;117.887654,24.589028;117.887323,24.590122;117.886918,24.590562;117.886912,24.591083;117.886981,24.591190;117.887536,24.591414;117.888337,24.591399;117.889544,24.592029;117.889588,24.592155;117.889444,24.592499;117.889602,24.592688;117.890192,24.592554;117.890325,24.592583;117.890364,24.592678;117.890259,24.593350;117.890540,24.593873;117.890697,24.595278;117.890852,24.595827;117.891059,24.596077;117.892751,24.597036;117.893430,24.597703;117.893408,24.597860;117.893611,24.598572;117.893526,24.598863;117.893541,24.599998;117.893393,24.600310;117.892973,24.600553;117.892954,24.601076;117.892621,24.601872;117.892529,24.603952;117.892665,24.604535;117.892651,24.604821;117.893559,24.605298;117.893748,24.606005;117.893264,24.607097;117.892083,24.608223;117.891865,24.608674;117.892179,24.609307;117.892056,24.609856;117.892080,24.610545;117.892389,24.610986;117.892292,24.611584;117.892550,24.612033;117.892523,24.612163;117.892317,24.612378;117.892293,24.612601;117.892432,24.612896;117.892751,24.613114;117.892837,24.613311;117.892753,24.613615;117.892786,24.614167;117.892686,24.614706;117.892747,24.614892;117.893306,24.614933;117.893688,24.614683;117.894089,24.614741;117.894770,24.614345;117.895033,24.614281;117.895387,24.614371;117.895762,24.614628;117.897222,24.614603;117.897857,24.614514;117.898309,24.614548;117.898894,24.614131;117.898937,24.613532;117.899187,24.613272;117.899337,24.613219;117.899886,24.613228;117.900755,24.613509;117.901397,24.613346;117.902037,24.613446;117.903105,24.613475;117.903357,24.613333;117.903604,24.613561;117.903830,24.613654;117.904405,24.613693;117.904939,24.613567;117.905490,24.613919;117.906582,24.614155;117.907424,24.614201;117.907659,24.614138;117.908531,24.613222;117.908942,24.613120;117.909275,24.613202;117.909441,24.613295;117.909639,24.613574;117.909748,24.613600;117.911116,24.613319;117.911565,24.613037;117.911896,24.613043;117.912582,24.613363;117.913046,24.613830;117.913780,24.613680;117.914180,24.613517;117.914452,24.613551;117.914790,24.613474;117.915036,24.613560;117.915488,24.614093;117.915985,24.614150;117.916498,24.614065;117.916933,24.613853;117.917960,24.613774;117.918397,24.613372;117.919208,24.613492;117.920127,24.613449;117.920581,24.613591;117.920867,24.613927;117.921412,24.614844;117.921129,24.615159;117.920980,24.615662;117.921332,24.616395;117.922082,24.616719;117.922212,24.617194;117.922684,24.617612;117.922814,24.618007;117.923348,24.618357;117.924466,24.619370;117.924817,24.619864;117.925121,24.620516;117.925203,24.621137;117.925555,24.622215;117.925698,24.623464;117.926230,24.624828;117.926698,24.626572;117.927524,24.627931;117.927539,24.628649;117.927648,24.628944;117.927785,24.629169;117.928427,24.629712;117.928654,24.630084;117.929005,24.630412;117.929168,24.630781;117.929578,24.631238;117.929705,24.632002;117.930240,24.632495;117.930713,24.633639;117.931569,24.634195;117.932241,24.635000;117.932716,24.635386;117.933535,24.635625;117.934068,24.636117;117.934691,24.636560;117.935813,24.636903;117.936370,24.637273;117.937417,24.637622;117.938317,24.637598;117.939671,24.637771;117.940195,24.637986;117.940447,24.638211;117.940796,24.638382;117.941351,24.639018;117.941526,24.639577;117.941528,24.640071;117.941781,24.640595;117.942379,24.641300;117.942672,24.641459;117.942967,24.642646;117.943482,24.643366;117.943333,24.643378;117.943457,24.643437;117.945542,24.644567;117.946128,24.644981;117.946675,24.645502;117.946863,24.645917;117.947331,24.646159;117.947748,24.646544;117.948104,24.646621;117.949141,24.646657;117.950235,24.646882;117.950738,24.646692;117.951304,24.646739;117.952183,24.647068;117.952960,24.647931;117.953778,24.648299;117.954397,24.649305;117.954724,24.650253;117.954734,24.652752;117.954368,24.653298;117.954537,24.653976;117.954837,24.654414;117.956190,24.655490;117.956576,24.655870;117.956906,24.656327;117.957283,24.656443;117.957864,24.656359;117.958588,24.656450;117.959238,24.656884;117.959850,24.657103;117.960626,24.657547;117.960965,24.657859;117.961262,24.658401;117.961491,24.658639;117.962229,24.659072;117.962908,24.659299;117.963227,24.659532;117.963537,24.660067;117.963855,24.660438;117.964401,24.660907;117.964998,24.661164;117.965738,24.661621;117.965592,24.662257;117.965436,24.662542;117.965104,24.662907;117.965003,24.663392;117.964403,24.664491;117.963594,24.665202;117.963221,24.665428;117.963133,24.665723;117.962787,24.666101;117.962699,24.666431;117.962740,24.666703;117.962651,24.666951;117.961892,24.667484;117.961803,24.667603;117.961729,24.668145;117.961756,24.668339;117.962228,24.668810;117.962316,24.669105;117.962948,24.670240;117.963389,24.670484;117.963845,24.670895;117.964208,24.671708;117.964461,24.671966;117.964713,24.672408;117.965425,24.672919;117.965557,24.673177;117.965350,24.673503;117.965245,24.673971;117.964708,24.675443;117.964702,24.676280;117.964264,24.676724;117.964122,24.677248;117.964469,24.678662;117.964529,24.679801;117.964491,24.680856;117.964301,24.681411;117.963596,24.682086;117.963422,24.683089;117.962836,24.683745;117.962763,24.684233;117.962442,24.684711;117.962012,24.685108;117.961579,24.685805;117.961666,24.686251;117.961636,24.686459;117.960813,24.687330;117.960879,24.687763;117.960791,24.688103;117.960849,24.688368;117.960760,24.688754;117.960684,24.688928;117.960375,24.689207;117.960008,24.690051;117.959737,24.690457;117.959515,24.691095;117.958953,24.692125;117.958720,24.693132;117.958688,24.693621;117.958452,24.694099;117.958013,24.694631;117.957973,24.695181;117.957516,24.695441;117.957146,24.695918;117.956533,24.696089;117.956155,24.696348;117.955924,24.696987;117.955433,24.697550;117.955376,24.697940;117.954804,24.698289;117.954762,24.698811;117.954540,24.699315;117.954309,24.699586;117.954309,24.699761;117.954664,24.699925;117.954877,24.700117;117.954924,24.700356;117.954840,24.700703;117.954345,24.701510;117.954320,24.701644;117.954535,24.702454;117.954364,24.703073;117.955053,24.703662;117.955136,24.704286;117.954921,24.704917;117.954951,24.705020;117.955602,24.705368;117.955853,24.705849;117.955588,24.706470;117.955544,24.706923;117.955074,24.707357;117.954839,24.707936;117.954283,24.708253;117.953572,24.708405;117.953073,24.708651;117.952657,24.708627;117.952232,24.708443;117.951992,24.708514;117.951463,24.708491;117.950956,24.708693;117.950846,24.708995;117.950576,24.709292;117.950443,24.709837;117.950269,24.710156;117.949858,24.710480;117.949307,24.710714;117.949022,24.710983;117.948611,24.711136;117.948289,24.711677;117.947657,24.711912;117.947288,24.712201;117.947241,24.712846;117.946801,24.713840;117.947178,24.714549;117.947204,24.714730;117.946817,24.715909;117.947033,24.716366;117.947071,24.717026;117.946725,24.717873;117.946333,24.718210;117.946319,24.719099;117.946235,24.719294;117.945471,24.719754;117.945292,24.719930;117.945197,24.720154;117.945347,24.720538;117.945264,24.721300;117.944635,24.722144;117.944654,24.722255;117.944960,24.722517;117.945253,24.722985;117.945158,24.723429;117.944756,24.723820;117.944962,24.724140;117.944797,24.724849;117.944142,24.725447;117.944027,24.725642;117.943881,24.726331;117.943746,24.726608;117.942955,24.727890;117.942731,24.728938;117.941851,24.730393;117.941700,24.730996;117.941648,24.731742;117.941547,24.731871;117.941032,24.732026;117.940894,24.732351;117.940771,24.733138;117.941015,24.733884;117.941420,24.734175;117.941470,24.734350;117.941295,24.734660;117.941271,24.734847;117.940879,24.735091;117.940648,24.735343;117.940474,24.736386;117.939940,24.737652;117.939952,24.737904;117.940315,24.738383;117.940484,24.738741;117.940476,24.739421;117.940745,24.739941;117.940607,24.740278;117.940655,24.740653;117.941030,24.741660;117.941058,24.741873;117.940788,24.742808;117.940801,24.743051;117.940904,24.743335;117.941010,24.743421;117.941463,24.743395;117.941657,24.743450;117.941835,24.744075;117.942069,24.744537;117.942816,24.744674;117.942914,24.744772;117.943025,24.745538;117.942926,24.745907;117.943480,24.746498;117.943686,24.746973;117.943853,24.747837;117.943771,24.748353;117.942915,24.749270;117.942807,24.749486;117.943162,24.749943;117.944205,24.750822;117.945329,24.751453;117.945029,24.751929;117.944746,24.752842;117.944888,24.753113;117.945637,24.753733;117.945415,24.755356;117.945739,24.755694;117.945859,24.756002;117.946102,24.756344;117.946106,24.757086;117.946360,24.757818;117.946388,24.758351;117.946527,24.758673;117.946290,24.759375;117.946628,24.760000;117.946512,24.760297;117.946184,24.760533;117.945142,24.761625;117.944260,24.762001;117.944122,24.762214;117.944122,24.762395;117.944441,24.762766;117.944914,24.762948;117.945701,24.763464;117.946662,24.763478;117.947484,24.763304;117.947822,24.763499;117.948406,24.763566;117.949098,24.763897;117.949565,24.763907;117.949917,24.764083;117.951027,24.764353;117.951832,24.764357;117.952466,24.764861;117.953031,24.765412;117.953299,24.765776;117.953474,24.765818;117.954295,24.765653;117.954495,24.766024;117.954502,24.766360;117.954670,24.766701;117.954060,24.767026;117.953740,24.767624;117.953632,24.768432;117.954100,24.768911;117.954157,24.769067;117.954037,24.769552;117.953667,24.770063;117.953616,24.770338;117.953663,24.770598;117.953794,24.770789;117.954351,24.771270;117.954674,24.771708;117.954701,24.771852;117.954550,24.772306;117.954575,24.772437;117.954754,24.772507;117.955882,24.772557;117.956067,24.772922;117.956731,24.773752;117.957008,24.774478;117.957140,24.775098;117.957057,24.776031;117.957154,24.776201;117.957850,24.776751;117.958106,24.777063;117.958342,24.777501;117.958584,24.778121;117.958631,24.778443;117.958707,24.778498;117.959538,24.778474;117.959615,24.778552;117.959612,24.779582;117.959957,24.780246;117.959909,24.780711;117.960318,24.782351;117.959946,24.783714;117.960168,24.784679;117.960650,24.785036;117.960693,24.785176;117.960604,24.785541;117.960241,24.786046;117.960174,24.786312;117.960195,24.786900;117.959945,24.787359;117.960261,24.788327;117.960044,24.788873;117.960312,24.789141;117.960374,24.789330;117.960745,24.789568;117.961078,24.789655;117.961320,24.789942;117.961410,24.790197;117.961665,24.790464;117.961669,24.790681;117.961497,24.791015;117.961466,24.791566;117.961039,24.791941;117.960929,24.792492;117.961272,24.792928;117.961123,24.793328;117.961209,24.793637;117.962209,24.793552;117.962330,24.794446;117.962607,24.795582;117.962232,24.795800;117.962079,24.795988;117.961479,24.797234;117.960894,24.797673;117.960633,24.797983;117.960234,24.798032;117.959978,24.798510;117.960025,24.799065;117.959906,24.799575;117.959920,24.799882;117.959711,24.800734;117.959678,24.801175;117.959563,24.801415;117.959737,24.802068;117.959665,24.802244;117.959165,24.802780;117.959075,24.803373;117.959351,24.803774;117.959441,24.804209;117.959220,24.805195;117.958824,24.806157;117.958995,24.806933;117.958904,24.807747;117.959064,24.809108;117.958901,24.810072;117.958696,24.810891;117.958025,24.811455;117.957881,24.811823;117.957044,24.813267;117.957609,24.813523;117.958644,24.813537;117.958860,24.813628;117.959273,24.814031;117.959942,24.814064;117.960177,24.814179;117.960345,24.815216;117.960741,24.816547;117.960522,24.817162;117.960639,24.817720;117.961003,24.818878;117.961673,24.819771;117.961613,24.820225;117.961320,24.820839;117.960397,24.821723;117.959335,24.823392;117.958907,24.824402;117.959002,24.824897;117.959635,24.826469;117.959769,24.826701;117.960054,24.826970;117.960264,24.827446;117.960214,24.828640;117.959602,24.830166;117.959550,24.830463;117.959626,24.830685;117.960225,24.831398;117.960754,24.832364;117.960673,24.832888;117.960767,24.834079;117.960810,24.834268;117.961001,24.834537;117.960851,24.836224;117.961036,24.838092;117.961131,24.838364;117.961414,24.838697;117.962095,24.840009;117.962593,24.840168;117.962769,24.840320;117.963040,24.841218;117.962989,24.841927;117.962884,24.842591;117.962665,24.842890;117.962234,24.843870;117.962023,24.844199;117.961841,24.844339;117.960921,24.844539;117.960449,24.844409;117.960296,24.844430;117.959973,24.844762;117.959584,24.845014;117.959395,24.845299;117.959110,24.845221;117.958764,24.845261;117.957746,24.845912;117.957033,24.845853;117.956348,24.846137;117.955032,24.846113;117.954888,24.846171;117.954354,24.846769;117.954108,24.846864;117.954056,24.846621;117.954308,24.846104;117.954344,24.845738;117.954282,24.845432;117.954017,24.845183;117.952836,24.845131;117.951507,24.845535;117.951118,24.845391;117.951177,24.844818;117.950948,24.844695;117.950404,24.844667;117.950347,24.844345;117.949768,24.844490;117.949548,24.844420;117.949012,24.844475;117.948324,24.844426;117.947921,24.844245;117.947287,24.844473;117.946757,24.843705;117.945939,24.842786;117.945249,24.842430;117.945035,24.842247;117.944462,24.840996;117.943802,24.842034;117.943036,24.842477;117.940388,24.843116;117.940158,24.843040;117.939786,24.843119;117.939964,24.843220;..."

too many coordinates. I omitted some

Lbs
Mar.11,2021

  1. Select the minimum longitude and latitude and the maximum longitude and latitude to get a surrounding rectangle
  2. randomly generate a point within the surrounding rectangle to determine whether the point is within a polygon, or pass it, otherwise continue production
  3. there is a relatively simple algorithm for determining whether the point is in the polygon. Borrow flowers to offer Buddha:
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy)
{
  int i, j, c = 0;
  for (i = 0, j = nvert-1; i < nvert; j = iPP) {
    if ( ((verty[i]>testy) != (verty[j]>testy)) &&
     (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) )
       c = !c;
  }
  return c;
}

Menu