Check if geographical polygon is valid - python

I have a df that look like this
coordinates={"type":"zone","bound":"POLYGON ((11.31767 43.32289, 11.32205 43.32467, 11.3235 43.32458, 11.32395 43.32474, 11.32411 43.32522, 11.32623 43.32516, 11.32647 43.32459, 11.32576 43.32435, 11.32581 43.32384, 11.32438 43.32332, 11.32803 43.32171, 11.32573 43.32016, 11.32571 43.31896, 11.32588 43.31844, 11.32319 43.31699, 11.32058 43.31589, 11.31782 43.31419, 11.3171 43.31093, 11.3166 43.31046, 11.31569 43.31045, 11.31344 43.31128, 11.31158 43.31121, 11.3097 43.31289, 11.30727 43.31445, 11.30414 43.31606, 11.3027 43.31726, 11.30154 43.31853, 11.29848 43.32291, 11.29457 43.3281, 11.29194 43.3313, 11.29289 43.33069, 11.29388 43.33036, 11.29505 43.33021, 11.29745 43.33008, 11.30058 43.33046, 11.3029 43.33021, 11.30485 43.33054, 11.30569 43.33197, 11.30626 43.33223, 11.30809 43.3325, 11.30907 43.33198, 11.31024 43.33192, 11.312 43.33134, 11.31369 43.32529, 11.31767 43.32289))"}
df=pd.DataFrame([coordinates])
I would love to know if the column "bound" is a valid polygon and if it is not I want to fix it
I tries .is_valid but it doesn't look working

for that you can use geopandas:
import geopandas as gpd
coordinates = {"type":"zone", "bound":"POLYGON ((11.31767 43.32289, 11.32205 43.32467, 11.3235 43.32458, 11.32395 43.32474, 11.32411 43.32522, 11.32623 43.32516, 11.32647 43.32459, 11.32576 43.32435, 11.32581 43.32384, 11.32438 43.32332, 11.32803 43.32171, 11.32573 43.32016, 11.32571 43.31896, 11.32588 43.31844, 11.32319 43.31699, 11.32058 43.31589, 11.31782 43.31419, 11.3171 43.31093, 11.3166 43.31046, 11.31569 43.31045, 11.31344 43.31128, 11.31158 43.31121, 11.3097 43.31289, 11.30727 43.31445, 11.30414 43.31606, 11.3027 43.31726, 11.30154 43.31853, 11.29848 43.32291, 11.29457 43.3281, 11.29194 43.3313, 11.29289 43.33069, 11.29388 43.33036, 11.29505 43.33021, 11.29745 43.33008, 11.30058 43.33046, 11.3029 43.33021, 11.30485 43.33054, 11.30569 43.33197, 11.30626 43.33223, 11.30809 43.3325, 11.30907 43.33198, 11.31024 43.33192, 11.312 43.33134, 11.31369 43.32529, 11.31767 43.32289))"}
foo = gpd.GeoDataFrame([coordinates])
foo['geometry'] = gpd.GeoSeries.from_wkt(foo['bound'])
foo.is_valid
0 True
dtype: bool

Related

show cluster of point with folium

I have a dataframe with a list of coordinates. I want to group on the map near points and show a dot on the map with the number of points on it like this. I'm using geopandas and folium. Following this example this is my code
from folium.plugins import MarkerCluster
import geopandas as gdp
from shapely.geometry import Point, LineString, Polygon, MultiPoint
building_list = [(-1,-1),(10.6,-1),(10.6,4.4),(-1,4.4)]
building = Polygon(building_list)
gdf_building = gpd.GeoDataFrame({'building':['Building'], 'geometry':[building]})
locations = df[['x', 'y']]
locationlist = locations.values.tolist()
print(locationlist)
map_building = gdf_building.explore(style_kwds={'color':'black','weight':3,'fillColor':'gray','fillOpacity':0.2})
marker_cluster = MarkerCluster().add_to(map_building)
#add a marker to the cluster, not the map
for location in locationlist:
marker = folium.Marker(
location=location,
)
marker_cluster.add_child(marker)
folium.LayerControl().add_to(map_building);
map_building
this is the result of the print of the location list, as you can see there are actual points.
[[-10.975653734125247, 14.223493380357969], [-3.0008170610241343, 4.952113879109663], [1.2889747510247407, 2.204612243849062], [1.8083739029012205, 1.7796964504195971], [3.420669729369738, 0.7404826646612623], [4.754666507090696, -0.5524039121778554], [5.53171781359429, 1.310518688820813], [4.318223656736064, -0.8753972819321212], [1.389494271129264, 16.407899298913147], [2.82329764017852, 0.9072912833977023], [-4.497070654458373, 11.375240775117195], [4.388070857027747, 2.026226808689793], [5.020759388491676, 2.756120554023195], [6.001047947560095, 3.640750189810609], [4.748181698919979, 0.6264535181440452], [2.6528944739060116, 3.4802260546999184], [0.6549886054089478, 2.3877498852531], [0.9196638849958464, 2.150417536934342], [5.108903278970173, 1.7149961891938221], [4.023317826279737, -0.7706685254504961], [0.903562864987411, 2.0796324380334292], [1.9513434378658632, 1.3693238231850704], [5.644520571004791, 0.9779979070472828], [4.885749810717222, 1.8987377699798547], [0.8962029416395766, 2.1062557612048933], [4.8, 3.1279064752127708], [-0.04508236022751255, 3.0568571249844774], [4.800000000000001, 1.9140378892025933], [-1.989743839191096, 3.371668995303246], [1.1656083298774806, 1.807252953229595], [1.8713291261582097, 1.143179456971009], [4.874256276815991, 1.442130685409675], [1.4180968883141027, 1.6105182232356952], [3.190937527417693, 0.7681078921163724], [0.6152561767926022, 2.4352310754461803], [4.943357091884491, 1.3116890391870286], [4.669880127812657, -0.9679152111322677], [3.614139957564433, 4.902972429576663], [5.669098065784623, 3.913649249046372], [3.813973864130181, -0.7323384613836201], [-0.5199470910058632, 4.940176537119433], [0.6045522916902855, 2.4454362761206676], [3.997321854441272, -0.40367758748908944], [-0.7749524129532896, 3.7357518435721646], [4.398949303156029, 1.5109906728678215], [0.3021200538833131, 2.729947426419629], [5.644520571004791, 1.1699695341101362], [0.3021200538833131, 2.729947426419629], [4.038514768738497, -0.2998527712422736], [5.463665551081531, 4.137680366555347], [0.8962029416395773, 2.157030296469887], [3.4127967638900434, -0.15739477788275646], [5.3627337631140914, 0.47173132205910173], [-17.039850506402114, 17.631059209559115], [4.693589821903688, 2.645652867319201], [1.652915853616594, 1.4812029360906247], [0.7676072335427175, 2.7523632254899515], [5.108903278970173, 1.6583572860511704], [0.4132781963362031, 2.904134388098682], [3.259934813790278, -0.18044453177741993], [0.8945938791669944, 2.1032269377270914], [2.57881016023833, 3.112861191160806], [3.592593833132784, 1.4836895239891579], [3.317682346796072, -0.406574363983617], [5.23674698889199, -0.4896527267915487], [1.652915853616594, 1.3490348417130233], [4.085742861634555, 0.6349594490258132], [4.0072168062713, -1.0764854252471776], [3.9664315265442545, -0.39306568870652514], [0.6031981581824843, 2.377481733947807], [3.6039665183706195, -0.2228663982705159], [1.8714318174071345, 1.1838500546775474], [1.8733352672556218, 1.1469557225661375], [6.102634326393458, 10.469900068262838], [5.520832421942425, 2.46410701016014], [1.1747275757821485, 1.930301474093356], [4.67585787292738, 0.636918779066237], [4.491096721029827, 1.397978478475737], [1.4568609922766316, 1.6834859483416318], [0.6098506962014651, 2.302784409097839], [4.324311646727075, 2.936569893754537], [0.9333579831295232, 2.088974913476743], [4.518788267677348, 0.020784625382443522], [0.47410395349115, 4.18998422562209], [1.1656853374503982, 1.7606554558367773], [1.837995743774393, 4.916814195653471], [4.388070857027747, 2.3671414910993596], [4.174911828673442, -0.6971612141229651], [0.6031981581824846, 2.357970915575524], [1.2974476846606793, 3.9025406503211726], [-0.03437847512519587, 2.924380280250848], [4.174911828673442, -0.6971612141229651], [1.4936152461189462, 7.123830497692014], [0.6152561767926021, 2.2589820889454635], [-11.279626246016324, 13.226577973666835], [1.82048818578873, 4.061094403724194], [4.581484036209459, 5.890145802013782], [4.265190300374529, 2.452440089435306], [3.8845082501175248, -0.7686579417306034], [0.9637552343186307, 2.2334130180125245], [4.25063438297424, -0.843761982823303], [0.98431156175139, 4.194028317706987], [1.1761611467009938, 1.827117079015031], [5.449834811820658, 0.5594950288780689], [1.6724495566887114, 4.605197843492187], [3.5384417352877477, 0.07911340357174579], [4.348620907925173, -0.9172910153848934], [1.2159563418949306, 4.6362987571816525], [1.1668919640810418, 1.4915162635203172], [2.249924886746646, 5.685012235183888], [4.067409175602521, -0.536439926621362], [2.5656813438853296, 2.7056802874632795], [2.1293914647589034, 4.642559399432756], [3.4127967638900434, -0.24461452723904076], [4.346665070906969, 7.334655181225893], [4.8, 2.0482018725377187], [1.123738605408948, 3.57856337675828], [4.228966634584813, -0.5954109912309717], [0.6031981581824846, 2.2362846421499483], [2.347165380094789, 2.914571054618481], [4.388070857027747, -0.4566421607253668], [2.1979928248704255, 1.0832058812097898], [1.69634605871611, 3.8274151057051444], [1.123738605408948, 3.57856337675828], [1.1747275757821485, 1.7776761397553662], [4.4693615246118945, -0.6333756573025302], [4.53293914647589, -0.9077879799922597], [1.0361298628314102, 4.036083757910509], [2.808234500789304, 0.3071881706888375], [-0.7191638996712912, 7.874957048525548], [2.8260583427385293, 7.660845787800426], [3.9912416391547496, 2.8264553465726032], [2.1123464147922975, 3.1439793965288794], [2.6731182859013067, 0.26597049531016737], [1.1673676524343146, 1.4924116768911837], [4.121463981513893, -0.5859228214803203], [1.4342741983539433, 1.6004923338374206], [4.608830245519423, 1.4005010543426653], [0.9162643526136969, 2.1035411206240853], [1.215956341894931, 4.30182011239446], [1.4872582434657393, 1.5371751490903258], [4.388070857027747, 2.4052170210761252], [0.6031981581824842, 2.4125336286506642], [2.898777190073906, 0.7105093578091037], [0.8945938791669943, 2.1382788324299487], [5.669098065784624, 3.8755737190696062], [6.070148762628594, 0.206906059620394], [1.4568609922766318, 1.4079768509137702], [5.531717813594291, 1.830541309334829], [-1.2471810710311697, 8.743462266446604], [0.6248686316291862, 2.4533251080797505], [3.6748906604483524, 3.124197444178624], [4.893093462225972, 0.4590567027245811], [1.1657585899617324, 1.9134186772549258], [-0.024766020288611745, 3.0296940622407025], [2.3563295257006565, 0.7846312919685801], [5.205353859395272, 0.42210603989954754], [3.8437689822722936, -0.7665448437321474], [3.6748906604483524, 3.1628631330266517], [2.727173091812678, 0.639131207705715], [1.788002622023866, 6.769502536197556], [-0.4057970441397616, 3.2929812953755766], [4.965546187085682, 1.9531004552217803], [-0.046436493735313444, 2.9484252862795244], [2.9371084106171184, 0.20309215819430038], [4.707852582126202, 2.17957929497331], [1.1778166085718507, 1.6671813846379329], [2.683868551208399, 0.5036394358913796], [4.8, 2.0482018725377187], [-2.145131239743776, 4.923667400169843], [4.5024200674231105, 2.3840119264621733], [1.9101959213696633, 1.1695980304271996], [-0.40643138475388163, 3.4467173934044606], [4.259451940886286, 1.0691802220180708], [1.167367652434315, 1.7378040719362537], [1.4872582434657393, 1.700227006989037], [1.6528426011052597, 1.2481771593670978], [4.800000000000001, 2.005728687048103], [-0.04508236022751255, 3.0568571249844774], [2.3439911949358385, 3.5683856892327976], [3.910730421098827, 4.135332344591893], [-0.04508236022751233, 2.9509742434706796], [2.950134753881053, -0.04379815575361201], [4.264382707965382, 0.09902519561511669], [3.106229402999044, 3.7294157226465066], [-0.0247660202886113, 2.989216765708611], [2.1123464147922975, 3.1385816622847216], [1.652915853616594, 1.3022923888888307], [4.259451940886286, 1.0000167752411318], [1.5290924648042203, 4.310240411834759], [2.9371084106171184, 0.20309215819430038], [-2.0852792308147365, 5.03633000521274], [0.2726285121062364, 5.866558412092897], [0.2900620352731951, 2.6721980849212557], [5.108903278970173, 1.6233053913483126], [-0.8239196028969407, 5.030419621266199], [1.8466237141828281, 5.932927653853168], [4.8, 9.658382640793699], [2.950134753881053, 0.22761233374994183], [0.6045522916902855, 2.238833599341103], [2.486105104523525, 7.000796957374647], [0.98431156175139, 4.168919529596836], [-0.8239196028969404, 5.026413025884784], [0.2990310210936111, 2.6018611324034016], [0.6803390498603128, 3.601707913302718], [1.2974476846606788, 3.8503187512101014], [0.8267571383654448, 5.853058068771931], [-0.04482743126273103, 2.87869356247465], [3.2764894324988463, 0.1688700457664547], [-3.767329514700993, 8.66269152688608], [3.222434626587475, -0.03359997239130541], [4.090573653616875, -0.707077359146127], [3.8849164987684937, -0.3938707427571062], [-0.5199470910058632, 5.609801167360874], [5.233045406042793, 1.6406297256739135], [1.5290924648042197, 4.299156029478217], [-0.024766020288611745, 3.0296940622407025], [4.325545325536228, 0.3438574274307671], [0.11249999999999938, 4.508574043613446], [5.15613137186623, -0.3461798183284306], [3.192037375398367, -0.3082514746327818], [0.6031981581824848, 2.469172531793316], [4.0682821864057095, 1.190912989505398], [1.0228149047709139, 5.191509904245847], [0.8267571383654444, 5.861370182915128], [-0.3692763432639352, 3.4022034406151067], [2.285674165981368, 0.40054508668958766], [2.9582532190128603, 2.1211932808694134], [-2.5837485905052917, 9.06294581359145], [-1.9853601848610753, 8.508068840069502], [1.8745211272980575, 1.30411808065442], [0.2862090792517309, 4.825957160184751], [3.0627533820148227, 0.592225673986793], [-0.046436493735313444, 3.103355437229105], [5.205353859395272, 0.7111054161797834], [7.244188130715516, 1.6376585614535513], [1.0228149047709136, 5.216618692355997], [4.074211060786516, 0.932690737783997], [0.4381746991919173, 6.21878271740584], [1.2159563418949306, 3.8495970971114977], [1.4151343263934582, 3.2980753742742706], [3.295606407946904, 0.3243530680371258], [6.0564497139770435, 0.4578939096082548], [-0.7634664185075604, 5.151411845004738], [2.6731182859013067, 0.6900063191517116], [0.34384052085180405, 3.92734467412126], [-0.7966228863999916, 3.730012258845936], [-1.343379060194661, 6.639339649156551], [2.655747377976134, 0.7579169337318432], [0.4741039534911502, 4.183751019358796], [0.8106024824996589, 3.8469096688591344], [4.251583853701234, -0.5122336159174341], [5.433641521339686, 1.2304496491736634], [0.6098506962014656, 2.4407786937191167], [2.958196315583629, 0.42169758533305535], [0.4741039534911502, 4.186979702946429], [3.139194465647819, 7.372362643090272], [6.070148762628594, 3.5839417724562916], [0.34384052085180405, 3.9447824700656744], [-0.024766020288611745, 3.0647459569435602], [0.98431156175139, 4.194028317706987], [3.205063718662302, 0.1665897376282075], [2.249924886746646, 5.685012235183888], [0.2862090792517309, 4.857299154558197], [0.894593879166995, 1.8996977832962885], [1.1883610918565954, 5.485872011543561], [3.956287021404356, 2.025822005622866], [0.020600968107850726, 6.546459784906801], [3.4988012781265745, 3.3537031044984764], [-0.044827431262731476, 2.9919314062894187], [2.4005561755536413, 4.351152383512192], [1.5888434056451888, 2.39808430763285], [3.724642241260815, 1.5993834520787418], [2.0763857262800003, 1.0305473880108813], [3.847522797914033, 1.4837311634639483], [1.8745211272980573, 1.224717120939789], [5.752477202085966, 2.161171990200467], [0.8945938791669943, 2.1382788324299487], [3.233184891894567, 0.19323849790749126], [1.6649738722267118, 1.4776151700223363], [4.677119443346781, 3.3876549706623997], [-0.395982428616346, 3.3114558657725937], [0.6630501671115239, 1.7966830293255285], [3.769512705456301, -0.4277218437869408], [1.4180968883141025, 1.7446822065708214], [4.345201751603508, 1.0003858818660745], [0.8962029416395768, 2.019036011848609], [6.7767023598214795, 2.767717033817918], [5.811238605408949, 10.971775430203346], [0.8945938791669944, 2.1032269377270914], [3.2362710203269964, 0.7662217764717181], [2.4400930748564438, 0.44511030500033666], [2.9431537290560565, 0.43585531382959397], [0.2900620352731951, 2.707249979624113], [4.692497346929079, 0.1733884621768529], [0.8988112239109582, 2.225618323427335], [3.997321854441272, -0.4340312777679376], [3.825695452069068, 2.5535046832593484], [-0.7966228863999916, 3.760365949124784], [3.657528247574082, -0.2364971741873707], [10.728301112968886, 8.129684856516427], [3.2764894324988463, 0.30103814014405605], [-0.2848242861634557, 2.5492067505157534], [3.4972488209905226, 0.0015738001887335429], [6.1942908897012146, 2.957238766835977], [4.499254404787959, 0.8703367099355468], [1.5413130493771106, 1.8775064211159793], [-0.3745113733554064, 3.4274011610281363], [3.1948017901428534, 0.4679448192780584], [4.010305839061002, -0.7770054557893282], [0.8962029416395773, 2.124411983277796], [4.499254404787959, 0.8703367099355468], [4.213823144644389, -0.9389793892200413], [6.898694746008462, 11.99606251173315], [2.333165047686302, 0.9445567230782452], [0.2916710977457775, 2.710278803101915], [-0.5199470910058637, 5.594291058917969], [-8.768059849208484, 13.375959505727446], [-2.2942634638312485, 7.933801838660646], [1.6545249160891764, 1.1890118072921148], [-4.551431127611951, 9.141286955528566], [5.633568473455744, -0.10132487706078885], [0.98431156175139, 4.194028317706987], [-0.7191638996712908, 7.827132937551404], [1.8379957437743928, 4.909616201353765], [10.59608346486909, 12.797203128699032], [0.8267571383654444, 5.861370182915128], [0.21177072258842733, 6.987152345891302], [3.6719651469590926, 9.249671380027745], [7.556358345958318, 7.050258822639192], [-1.450881713265581, 6.478776935187961], [2.9371084106171184, 0.3253638022534422], [2.950134753881053, 0.4292849375237151], [2.478857178818972, 0.8132979823825846], [-0.6936561702575947, 5.275621376822615], [-6.31581424528901, 12.58751873434882], [0.8267571383654444, 5.861370182915128], [3.2050637186623017, 0.07489893978269802], [0.8267571383654444, 5.861370182915128], [-0.12731794307864375, 10.43702448814638], [0.6031981581824843, 2.290261984591522], [1.1883610918565952, 5.528235044517281], [-2.8148523126150256, 10.46228804188221], [3.4127967638900434, -0.15739477788275646], [-0.10237335992179664, 5.223023803192105], [-1.214196617484058, 3.9467738427772825], [-0.10237335992179664, 5.216790596928811], [0.1292714202217442, 5.652827830140181], [-1.4285166649520677, 7.991178815631317], [1.0179268928460212, 6.234650333088625], [-0.10237335992179664, 5.216790596928811], [0.8945206266556602, 1.961891958849074], [-3.7645455411158375, 14.965007331606095], [-2.5837485905052926, 9.084689128297647], [-0.6936561702575943, 5.28281937112232], [0.2900620352731955, 2.6903543069941582], [0.4741039534911502, 4.186979702946429], [1.3593134337794222, 4.90314287805327], [-1.754854225156658, 5.917020061280331], [-0.2760824391735279, 4.896042006953552], [-2.145131239743776, 4.999196591404791], [3.6039665183706195, -0.2719136677062992], [5.97912131397371, 0.7637993559893621], [4.166698914141367, -0.08485018099479191], [4.893093462225972, 0.30016716961001455], [0.2900620352731951, 2.6721980849212557], [-3.6991068907737716, 8.861726191348053], [-0.046436493735313444, 2.9484252862795244], [-0.024766020288611523, 2.9666860241457513], [4.827116471079473, -0.5364894629472379], [-1.2141966174840584, 4.087970934575141], [2.2617088319942518, 0.21893988925413344], [4.18147880047027, 0.19511841248959838], [5.9280348530409075, 8.890736658315404], [4.518788267677348, -0.04154743725049981], [4.44325205928394, -1.007852334000157], [4.290841041213988, -0.17540461714051325], [3.769294411555624, -0.34168885793470505], [4.632658506364657, 0.3070575811701284], [4.388033904986031, -1.2787941827568412], [2.8796602146258485, 0.7169976483376705], [-8.993302706302629, 18.047614948808622], [-0.40804044722646404, 3.32923571550917], [4.388524835038002, -0.22441713017397236], [5.9749455766628685, -0.5105871937116166], [0.2900620352731954, 2.6317207883891633], [0.8945938791669943, 2.1382788324299487], [-16.642526220238658, 19.623895964392474], [-0.046436493735313444, 2.9484252862795244], [0.6031981581824842, 2.4125336286506642], [3.9771730838489914, -0.7757922401415804], [4.536770649420184, -0.20454374589753987], [0.2900620352731951, 2.707249979624113], [-0.4080404472264636, 3.4209265133546793], [4.719384382974241, -0.48143166216084854], [4.544248150302466, -0.5884133974848607], [2.768366006109903, 0.9183434148624996]]
The problem is that when i display map_building I see only the map of the first polygon without any point. How to solve it?
I think its perhaps a problem that you dont have a folium map. In the docs of GeoDataFrame.explore() it says the parameter m should be linked to a map. Perhaps first you have to create a map and then use it in the explore command. Similar to this (have not tried this example in lack of geopandas installed)
map_building = gdf_building.explore(style_kwds={'color':'black','weight':3,'fillColor':'gray','fillOpacity':0.2},
m=folium.Map(location=[44, -73], zoom_start=5))
I am not aware of the advantages of GeoDataFrame.explore() vs. pure folium. Perhaps, if you do not need it, you can just create a folium map and add the markercluster to it, just like it is done in your linked example. This should work:
# create map
m = folium.Map(location=[44, -73], zoom_start=5)
marker_cluster = MarkerCluster().add_to(m)
# add a marker to the cluster, not the map
for location in locationlist:
marker = folium.Marker(location=location)
marker_cluster.add_child(marker)
# add layercontrol
folium.LayerControl().add_to(m);
# show map
m

Polygon Shapely package python issues with airflow, giving false even though point is inside polygon

I'm facing an issue when running a portion of my code that involves the use of Shapely package (for polygon and points) in python on Airflow.
What the code does:
It converts a url to point (using a function) then checks if that point is inside a polygon. Locally the point is showing True. But on Airflow I keep getting False on Airflow
from shapely.geometry.polygon import Polygon
from shapely.geometry import Point
def convert_url_to_point(x):
split1 = x.split("=")
split2 = split1[1].split("%2C")
x_coordinates = split2[0]
y = split2[1]
y_coordinates = y.split("&")[0]
x_coordinates = float(x_coordinates)
y_coordinates = float(y_coordinates)
point = Point(x_coordinates, y_coordinates)
return point
url = "https://maps.google.com/maps/api/staticmap?center=33.76846398%2C-84.38438488&zoom=17&size=256x256&language=en&sensor=false&client=google-maps-frontend&signature=BaDj2xFv1Bv6pHNDtGF0v29UYe0"
x = convert_url_to_point(url)
check_polygon = Polygon[(34.127493 -83.81768199999999, 34.135484999999996 -83.808328, 34.145086 -83.797005, 34.165076 -83.773452, 34.180189 -83.75564399999999, 34.186807 -83.747799, 34.230622 -83.69633499999999, 34.241549 -83.6835, 34.261873 -83.659479, 34.295276 -83.620115, 34.296971 -83.62122099999999, 34.300548 -83.624253, 34.30131 -83.625099, 34.301938 -83.624835, 34.302838 -83.624725, 34.303992 -83.624133, 34.304471 -83.624131, 34.305212 -83.624358, 34.305839 -83.62475699999999, 34.306221 -83.625191, 34.306411 -83.62563399999999, 34.306968 -83.632243, 34.312761 -83.64183299999999, 34.314789000000005 -83.643915, 34.315872 -83.644272, 34.319744 -83.64807900000001, 34.321487 -83.649292, 34.323153999999995 -83.649628, 34.327477 -83.649292, 34.333309 -83.647789, 34.335167 -83.647774, 34.338004999999995 -83.649002, 34.340328 -83.649475, 34.343715 -83.651441, 34.346311 -83.651674, 34.34882 -83.651306, 34.350346 -83.65259499999999, 34.353123 -83.656013, 34.354733 -83.65679899999999, 34.355877 -83.65879100000001, 34.355915 -83.66082800000001, 34.357201 -83.663589, 34.359623 -83.66534399999999, 34.362728000000004 -83.666512, 34.364329999999995 -83.66845699999999, 34.3661 -83.66967, 34.367241 -83.668625, 34.36795 -83.666756, 34.369331 -83.66546600000001, 34.370777000000004 -83.665405, 34.372646 -83.663628, 34.37624 -83.66261300000001, 34.378761 -83.660187, 34.38007 -83.659805, 34.381753 -83.659798, 34.386856 -83.660252, 34.390739 -83.659981, 34.391791999999995 -83.65888199999999, 34.399746 -83.655563, 34.401586 -83.654022, 34.404517999999996 -83.648033, 34.406428000000005 -83.64542900000001, 34.412528 -83.643546, 34.415003999999996 -83.640513, 34.415867 -83.636392, 34.416229 -83.634349, 34.418112 -83.630946, 34.418994 -83.626464, 34.419513 -83.625445, 34.419317 -83.623212, 34.422426 -83.620944, 34.425225 -83.619677, 34.426676 -83.61954300000001, 34.43047 -83.617053, 34.431748 -83.615251, 34.444922999999996 -83.624897, 34.464163 -83.638541, 34.503596 -83.666398, 34.503602 -83.666415, 34.504457 -83.75676700000001, 34.504796999999996 -83.777703, 34.513696 -83.77760500000001, 34.514096 -83.788604, 34.504754 -83.78847900000001, 34.505494 -83.843405, 34.497021999999994 -83.843315, 34.477317 -83.873901, 34.477238 -83.87490600000001, 34.475644 -83.877684, 34.468788 -83.88760400000001, 34.459936 -83.887627, 34.459861 -83.898901, 34.459804999999996 -83.90995, 34.469184999999996 -83.90984300000001, 34.469345000000004 -83.93188599999999, 34.460529 -83.931898, 34.460114000000004 -83.920662, 34.451126 -83.92068499999999, 34.451206 -83.931313, 34.449003000000005 -83.93509300000001, 34.437286 -83.956448, 34.437907 -83.957018, 34.436121 -83.961492, 34.436171 -83.963473, 34.433882000000004 -83.966321, 34.432904 -83.970371, 34.432722 -83.975146, 34.431088 -83.97373, 34.424021 -83.970678, 34.422810999999996 -83.970893, 34.41874 -83.975926, 34.419061 -83.97851800000001, 34.418389000000005 -83.980649, 34.417041 -83.983285, 34.411603 -83.984818, 34.410755 -83.984365, 34.411528000000004 -83.979247, 34.408592999999996 -83.975603, 34.406551 -83.974756, 34.405108 -83.971836, 34.401784 -83.971522, 34.398998999999996 -83.972768, 34.397946000000005 -83.976472, 34.395041 -83.97796, 34.39076 -83.978534, 34.389018 -83.98120300000001, 34.386117999999996 -83.98360799999999, 34.382959 -83.984332, 34.381464 -83.982117, 34.380671 -83.979373, 34.379234999999994 -83.977223, 34.377131 -83.979614, 34.374109999999995 -83.980368, 34.372981 -83.979178, 34.371644 -83.979421, 34.369599 -83.980861, 34.368739 -83.980862, 34.368140999999994 -83.979341, 34.364664000000005 -83.97631700000001, 34.362838 -83.97618, 34.361895000000004 -83.97706099999999, 34.359538 -83.98145799999999, 34.357828999999995 -83.981433, 34.357152 -83.97960400000001, 34.356576000000004 -83.976238, 34.353265 -83.975274, 34.35011 -83.972988, 34.347657 -83.971915, 34.344120000000004 -83.968531, 34.340746 -83.967572, 34.339628999999995 -83.966853, 34.339943 -83.965438, 34.342667999999996 -83.962579, 34.34324 -83.961275, 34.342713 -83.960172, 34.340247 -83.960032, 34.334011 -83.957077, 34.334055 -83.96263, 34.334313 -84.01854200000001, 34.334348999999996 -84.044143, 34.334401 -84.05573199999999, 34.334423 -84.066513, 34.33461 -84.114866, 34.334756 -84.148473, 34.334871 -84.176378, 34.335156 -84.258075, 34.380992 -84.257586, 34.380881 -84.323042, 34.380839 -84.347459, 34.380814 -84.36182099999999, 34.380767999999996 -84.37890300000001, 34.380699 -84.390826, 34.373292 -84.392224, 34.373292 -84.39236600000001, 34.373266 -84.400774, 34.380492 -84.400724, 34.380551000000004 -84.411969, 34.380593 -84.424526, 34.38707 -84.424525, 34.387994 -84.424523, 34.388192 -84.442126, 34.380392 -84.442326, 34.380518 -84.46319100000001, 34.380595 -84.475711, 34.381492 -84.58263000000001, 34.385768 -84.582658, 34.412191 -84.58283, 34.41259 -84.65323199999999, 34.412887 -84.69917, 34.412968 -84.733878, 34.396495 -84.73411800000001, 34.397345 -84.79897700000001, 34.397627 -84.82593100000001, 34.397715000000005 -84.83715699999999, 34.396601000000004 -84.862863, 34.396778999999995 -84.87494000000001, 34.396458 -84.889753, 34.396311 -84.89572199999999, 34.398598 -84.89619, 34.398731 -84.91939, 34.398687 -84.928564, 34.398721 -84.932611, 34.398747 -84.93475600000001, 34.398955 -84.952546, 34.384190000000004 -84.953743, 34.384378000000005 -84.97044100000001, 34.397733 -84.970777, 34.397631 -84.979632, 34.384772 -84.98005400000001, 34.384558 -84.98991600000001, 34.392453 -84.98926, 34.392528999999996 -84.995599, 34.392446 -85.005775, 34.369142 -85.005607, 34.34708 -85.005235, 34.347112 -85.02310200000001, 34.325990000000004 -85.023342, 34.319713 -85.023021, 34.316932 -85.02329499999999, 34.305261 -85.023219, 34.275462 -85.023533, 34.258289000000005 -85.023891, 34.258206 -85.015528, 34.251131 -85.015606, 34.251201 -85.02394699999999, 34.246177 -85.024101, 34.213384999999995 -85.023813, 34.213248 -85.02631600000001, 34.213621999999994 -85.044658, 34.207257 -85.044889, 34.183818 -85.045249, 34.167485 -85.045282, 34.166171000000006 -85.045259, 34.117882 -85.046428, 34.096412 -85.046871, 34.082881 -85.047046, 34.082811 -85.03311, 34.082941 -84.999014, 34.082771 -84.976125, 34.082591 -84.95152900000001, 34.082553000000004 -84.939087, 34.078398 -84.939043, 34.078198 -84.93004300000001, 34.082597 -84.92994300000001, 34.082497 -84.922742, 34.074818 -84.92684799999999, 34.071698 -84.92874300000001, 33.996085 -84.960089, 33.995656 -84.96029899999999, 33.9895 -84.962887, 33.973501 -84.969418, 33.971565999999996 -84.97021600000001, 33.951392999999996 -84.97868299999999, 33.952635 -85.04983299999999, 33.904488 -85.05031, 33.904356 -85.048982, 33.904447 -85.04835899999999, 33.904327 -85.036684, 33.900931 -85.036735, 33.875118 -85.037125, 33.870305 -85.037401, 33.842061 -85.037695, 33.841588 -85.037768, 33.829027 -85.037674, 33.826527 -85.037752, 33.811941999999995 -85.037926, 33.812321999999995 -85.049031, 33.779959999999996 -85.049591, 33.755525 -85.04991899999999, 33.740742 -85.050278, 33.738403000000005 -85.050332, 33.732319 -85.050498, 33.714632 -85.050889, 33.714968 -85.066544, 33.710696999999996 -85.066469, 33.694611 -85.106786, 33.693267999999996 -85.110158, 33.691403 -85.114846, 33.691348 -85.114985, 33.691509 -85.12745600000001, 33.691423 -85.129688, 33.699778 -85.129441, 33.699915999999995 -85.13503, 33.69992 -85.135166, 33.699982 -85.137012, 33.700016999999995 -85.139027, 33.698721 -85.143125, 33.698593 -85.143535, 33.688109000000004 -85.177313, 33.683017 -85.1936, 33.678955 -85.206565, 33.669908 -85.235598, 33.663317 -85.256273, 33.659815 -85.265588, 33.658894000000004 -85.26844200000001, 33.652087 -85.289742, 33.6531163257259 -85.3382006083928, 33.5803388694423 -85.3237922987933, 33.5741594828964 -85.3225689183808, 33.5376467594031 -85.315340215273, 33.5376461241702 -85.3153400895111, 33.535897999999996 -85.314994, 33.5349512560896 -85.31484348771991, 33.530218 -85.314091, 33.529807 -85.313999, 33.482884000000006 -85.304439, 33.4774207256388 -85.3033886220355, 33.4469350716994 -85.29752740090429, 33.440601931981604 -85.2963097812195, 33.428079319201196 -85.29390216343329, 33.427981 -85.270624, 33.427973 -85.266313, 33.427225 -85.19754300000001, 33.426789 -85.116129, 33.426631 -85.099121, 33.426428 -85.080699, 33.425506 -85.01535799999999, 33.375115 -84.995773, 33.374688 -84.995536, 33.302163 -84.96820100000001, 33.277053 -84.958646, 33.282365000000006 -84.95858299999999, 33.282353 -84.95689399999999, 33.282277 -84.948815, 33.265653 -84.94881, 33.265608 -84.954578, 33.25123 -84.948988, 33.224693 -84.939015, 33.224634 -84.933196, 33.224623 -84.93226, 33.224244 -84.894317, 33.223858 -84.862135, 33.215892 -84.861977, 33.207541 -84.86219799999999, 33.207433 -84.871954, 33.20496 -84.870345, 33.201639 -84.870016, 33.198388 -84.86917, 33.195662 -84.869904, 33.195915 -84.867099, 33.198115 -84.865138, 33.199143 -84.862382, 33.191173 -84.862359, 33.191043 -84.852304, 33.215517 -84.852345, 33.22359 -84.85236, 33.223511 -84.835008, 33.223471999999994 -84.824733, 33.223406 -84.812765, 33.223346 -84.795278, 33.223194 -84.75429100000001, 33.223172999999996 -84.747761, 33.223098 -84.7427, 33.223222 -84.736834, 33.222969 -84.715068, 33.231187 -84.71497, 33.231493 -84.696779, 33.223065000000005 -84.69689100000001, 33.222735 -84.674613, 33.226496000000004 -84.674514, 33.226428000000006 -84.669476, 33.229708 -84.669374, 33.229636 -84.665998, 33.229481 -84.651461, 33.222518 -84.65150600000001, 33.22244 -84.635725, 33.222149 -84.62177700000001, 33.221703999999995 -84.576212, 33.221687 -84.57595500000001, 33.221534999999996 -84.565975, 33.221055 -84.502352, 33.219638 -84.50263299999999, 33.218958 -84.500585, 33.216578999999996 -84.501162, 33.215857 -84.502581, 33.214973 -84.502105, 33.215266 -84.500902, 33.21367 -84.499585, 33.212196999999996 -84.499511, 33.211579 -84.49803, 33.210561 -84.498232, 33.209907 -84.49682, 33.207181 -84.496144, 33.206383 -84.49730699999999, 33.205092 -84.497132, 33.204703 -84.498202, 33.201648 -84.49844300000001, 33.201696000000005 -84.496914, 33.200351 -84.494525, 33.200006 -84.492889, 33.198564000000005 -84.492319, 33.197586 -84.490539, 33.195614 -84.492582, 33.196513 -84.493826, 33.194502 -84.49483599999999, 33.191998 -84.496812, 33.189439 -84.495132, 33.187418 -84.495013, 33.186371 -84.496133, 33.183865999999995 -84.496783, 33.186298 -84.493112, 33.186784 -84.49041899999999, 33.18679 -84.487268, 33.187832 -84.484516, 33.18846 -84.481302, 33.190502 -84.480455, 33.191361 -84.478219, 33.193399 -84.477968, 33.195849 -84.476274, 33.19833 -84.47648000000001, 33.20064 -84.47545799999999, 33.201909 -84.473497, 33.200741 -84.470475, 33.20178 -84.470277, 33.201242 -84.468728, 33.199638 -84.467935, 33.199289 -84.46674499999999, 33.2019 -84.462388, 33.201093 -84.45881800000001, 33.202636 -84.455285, 33.203592 -84.455232, 33.206353 -84.452935, 33.208267 -84.452768, 33.208889 -84.451336, 33.208496999999994 -84.40447900000001, 33.208311 -84.393467, 33.200271 -84.39363, 33.200359999999996 -84.373141, 33.189625 -84.373685, 33.189591 -84.364072, 33.189541999999996 -84.352267, 33.189349 -84.325591, 33.189234 -84.26834000000001, 33.189019 -84.24818499999999, 33.188905 -84.227503, 33.183926 -84.224205, 33.182281 -84.223857, 33.179388 -84.224277, 33.179357 -84.216673, 33.179332 -84.210068, 33.179349 -84.20655, 33.179133 -84.181361, 33.178948999999996 -84.143857, 33.17862 -84.123981, 33.202824 -84.123767, 33.242748 -84.123152, 33.244515 -84.122998, 33.244424 -84.118123, 33.248731 -84.118117, 33.2488 -84.122675, 33.252668 -84.122623, 33.254484999999995 -84.120802, 33.266005 -84.108982, 33.272301 -84.10258499999999, 33.285646 -84.08899100000001, 33.286499 -84.09144599999999, 33.289924 -84.09300999999999, 33.292097999999996 -84.09721400000001, 33.293819 -84.097137, 33.298190999999996 -84.102582, 33.30209 -84.10244, 33.301998 -84.095147, 33.301874 -84.08854699999999, 33.298008 -84.085509, 33.300447999999996 -84.081383, 33.301873 -84.080238, 33.301817 -84.07369200000001, 33.317609999999995 -84.073, 33.317609999999995 -84.063532, 33.309805 -84.063591, 33.309668 -84.061322, 33.317741999999996 -84.053701, 33.319410999999995 -84.05366, 33.321513 -84.053636, 33.326126 -84.053651, 33.329549 -84.05364499999999, 33.329549 -84.045907, 33.331317 -84.045798, 33.331327 -84.042654, 33.333501 -84.042663, 33.333495 -84.044597, 33.337109000000005 -84.044485, 33.336544 -84.04266899999999, 33.341113 -84.04253299999999, 33.341381 -84.040261, 33.342833 -84.038296, 33.342766 -84.03313399999999, 33.361645 -84.032682, 33.361641 -84.032049, 33.36161 -84.025807, 33.361397 -84.024891, 33.360985 -84.024281, 33.358465 -84.025183, 33.35699 -84.024553, 33.356879 -84.021323, 33.358109999999996 -84.01825600000001, 33.359025 -84.014903, 33.360494 -84.012636, 33.362894 -84.010993, 33.366196 -84.008215, 33.368345 -84.007604, 33.36826 -84.00126, 33.368639 -83.99969200000001, 33.368288 -83.989016, 33.367472 -83.986012, 33.368189 -83.98403, 33.370155 -83.982998, 33.370184 -83.98214899999999, 33.371734000000004 -83.98084300000001, 33.372004 -83.978716, 33.373954 -83.976838, 33.374741 -83.976915, 33.374751 -83.971784, 33.375153999999995 -83.96437399999999, 33.377247 -83.96437399999999, 33.378506 -83.963748, 33.380306 -83.96732800000001, 33.381699 -83.966024, 33.385127000000004 -83.96600000000001, 33.385191999999996 -83.973218, 33.407556 -83.973128, 33.407582 -83.96311, 33.411414 -83.96311, 33.419185999999996 -83.96311, 33.419242 -83.954029, 33.425225 -83.954029, 33.425290000000004 -83.943516, 33.441783 -83.94349799999999, 33.441865 -83.932746, 33.444515 -83.932599, 33.444666999999995 -83.929152, 33.444194 -83.923913, 33.440943 -83.921621, 33.439062 -83.918932, 33.436714 -83.919787, 33.434333 -83.919686, 33.434216 -83.91883100000001, 33.436357 -83.91630500000001, 33.435652000000005 -83.915027, 33.433355 -83.916168, 33.43122 -83.91448000000001, 33.429349 -83.914413, 33.427426000000004 -83.915267, 33.426109000000004 -83.910607, 33.423769 -83.910842, 33.421727000000004 -83.912269, 33.419323999999996 -83.912733, 33.41768 -83.912299, 33.418242 -83.910444, 33.417833 -83.908286, 33.416053000000005 -83.906565, 33.413796999999995 -83.90605699999999, 33.412737 -83.904966, 33.412258 -83.90300400000001, 33.410706 -83.900378, 33.410364 -83.898227, 33.407305 -83.895108, 33.402023 -83.895904, 33.396725 -83.895081, 33.395184 -83.893908, 33.394018 -83.892363, 33.392933 -83.888926, 33.391278 -83.885547, 33.391132 -83.88181800000001, 33.390305 -83.879502, 33.388546999999996 -83.87799999999999, 33.385938 -83.877263, 33.383179 -83.877392, 33.378725 -83.874213, 33.378035 -83.873289, 33.3773 -83.868905, 33.377718 -83.86562099999999, 33.377054 -83.8643, 33.375668 -83.864319, 33.372791 -83.866592, 33.370442 -83.864104, 33.368278000000004 -83.863058, 33.368817 -83.859854, 33.367239 -83.853942, 33.370016 -83.854889, 33.371679 -83.856949, 33.372584 -83.85215, 33.374257 -83.84774300000001, 33.375881 -83.84783900000001, 33.379286 -83.846522, 33.380998999999996 -83.845487, 33.383762 -83.842237, 33.390002 -83.83783299999999, 33.390845 -83.836445, 33.392926 -83.83154499999999, 33.393462 -83.831024, 33.394775 -83.831863, 33.39586 -83.833138, 33.399747999999995 -83.840191, 33.40258 -83.842537, 33.404922 -83.84375, 33.405044000000004 -83.836975, 33.407883 -83.836884, 33.407753 -83.845024, 33.414721 -83.84520699999999, 33.415076 -83.82826800000001, 33.419185999999996 -83.830792, 33.421524 -83.830872, 33.422686 -83.828603, 33.426289000000004 -83.828278, 33.428265 -83.826134, 33.429947 -83.826424, 33.433386999999996 -83.82347800000001, 33.437263 -83.824922, 33.438037 -83.823385, 33.436321 -83.82096899999999, 33.437003999999995 -83.819344, 33.436237 -83.8172, 33.436706 -83.81626999999999, 33.434657 -83.81219499999999, 33.436336 -83.808384, 33.440829 -83.807374, 33.446371 -83.791949, 33.452495 -83.77127800000001, 33.454652 -83.76951, 33.455636 -83.767439, 33.459322 -83.76274699999999, 33.467028000000006 -83.753556, 33.476479 -83.742085, 33.480862 -83.736687, 33.488518 -83.70474300000001, 33.492191 -83.709514, 33.495096000000004 -83.712281, 33.500895 -83.705275, 33.497758000000005 -83.70264300000001, 33.498296999999994 -83.701135, 33.494824 -83.69711099999999, 33.493252000000005 -83.696541, 33.49069 -83.69347900000001, 33.489143 -83.692642, 33.485794 -83.688858, 33.484796 -83.689177, 33.483117 -83.687601, 33.48276 -83.685874, 33.482971 -83.682419, 33.483897 -83.679039, 33.487225 -83.674644, 33.494428000000006 -83.683006, 33.496784000000005 -83.683143, 33.502142 -83.684602, 33.506194 -83.686566, 33.507867 -83.685958, 33.510564 -83.688077, 33.512204 -83.687523, 33.522247 -83.683634, 33.52622 -83.68219599999999, 33.571176 -83.677669, 33.571834 -83.677717, 33.575946 -83.68118, 33.577913 -83.681443, 33.579378999999996 -83.683003, 33.579508000000004 -83.684202, 33.580906 -83.685979, 33.582435 -83.687087, 33.584416999999995 -83.685851, 33.586681 -83.686022, 33.588559000000004 -83.687386, 33.596919 -83.68089599999999, 33.604988 -83.674501, 33.611874 -83.669067, 33.626125 -83.657788, 33.649296 -83.639195, 33.674944 -83.618844, 33.698899 -83.60011999999999, 33.711408 -83.590189, 33.77839 -83.53694, 33.781544 -83.534669, 33.796119 -83.526386, 33.796626 -83.524019, 33.798814 -83.52138199999999, 33.807919 -83.512385, 33.811124 -83.511491, 33.81776 -83.505928, 33.817603999999996 -83.509598, 33.815437 -83.51017, 33.817719 -83.515694, 33.816608 -83.517578, 33.819668 -83.520126, 33.818245000000005 -83.521927, 33.819578 -83.523894, 33.821194 -83.529213, 33.820923 -83.533165, 33.821521999999995 -83.533836, 33.822792 -83.532829, 33.823238 -83.531235, 33.824272 -83.53138, 33.825584 -83.532753, 33.827969 -83.537224, 33.830894 -83.541611, 33.831309999999995 -83.542801, 33.832527 -83.54310600000001, 33.833431 -83.54521899999999, 33.833637 -83.54705, 33.835882 -83.549495, 33.836292 -83.55085, 33.838833 -83.55365, 33.839046 -83.555359, 33.840674 -83.55832, 33.842484000000006 -83.561775, 33.844177 -83.56262199999999, 33.844916999999995 -83.564125, 33.846981 -83.566338, 33.846985 -83.569855, 33.846573 -83.571632, 33.847408 -83.573265, 33.848999 -83.574646, 33.851135 -83.57473, 33.852394 -83.57414200000001, 33.854424 -83.574875, 33.858868 -83.579369, 33.859913 -83.581581, 33.862614 -83.582565, 33.864441 -83.584869, 33.863503 -83.58641, 33.864182 -83.588432, 33.861931 -83.589027, 33.863361 -83.590622, 33.864445 -83.590233, 33.867638 -83.587334, 33.871798999999996 -83.587349, 33.873540999999996 -83.587065, 33.874939000000005 -83.586143, 33.876971999999995 -83.586189, 33.878281 -83.584106, 33.880096 -83.584305, 33.881847 -83.582314, 33.883608 -83.583613, 33.883282 -83.58645600000001, 33.88147 -83.590538, 33.881347999999996 -83.594666, 33.882835 -83.596283, 33.881481 -83.60035699999999, 33.881972999999995 -83.60198199999999, 33.883419 -83.602035, 33.883095000000004 -83.603523, 33.881622 -83.604729, 33.88118 -83.608765, 33.881341 -83.611475, 33.881904 -83.61281, 33.883316 -83.615234, 33.882957 -83.615974, 33.883813 -83.61841899999999, 33.885517 -83.619232, 33.884702000000004 -83.622066, 33.885643 -83.625504, 33.88493 -83.626427, 33.886646999999996 -83.63030400000001, 33.891253000000006 -83.631709, 33.892067 -83.630608, 33.897038 -83.631271, 33.898540000000004 -83.63188199999999, 33.900112 -83.633476, 33.901051 -83.633377, 33.90276 -83.635712, 33.904793 -83.63604699999999, 33.904216999999996 -83.6371, 33.908306 -83.638855, 33.908297999999995 -83.640112, 33.90703 -83.642318, 33.906940000000006 -83.644249, 33.905599 -83.642074, 33.904796999999995 -83.644775, 33.906197999999996 -83.64703100000001, 33.907691 -83.64434200000001, 33.924919 -83.612972, 33.945389 -83.575526, 33.947936 -83.570786, 33.950138 -83.56669000000001, 33.954638 -83.558384, 33.965912 -83.537385, 33.997684 -83.54979399999999, 34.003128000000004 -83.55107, 34.003192999999996 -83.551106, 34.031684000000006 -83.56318399999999, 34.031864 -83.563277, 34.032326 -83.564444, 34.031953 -83.567251, 34.031022 -83.568708, 34.031110999999996 -83.570462, 34.031401 -83.571111, 34.035298 -83.57271899999999, 34.036597 -83.573709, 34.037155 -83.573851, 34.03782 -83.573725, 34.038582 -83.573332, 34.039057 -83.573438, 34.039563 -83.577393, 34.039653 -83.57950500000001, 34.041058 -83.584158, 34.038641 -83.58398000000001, 34.03918 -83.586321, 34.038074 -83.58801, 34.0373 -83.590236, 34.037046999999994 -83.59420300000001, 34.036477000000005 -83.59526, 34.036635 -83.59783399999999, 34.037376 -83.598722, 34.0353 -83.600538, 34.036553999999995 -83.602908, 34.037723 -83.603166, 34.038696 -83.604815, 34.039064 -83.607352, 34.03817 -83.609085, 34.041256 -83.611671, 34.042652000000004 -83.61108399999999, 34.044441 -83.611725, 34.044712 -83.614708, 34.045553999999996 -83.61558000000001, 34.046921000000005 -83.614418, 34.047384 -83.61729, 34.046389000000005 -83.620403, 34.046843 -83.621737, 34.045138 -83.62510999999999, 34.04545 -83.627898, 34.044756 -83.630326, 34.046189 -83.630903, 34.046209000000005 -83.6349, 34.04595 -83.636133, 34.047691 -83.637335, 34.048301 -83.638625, 34.048662 -83.642185, 34.049283 -83.643778, 34.050854 -83.64376800000001, 34.050682 -83.645927, 34.049982 -83.646637, 34.047373 -83.646872, 34.045986 -83.647835, 34.046581 -83.65258, 34.047478000000005 -83.65508299999999, 34.050045000000004 -83.656479, 34.052792 -83.65654, 34.053288 -83.658043, 34.052338 -83.660484, 34.052273 -83.66324, 34.048903 -83.66311999999999, 34.048229 -83.66566800000001, 34.048337 -83.66912099999999, 34.053036 -83.673454, 34.053593 -83.67619300000001, 34.052494 -83.676926, 34.052319 -83.678955, 34.051442 -83.679633, 34.049306 -83.678688, 34.047304 -83.679911, 34.047538 -83.681664, 34.046942 -83.684937, 34.04847 -83.68666400000001, 34.051025 -83.685755, 34.053442 -83.685513, 34.053674 -83.68807, 34.052119 -83.690044, 34.051615999999996 -83.691806, 34.05292 -83.693963, 34.054914000000004 -83.693727, 34.056255 -83.69459499999999, 34.05579 -83.695991, 34.053734000000006 -83.69651800000001, 34.052608 -83.698143, 34.054121 -83.699641, 34.054378 -83.70070600000001, 34.052914 -83.70201899999999, 34.048705 -83.702473, 34.046291 -83.704426, 34.046158 -83.707623, 34.045127 -83.70918, 34.045984000000004 -83.71137900000001, 34.049139000000004 -83.713083, 34.050024 -83.714399, 34.051696 -83.71378299999999, 34.052949 -83.712561, 34.054434 -83.712294, 34.056378 -83.713492, 34.055954 -83.71576, 34.055073 -83.717076, 34.053545 -83.718763, 34.055503 -83.720803, 34.056567 -83.720383, 34.058012 -83.720965, 34.059106 -83.720239, 34.060401 -83.721327, 34.06263 -83.721588, 34.063423 -83.72377, 34.060703000000004 -83.727928, 34.060116 -83.731796, 34.060905 -83.732872, 34.064056 -83.734344, 34.066662 -83.733307, 34.067345 -83.733726, 34.066395 -83.737205, 34.066673 -83.738564, 34.069496 -83.740578, 34.069191 -83.742798, 34.068027 -83.743431, 34.065909999999995 -83.74209599999999, 34.065243 -83.74233199999999, 34.065292 -83.745293, 34.064919 -83.748451, 34.064201000000004 -83.75138100000001, 34.06657 -83.75924300000001, 34.066609 -83.761739, 34.066163 -83.762831, 34.06487 -83.76331, 34.065292 -83.765134, 34.066448 -83.76753199999999, 34.069234 -83.769041, 34.073040999999996 -83.769705, 34.074234999999994 -83.773836, 34.078378 -83.776534, 34.079819 -83.777977, 34.083892 -83.78609200000001, 34.086628000000005 -83.79051199999999, 34.087837 -83.791351, 34.088299 -83.79143499999999, 34.093533 -83.78993100000001, 34.093578 -83.78993299999999, 34.100041 -83.792046, 34.101136 -83.793524, 34.102072 -83.795982, 34.102833000000004 -83.79980400000001, 34.103049 -83.800169, 34.105676 -83.80312099999999, 34.107694 -83.805762, 34.109614 -83.805693, 34.109404999999995 -83.807783, 34.111269 -83.809889, 34.112851 -83.811757, 34.113701 -83.815174, 34.114585 -83.814394, 34.115520000000004 -83.81110799999999, 34.117293 -83.81299200000001, 34.120515000000005 -83.81218199999999, 34.121502 -83.815208, 34.122532 -83.816528, 34.12688 -83.815996, 34.127493 -83.81768199999999)]
inside_polygon_boolean = check_polygon.contains(x)
print(inside_polygon_boolean)
If this is the actual code in Airflow, try changing polygon to valid Well Known Text to load it with wkt.loads() :
check_polygon = wkt.loads('POLYGON ((34.127493 -83.81768199999999, 34.135484999999996 -83.808328, 34.145086 -83.797005, ..., 34.127493 -83.81768199999999))')
Alternatively, create an ordered sequence of point tuples for Polygon constructor:
check_polygon = Polygon([(34.127493, -83.81768199999999), (34.135484999999996, -83.808328), (34.145086, -83.797005), ..., (34.127493, -83.81768199999999)])
Currently you seem to have a mix of both approaches.
Some additional context
To create a Shapely polygon, you can pass a list of point tuples ( [(x1,y1), (x2,y2), ...] ) to the class constructor. You can also serialize existing geometric objects to Well Known Text strings or import objects in wkt form from other sources and load those with wkt.loads() :
from shapely.geometry.polygon import Polygon
from shapely import wkt
# Polygon class constructur, takes list of point tuples:
polygon_a = Polygon([(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)])
print(f'Well Known Text: "{polygon_a.wkt}"')
# deserialize a geometric object from wkt string, note the quotes and how
# point coordinates are separated by <space>
polygon_b = wkt.loads('POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0))')
if polygon_a == polygon_b:
print ('Polygons are equal')
## Output:
# Well Known Text: "POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0))"
# Polygons are equal
You seem to have a wkt-string as a base with some modifications on top of it, though with my sample coordinates editor / IDE would warn about it even before running, it would also just throw SyntaxError:
# wkt: 'POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0))'
# incorrect tranformation to Polygon():
polygon_c = Polygon[(0 0, 0 2, 2 2, 2 0, 0 0)]
File "<ipython-input-37-a734f32944de>", line 3
polygon_c = Polygon[(0 0, 0 2, 2 2, 2 0, 0 0)]
^
SyntaxError: invalid syntax
You happen to have negative y-coordinates, so your coordinate list actually gets evaluated:
# first 2 coordinate pairs as an example:
(34.127493 -83.81768199999999, 34.135484999999996 -83.808328,)
# exactly the same as
(34.127493-83.81768199999999, 34.135484999999996-83.808328,)
# and would be evaluated to sequence of two, i.e. (x1-y1, x2-y2):
(-49.69018899999999, -49.67284300000001)
This might trick your IDE to not warn you about error, but this would still throw TypeError: 'type' object is not subscriptable during execution.
To conclude
If this is how you construct your polygon in Airflow instance, your Airflow Task is likely to fail not because your point is outside of the polygon, but because it throws an error.

in VTK, move point but keep the mesh (python)

Main question : I would like to know if it is possible to move a point in one direction but keep the mesh in vtk-Python (see image below)
I am new to vtk and would like to know if something is possible and if it is, which function to use. (I will give the context under if someone have a more clever idea).
I am using the vtk library with python and came across a pb with the delaunay_2d meshing.
I have a mesh that is mostly flat but with little variation
if you lunch this code, you will see that the meshing is really weird :
import pyvista as pv
import vtk as vtk
a=[[146.2346, -0.06153386, 611.2706],[146.1978, -0.05672521, 611.269],[146.1624, -0.05195256, 611.2675],[146.1345, -0.04595259, 611.2665],[146.0745, -0.02889959, 611.2647],[145.967, -0.01271295, 611.2602],[145.8994, -0.009446936, 611.2567],[145.7876, -0.01544256, 611.2445],[145.6697, -0.02221904, 611.2313],[145.6411, -0.02354358, 611.2281],[145.6213, -0.02429816, 611.226],[145.6148, -0.02446534, 611.2249],[145.6086, -0.02457465, 611.2237],[145.6037, -0.02456888, 611.2228],[145.5997, -0.02445992, 611.2221],[145.5722, -0.02384555, 611.2174],[145.4821, -0.02229311, 611.202],[145.3932, -0.02014619, 611.1866],[145.3392, -0.01758623, 611.1768],[145.2826, -0.01470557, 611.1657],[145.242, -0.01272894, 611.157],[145.2183, -0.01186882, 611.1517],[145.201, -0.01120841, 611.1478],[145.1839, -0.01051717, 611.1439],[145.17, -0.00969123, 611.1407],[145.1583, -0.008427223, 611.1383],[145.1294, -0.007862877, 611.1321],[145.1014, -0.008404535, 611.1261],[145.0899, -0.008730335, 611.1237],[145.0849, -0.008798788, 611.1226],[145.0315, -0.009818145, 611.1109],[144.9335, -0.01140382, 611.0887],[144.8838, -0.01200129, 611.077],[144.8506, -0.0121375, 611.0691],[144.7955, -0.01213034, 611.0557],[144.7571, -0.01195927, 611.0462],[144.7039, -0.0117043, 611.0333],[144.639, -0.01079165, 611.0176],[144.5931, -0.01010639, 611.0062],[144.5228, -0.01040282, 610.9877],[144.4637, -0.01073657, 610.972],[144.4376, -0.01124127, 610.9651],[144.413, -0.01201134, 610.9583],[144.3769, -0.01325327, 610.9479],[144.3213, -0.01482141, 610.9319],[144.2883, -0.01556498, 610.9223],[144.2539, -0.01585945, 610.9122],[144.1733, -0.01677441, 610.8897],[144.1193, -0.01754921, 610.8751],[144.1092, -0.01772558, 610.8723],[144.1012, -0.01783123, 610.8702],[144.0963, -0.01781308, 610.8689],[144.0742, -0.0179998, 610.8631],[144.0339, -0.01839697, 610.853],[143.9804, -0.01873316, 610.8398],[143.9467, -0.01887846, 610.8315],[143.9274, -0.01891992, 610.8267],[143.8417, -0.01886452, 610.8066],[143.7705, -0.01871645, 610.79],[143.7586, -0.01850215, 610.7873],[140.9641, 0.002861298, 575.0103],[140.975, 0.0004340185, 574.9571],[140.9918, -0.004345077, 574.8732],[140.9989, -0.00678831, 574.8369],[141.0005, -0.007331287, 574.8288],[141.0033, -0.00870053, 574.8147],[141.0085, -0.01185749, 574.79],[141.0185, -0.01458415, 574.7529],[141.0268, -0.01585665, 574.7258],[141.0422, -0.02161443, 574.6707],[141.0595, -0.02673956, 574.6101],[141.0743, -0.02733954, 574.5637],[141.0923, -0.02482757, 574.5121],[141.1047, -0.01995062, 574.4816],[141.112, -0.01798161, 574.4629],[141.1168, -0.01754502, 574.4503],[141.1319, -0.01713058, 574.4153],[141.148, -0.01711672, 574.3782],[141.1785, -0.01743222, 574.3112],[141.2074, -0.01777238, 574.2482],[141.2119, -0.01781772, 574.2393],[141.2374, -0.02053488, 574.193],[141.2616, -0.02339841, 574.1488],[141.2682, -0.02405973, 574.1371],[141.2773, -0.02454154, 574.121],[141.2984, -0.0244909, 574.0833],[141.3239, -0.02285809, 574.0379],[141.362, -0.02366696, 573.9743],[141.4008, -0.02681, 573.9104],[141.4111, -0.02758676, 573.8934],[141.4149, -0.02748217, 573.8879],[141.4247, -0.02697612, 573.8746],[141.4432, -0.02813518, 573.8474],[141.4665, -0.03125831, 573.8114],[141.4852, -0.03241773, 573.7831],[141.5292, -0.03128803, 573.7191],[141.5682, -0.03055324, 573.6623],[141.5732, -0.03044086, 573.655],[141.592, -0.02969062, 573.6299],[141.6085, -0.02897164, 573.6082],[141.6247, -0.02817515, 573.5873],[141.6633, -0.02625679, 573.5373],[141.711, -0.0244699, 573.4756],[141.7424, -0.02377839, 573.435],[141.7517, -0.02353401, 573.4231],[141.7648, -0.02296879, 573.4082],[141.7862, -0.02246382, 573.3844],[141.8357, -0.02191633, 573.3298],[141.9018, -0.02097274, 573.2567],[141.9447, -0.02015587, 573.2089],[141.9606, -0.0198681, 573.1911],[141.961, -0.01985728, 573.1907],[141.9736, -0.0194613, 573.1782],[141.9873, -0.01920701, 573.1648],[141.9997, -0.02040373, 573.153],[142.0396, -0.02199398, 573.1149],[142.1073, -0.02463654, 573.0479],[142.176, -0.02768754, 572.9786],[142.2113, -0.02821711, 572.9433],[142.2351, -0.02649652, 572.9198],[142.3082, -0.02100548, 572.8537],[142.3686, -0.01652271, 572.8005],[142.3796, -0.01589324, 572.7906],[142.3981, -0.01486295, 572.7743],[142.4123, -0.01408919, 572.7619],[142.4144, -0.01399181, 572.76],[142.4179, -0.01407487, 572.757],[142.448, -0.01566364, 572.7316],[142.5282, -0.01877348, 572.6642],[142.5982, -0.02105116, 572.6056],[142.6172, -0.02173755, 572.5896],[142.6276, -0.021897, 572.5812],[142.6731, -0.02252371, 572.5445],[142.7521, -0.02395345, 572.4821],[142.8003, -0.02493422, 572.4448],[142.8347, -0.02538628, 572.4179],[142.8763, -0.02544799, 572.3859],[142.9153, -0.02413499, 572.3573],[142.9477, -0.02288336, 572.3338],[142.9768, -0.02149255, 572.3131],[143.0515, -0.01691165, 572.2601],[143.1274, -0.01455436, 572.2069],[143.1697, -0.01542038, 572.178],[143.2005, -0.01505758, 572.1568],[143.2495, -0.01680911, 572.1242],[143.2874, -0.01877392, 572.0992],[143.3077, -0.01987864, 572.0859],[143.3509, -0.02099498, 572.0578],[143.4083, -0.01987314, 572.021],[143.4909, -0.01770812, 571.9689],[143.5684, -0.01706533, 571.9212],[143.5987, -0.01741168, 571.9031],[143.6137, -0.01759005, 571.8942],[143.6689, -0.01668662, 571.8615],[143.7408, -0.01502007, 571.8187],[143.7993, -0.01439461, 571.7853],[143.8609, -0.0165276, 571.7517],[143.8997, -0.01897029, 571.7308],[143.9147, -0.01910335, 571.7229],[143.9507, -0.0185069, 571.704],[144.013, -0.01750005, 571.6713],[144.0648, -0.01632737, 571.6442],[144.0993, -0.01506928, 571.6263],[144.1447, -0.01443901, 571.6029],[144.1923, -0.01450271, 571.579],[144.2355, -0.01467142, 571.558],[144.283, -0.01480775, 571.5352],[144.3439, -0.01599414, 571.5067],[144.4027, -0.01789944, 571.4795],[144.4572, -0.01791742, 571.4552],[144.5246, -0.01659406, 571.4258],[144.5738, -0.01525325, 571.4047],[144.6097, -0.01443211, 571.3898],[144.6464, -0.01424885, 571.3747],[144.6945, -0.01390467, 571.3555],[144.7463, -0.01350234, 571.3347],[144.7808, -0.01354561, 571.3207],[144.8094, -0.01393717, 571.3094],[144.8693, -0.01412922, 571.2871],[144.9426, -0.01378092, 571.2596],[144.9972, -0.01244129, 571.2401],[145.0396, -0.01095316, 571.2258],[145.0826, -0.00853111, 571.211],[145.1198, -0.006981449, 571.1983],[145.1381, -0.009466066, 571.1928],[145.1525, -0.01155278, 571.1885],[145.1717, -0.01150764, 571.1826],[145.1954, -0.01155187, 571.1752],[145.222, -0.01203899, 571.1672],[145.2529, -0.01274025, 571.158],[145.271, -0.01319267, 571.1527],[145.2814, -0.01332585, 571.1496],[145.2997, -0.01334692, 571.1445],[145.3551, -0.01436899, 571.1286],[145.4116, -0.0157692, 571.1123],[145.4388, -0.01593566, 571.1048],[145.4774, -0.0152119, 571.0944],[145.5604, -0.01549523, 571.075],[145.6195, -0.01626525, 571.0623],[145.6802, -0.01707819, 571.0502],[145.7626, -0.01802136, 571.0355],[145.8255, -0.01808286, 571.027],[145.8883, -0.01794028, 571.0183],[145.9254, -0.0178556, 571.0136],[145.9446, -0.017869, 571.0114],[145.984, -0.01818962, 571.0074],[146.0778, -0.01925302, 570.9996],[146.1833, -0.02391875, 570.992],[146.2321, -0.0281701, 570.9886],[146.2426, -0.02938274, 570.9879],[146.2166, -0.05736815, 611.4644],[146.174, -0.05089068, 611.4629],[146.1599, -0.04873756, 611.4623],[146.1137, -0.03929245, 611.4614],[146.0483, -0.02763847, 611.4596],[146.012, -0.02361259, 611.4579],[145.9631, -0.022168, 611.4549],[145.9114, -0.02165178, 611.4517],[145.8622, -0.01918254, 611.4482],[145.8258, -0.01688459, 611.4455],[145.812, -0.01702635, 611.4443],[145.699, -0.02098855, 611.4307],[145.5503, -0.0264029, 611.4119],[145.4873, -0.02732343, 611.4034],[145.4437, -0.02593876, 611.3963],[145.3971, -0.02403616, 611.3883],[145.3718, -0.02247259, 611.3837],[145.3409, -0.02103397, 611.3775],[145.3073, -0.01946996, 611.3708],[145.2901, -0.01852485, 611.3673],[145.1439, -0.01363603, 611.336],[145.0007, -0.008871335, 611.3053],[144.9918, -0.008317093, 611.3033],[144.9818, -0.00827229, 611.3011],[144.9711, -0.008648629, 611.2987],[144.9585, -0.00894847, 611.296],[144.9434, -0.009202947, 611.2927],[144.9355, -0.009293081, 611.291],[144.9336, -0.009293889, 611.2906],[144.9196, -0.009484665, 611.287],[144.8996, -0.009810211, 611.2818],[144.8846, -0.01014345, 611.2779],[144.8513, -0.01053094, 611.2692],[144.807, -0.01110086, 611.2577],[144.726, -0.01263126, 611.2365],[144.6032, -0.01377125, 611.2053],[144.5243, -0.01371456, 611.1859],[144.4985, -0.01368977, 611.1796],[144.4893, -0.01365795, 611.1773],[144.4804, -0.01371251, 611.1751],[144.4578, -0.0137947, 611.1696],[144.4187, -0.01381266, 611.16],[144.3741, -0.01397462, 611.1485],[144.3052, -0.01446937, 611.1297],[144.2563, -0.01481979, 611.1164],[144.255, -0.01484228, 611.116],[144.2525, -0.01495003, 611.1153],[144.2264, -0.01614293, 611.1078],[144.1978, -0.01735986, 611.0995],[144.1808, -0.01762734, 611.0947],[144.1633, -0.01779159, 611.0898],[144.1078, -0.01793095, 611.0743],[144.0449, -0.01793684, 611.057],[143.901, -0.01699888, 611.0205],[143.7598, -0.01609495, 610.9845],[140.8673, 0.004013773, 575.0136],[140.8857, -0.002197082, 574.9198],[140.9067, -0.01009257, 574.8142],[140.9167, -0.01630242, 574.765],[140.9439, -0.02201862, 574.668],[140.9666, -0.02335378, 574.5981],[140.9771, -0.02513118, 574.5642],[140.9885, -0.02729319, 574.527],[140.9966, -0.02716472, 574.502],[141.0051, -0.02627761, 574.4758],[141.0116, -0.02506499, 574.457],[141.0199, -0.02063325, 574.4372],[141.0487, -0.02102182, 574.3722],[141.0777, -0.02478343, 574.3076],[141.0955, -0.02463576, 574.2666],[141.1121, -0.02457507, 574.229],[141.1173, -0.02461446, 574.2178],[141.1236, -0.02464042, 574.2063],[141.135, -0.02530249, 574.1858],[141.1744, -0.02652624, 574.1139],[141.2091, -0.02709656, 574.0502],[141.2377, -0.02136374, 574.0002],[141.2738, -0.01635836, 573.9381],[141.2848, -0.0172927, 573.9203],[141.2951, -0.01758817, 573.9031],[141.3037, -0.01760539, 573.889],[141.3268, -0.01604579, 573.858],[141.3539, -0.01518705, 573.8207],[141.4088, -0.02247747, 573.7359],[141.4684, -0.02852728, 573.6449],[141.4843, -0.02764272, 573.6221],[141.5006, -0.02728717, 573.5983],[141.5111, -0.02722914, 573.5829],[141.5118, -0.02722982, 573.5818],[141.5132, -0.02715779, 573.5799],[141.5294, -0.02634171, 573.5587],[141.5565, -0.02501735, 573.5232],[141.6001, -0.02373889, 573.4655],[141.6579, -0.0224396, 573.3887],[141.6878, -0.0217516, 573.3498],[141.7011, -0.02140111, 573.3354],[141.7217, -0.02115995, 573.3127],[141.7776, -0.020856, 573.25],[141.8334, -0.02046155, 573.1874],[141.8645, -0.01999886, 573.1532],[141.8853, -0.01960157, 573.1304],[141.9001, -0.01918023, 573.114],[141.9348, -0.01900096, 573.08],[141.9562, -0.01924281, 573.0596],[141.993, -0.02112808, 573.022],[142.0713, -0.02525797, 572.941],[142.1216, -0.02746505, 572.8884],[142.1362, -0.02698184, 572.8736],[142.1481, -0.02621646, 572.8619],[142.168, -0.02474578, 572.8435],[142.2107, -0.02196891, 572.8044],[142.2444, -0.01999198, 572.7731],[142.2713, -0.01863434, 572.7483],[142.2985, -0.01733583, 572.7234],[142.3336, -0.01569685, 572.6921],[142.405, -0.01668335, 572.6296],[142.4628, -0.01980776, 572.5797],[142.5035, -0.02117437, 572.5449],[142.5384, -0.02189425, 572.5152],[142.5685, -0.02228352, 572.4902],[142.6137, -0.02278752, 572.4529],[142.6642, -0.02303429, 572.4118],[142.7085, -0.02325433, 572.3763],[142.766, -0.02257066, 572.3312],[142.8821, -0.01881034, 572.2437],[142.9597, -0.01593948, 572.1861],[142.9696, -0.01544765, 572.1788],[143.0172, -0.01338197, 572.1437],[143.076, -0.0114591, 572.101],[143.1149, -0.01234147, 572.0739],[143.1691, -0.01581758, 572.037],[143.2065, -0.01815548, 572.0118],[143.2522, -0.01978064, 571.9809],[143.3011, -0.02127273, 571.948],[143.3377, -0.02081609, 571.9245],[143.4183, -0.01950245, 571.8726],[143.4902, -0.01807297, 571.8264],[143.5343, -0.0175391, 571.7987],[143.5608, -0.01759356, 571.7825],[143.5911, -0.01717058, 571.764],[143.6458, -0.01607553, 571.7306],[143.693, -0.01547654, 571.7024],[143.7485, -0.01548299, 571.6709],[143.8175, -0.01574977, 571.6315],[143.8708, -0.01652237, 571.6017],[143.9491, -0.0160313, 571.5596],[144.0184, -0.01483544, 571.5227],[144.0363, -0.01447774, 571.5131],[144.0637, -0.01432391, 571.4987],[144.1224, -0.01434779, 571.4677],[144.1715, -0.01442718, 571.4422],[144.1953, -0.0145433, 571.4302],[144.2665, -0.01480657, 571.3962],[144.3489, -0.0163923, 571.3569],[144.3814, -0.01844081, 571.3411],[144.4083, -0.01861602, 571.3284],[144.4675, -0.01694035, 571.301],[144.5175, -0.01574981, 571.2781],[144.5462, -0.01568998, 571.2656],[144.5934, -0.01550807, 571.2451],[144.6454, -0.01547175, 571.2229],[144.7203, -0.01478874, 571.1919],[144.7835, -0.01376356, 571.1663],[144.8243, -0.01432241, 571.1497],[144.8731, -0.01529546, 571.1301],[144.8973, -0.01541066, 571.1205],[144.9038, -0.01508989, 571.1182],[144.916, -0.01455041, 571.1138],[144.9556, -0.01379068, 571.1005],[145.0602, -0.01391453, 571.0649],[145.1478, -0.01465114, 571.0349],[145.1655, -0.01478407, 571.0288],[145.1696, -0.0147913, 571.0275],[145.211, -0.01551238, 571.0156],[145.2521, -0.01625661, 571.0038],[145.2546, -0.01630192, 571.0031],[145.2582, -0.01633627, 571.002],[145.2917, -0.01701197, 570.9917],[145.3685, -0.01865086, 570.9682],[145.4243, -0.01943179, 570.9514],[145.45, -0.01889651, 570.9444],[145.4817, -0.01872314, 570.9368],[145.5508, -0.01847148, 570.9219],[145.6074, -0.01799234, 570.9097],[145.6385, -0.01740676, 570.9026],[145.6757, -0.01686226, 570.8941],[145.7179, -0.01731708, 570.8865],[145.7814, -0.01844415, 570.8759],[145.8272, -0.01896315, 570.8686],[145.8773, -0.01869122, 570.8623],[145.9458, -0.01847936, 570.8543],[145.985, -0.01839645, 570.8498],[146.0081, -0.01854843, 570.8472],[146.0541, -0.02106533, 570.8432],[146.1355, -0.02782925, 570.8374],[146.2059, -0.03366203, 570.8322],[146.2263, -0.03505306, 570.8305],[146.2396, -0.03491875, 570.8296]]
cloud = pv.PolyData(tab_point_ds_np)
surf_inter = cloud.delaunay_2d(alpha=0.35)
image = pv.Plotter()
image.add_mesh(surf_inter, show_edges=True)
image.add_points(cloud)
image.add_axes(interactive=True)
image.view_zx()
image.show()
but if i just add that after the generation of 'a' to make the point cloud flat, the delaunay_2D work perfectly:
for i in range(len(a)):
a[i][1] = 0 # Every y at 0
here is the image with and without making it flat :
So my idea was:
generate a flat mesh
move each point on the mesh at the correct altitude
Thanks in advance for your help
Just overwrite the points after having created the triangulation with the flat point array:
cloud.points = np.array([[v[0],0,v[2]] for v in a])
surf_inter = cloud.delaunay_2d(alpha=0.35)
surf_inter.points = np.array(a)

Scatter plot looks good but line plot looks weird on non-monotonically increasing data set

I have a monotonically increasing data set as shown below.
R,M
7.0868,1.8102943986273166
7.087,1.810312919954896
7.0872,1.8102755711577103
7.0875,1.8102573284176724
7.0876,1.810237664390435
7.0887,1.810218897273047
7.0891,1.8102001649403308
7.0893,1.810178092508343
7.0894,1.8101553469354064
7.0902,1.8101359159985828
7.0907,1.810114549302785
7.0913,1.81009305646246
7.0916,1.8100731291478405
7.0919,1.8100505894431602
7.0923,1.8100245482326576
7.0933,1.810004843857531
7.0941,1.809981589365771
7.0948,1.8099565489521152
7.0949,1.8099337348073137
7.0957,1.8099052572558645
7.096,1.8098801233168886
7.0963,1.8098547472451978
7.0968,1.8098277762241366
7.0976,1.8098018568760064
7.0988,1.8097719856008248
7.099,1.8097424026714641
7.0994,1.8097145467653863
7.1002,1.8096846260698558
7.1005,1.8096553317621344
7.1016,1.8096207945226712
7.1023000000000005,1.8095909693292185
7.1031,1.8095572406207299
7.1038,1.8095238119406782
7.1043,1.8094894673202357
7.1053,1.8094538233723965
7.1064,1.8094182142472666
7.1067,1.8093818127358254
7.1079,1.8093437811755255
7.1088000000000005,1.8093041362243816
7.1098,1.809264041823682
7.1107000000000005,1.8092243783159143
7.1112,1.8091814057573945
7.1126000000000005,1.8091391534332957
7.1136,1.809094359509292
7.1148,1.809048533354942
7.1158,1.8090036536620597
7.1169,1.8089557015211883
7.1181,1.8089046493876206
7.1193,1.8088552101687183
7.1204,1.8088020551150032
7.1219,1.808747338797958
7.1225000000000005,1.8086919257417675
7.1247,1.8086350956553856
7.1258,1.8085748348942912
7.1275,1.808514553392964
7.1291,1.8084534203833889
7.1306,1.8083867543300092
7.1325,1.8083196215972281
7.1338,1.80825088250088
7.136,1.808178483206244
7.1374,1.8081044657602499
7.1392,1.8080287144430973
7.1412,1.8079480881686774
7.1431000000000004,1.8078648303094877
7.1456,1.8077807725153732
7.1476,1.8076892427316402
7.1503000000000005,1.807599230113512
7.1525,1.8075034794947091
7.1552,1.8074049113668145
7.1578,1.8073014641377354
7.1612,1.8071891350684717
7.1637,1.8070785128831843
7.1675,1.80696372890561
7.1701,1.8068419878230761
7.1737,1.8067122501065405
7.1779,1.8065802344915192
7.1814,1.8064383616085946
7.1856,1.806293933093177
7.1896,1.806138911817485
7.1947,1.8059806108944794
7.1993,1.80580908721362
7.2053,1.8056328160830435
7.2107,1.8054479682161961
7.2173,1.8052525284387695
7.2237,1.8050465193576883
7.2309,1.8048296381956124
7.2392,1.8045988960975694
7.2474,1.8043595071215677
7.2564,1.8041082364687364
7.2666,1.8038382553758734
7.2781,1.8035594899544896
7.2901,1.8032661790541915
7.3036,1.8029587616930072
7.3192,1.8026419692687126
7.3365,1.802313214895432
7.3559,1.8019832998820766
7.3782000000000005,1.8016547858228427
7.4039,1.8013374225262055
7.434,1.8010610354808818
7.469,1.8008525385497174
7.4728,1.8008375055547212
7.4766,1.8008241798024116
7.4805,1.8008134283846535
7.485,1.8008014895962607
7.4889,1.8007906472467445
7.4931,1.8007836940234814
7.4974,1.8007772872833665
7.502,1.8007773636348627
7.5066,1.800777214492662
7.5111,1.800772599047411
7.5161,1.8007769259270974
7.5204,1.8007812794388944
7.5251,1.8007885071607819
7.5309,1.8007961396426069
7.5354,1.800809332665
7.5404,1.800828880377808
7.5456,1.800846702941447
7.5511,1.8008692674381197
7.5565,1.8008933437321841
7.5623000000000005,1.8009237058574081
7.5682,1.800958157045992
7.5744,1.8009948449267943
7.58,1.8010363488385235
7.5863000000000005,1.8010832972433193
7.5923,1.8011350711403118
7.5989,1.8011921478121384
7.6052,1.801254330745158
7.6122000000000005,1.8013200393645774
7.619,1.801396979723438
7.6262,1.801481231944994
7.6332,1.8015680286606623
7.6412,1.8016656871159082
7.6485,1.8017686065785499
7.6562,1.8018805264670845
7.664,1.8020043241836483
7.6723,1.8021374134198185
7.6806,1.802276358227313
7.689,1.802430876035706
7.698,1.8025962404854161
7.7073,1.802773424707928
7.7165,1.8029615206656595
7.7261,1.8031700727690376
7.7358,1.8033901306600841
7.746,1.8036245439350242
7.7569,1.8038801831608258
7.7674,1.8041511397011663
7.7785,1.8044409511998807
7.7895,1.804751063391503
7.8016000000000005,1.8050889378483397
7.8137,1.8054500843221957
7.8260000000000005,1.8058344798814248
7.839,1.8062497893213036
7.8523000000000005,1.8066916535420319
7.8660000000000005,1.807171119554773
7.8801000000000005,1.8076802794778468
7.8950000000000005,1.8082299359839067
7.91,1.808815338202358
7.9256,1.8094485033102967
7.9419,1.8101332152002367
7.9588,1.8108583555324504
7.9762,1.8116377906606793
7.9942,1.812480154325305
8.013300000000001,1.8133886252401064
8.0323,1.8143645477074526
8.0526,1.8154146330511043
8.073500000000001,1.8165442307174358
8.0957,1.8177698166402039
8.1182,1.819085725400004
8.1417,1.8205097465554974
8.1664,1.8220480025653125
8.192,1.8237072998986206
8.2188,1.8255111058560254
8.2468,1.827455350126501
8.2759,1.8295663029422389
8.3064,1.831861429607547
8.3383,1.8343455967834263
8.3716,1.837047237198313
8.4065,1.8399908757968044
8.4431,1.8431886841980547
8.4816,1.846678932529894
8.5218,1.8504805320192779
8.5642,1.8546328838729316
8.6085,1.859161369210759
8.655,1.8641143534208833
8.7039,1.8695256342139759
8.754900000000001,1.875446560741857
8.8087,1.881922204419208
8.8655,1.8890064461692662
8.9244,1.8967439742289458
8.9863,1.905188505881128
9.0511,1.9143851329920027
9.1186,1.924363320273434
9.188600000000001,1.9351143409915226
9.2613,1.9466051165466298
9.3348,1.9586922001685116
9.4098,1.970987602510523
9.4882,1.9833342806468837
9.5729,1.9958205973858019
9.6658,2.008306966070422
9.6757,2.0095470086686014
9.6853,2.0107829319774146
9.6956,2.0120161755240176
9.706,2.013246638357084
9.7155,2.0144724860531107
9.726,2.01569779646471
9.7361,2.01691593463459
9.7469,2.0181299858892676
9.7574,2.019339103824116
9.768,2.0205367574186544
9.7784,2.0217329512312534
9.789200000000001,2.022924537891196
9.8004,2.024103911848606
9.8115,2.0252755733660237
9.822700000000001,2.026442290408354
9.8339,2.027595562850575
9.8451,2.0287425260513627
9.8566,2.02987789695615
9.8683,2.031004255291417
9.8802,2.0321140981371753
9.8917,2.033211262029186
9.9039,2.03429873554374
9.9159,2.035370601551793
9.9284,2.036428080910105
9.9404,2.03746680777716
9.953100000000001,2.038486511766415
9.9657,2.039488307130752
9.9784,2.040471399292025
9.9911,2.0414350165353037
10.0042,2.0423773356028083
10.0178,2.043291283530465
10.030800000000001,2.0441838862321724
10.044500000000001,2.0450464474687147
10.0585,2.0458827447198584
10.0716,2.0466886270813385
10.0859,2.047468383690954
10.0998,2.0482043647433352
10.113900000000001,2.0489096859138938
10.1285,2.0495761215721746
10.1431,2.0501996224170225
10.158,2.0507863441183343
10.173,2.05132507354447
10.1883,2.0518124042758448
10.2033,2.052257120191798
10.2188,2.052637398387419
10.2344,2.0529609887501064
10.2505,2.053231208698309
10.266300000000001,2.053430956645957
10.2827,2.0535609020452807
10.2992,2.053618768726303
10.315900000000001,2.0535986346512063
10.3324,2.053499145209982
10.3495,2.0533064233065197
10.3668,2.0530215567767636
10.3844,2.0526369031524108
10.402000000000001,2.0521636845730233
10.42,2.0515392027607855
10.4381,2.0508116828399494
10.4563,2.0499535127064785
10.4748,2.0489576534963168
10.4937,2.0478138062588847
10.5128,2.046511793430433
10.532,2.0450378909729627
10.5515,2.043383966625784
10.5714,2.0415367556333575
10.591000000000001,2.039475707572078
10.6113,2.0371915999694594
10.6318,2.034681992486926
10.6523,2.031875344830552
10.6732,2.028806016957831
10.6943,2.0254302835993974
10.7156,2.021729410221098
10.737,2.0176679331240632
10.7585,2.0132226995271503
10.7804,2.0083569404787207
10.8025,2.003033377167351
10.8245,1.9972070467548615
10.8468,1.99084498211035
10.8693,1.9838848370723352
10.8916,1.976265341594595
10.913400000000001,1.9679245337116287
10.9359,1.9587753705415543
10.958,1.9487087547075432
10.9801,1.937613087921291
11.0016,1.925359737260557
11.0228,1.911811244861433
11.043700000000001,1.896814109152176
11.0641,1.880201767746232
11.0839,1.861791757645824
11.103,1.8413880752742964
11.1143,0.6798071334659402
11.1148,0.6620484741207461
11.115400000000001,0.7308628786759206
11.1163,0.643905710436412
11.1173,0.7471776126414391
11.1188,0.6253614804987849
11.119,0.7631699685933497
11.1209,1.8187639653487393
11.121,0.7788332436619917
11.1226,0.6064184938116979
11.1233,0.7941958537153351
11.1252,0.8092591741702967
11.1277,0.5870678163436467
11.1302,0.8385380585848173
11.1326,0.8527702605010601
11.135200000000001,0.5673102326921188
11.1377,0.8804746147417499
11.138300000000001,1.7936929573835567
11.1404,0.8939630164904495
11.142800000000001,0.9072161422501497
11.1443,0.5471696019139972
11.1457,0.920255663318353
11.148,0.933064576156273
11.1506,0.9456674682901905
11.152800000000001,0.958071445468564
11.1539,1.7659104790175046
11.1555,0.9702722709283456
11.1563,0.526626294457235
11.1578,0.982282581805736
11.16,0.994125843269314
11.1625,1.005758474384689
11.1651,1.0172259729870816
11.1667,1.0285290632922044
11.1681,1.7351407435690962
11.1694,1.0396641713997514
11.1708,1.0506369116951209
11.1715,0.5057129912122545
11.1728,1.06145775881892
11.1752,1.0721969265059947
11.177100000000001,1.0826438965199432
11.178700000000001,1.0930140692041797
11.1804,1.7010859834099117
11.180900000000001,1.1032438870571097
11.1824,1.113341990904366
11.184000000000001,1.123299806468843
11.1857,1.1331296145407677
11.1873,1.1428308979922694
11.1889,1.152401698215316
11.1903,1.161856869794937
11.1904,0.48445364974714356
11.1919,1.663399436215842
11.192,1.1711910394172824
11.1934,1.1804087961074725
11.1942,1.1895091584397912
11.195500000000001,1.1985002253694752
11.1974,1.2073817550934374
11.1981,1.2161518746407876
11.199300000000001,1.2248195347259854
11.2006,1.233382363999008
11.2012,1.6217221083677575
11.201600000000001,1.2418573170671454
11.2026,1.2502123181321048
11.2036,1.2584707455312942
11.2044,1.2666389953934527
11.205300000000001,1.2747462832375793
11.2059,1.282698337211604
11.2071,1.2905889671447655
11.2075,1.2983932387539374
11.208400000000001,1.5756312874271927
11.2089,1.3061289118283488
11.2093,1.3137413392392563
11.209900000000001,1.3212844363707013
11.2105,1.3287440211738633
11.2111,1.3361240786859585
11.2118,1.3434226680704695
11.2121,1.3506419841724973
11.2127,1.35780576619357
11.2131,1.3718370881026203
11.2135,1.5246558611202008
11.213700000000001,1.364846987030096
11.214,1.5138285906034126
11.2142,1.385586125420797
11.2144,1.5083287553910607
11.214500000000001,1.5027740924000998
11.2146,1.3990472473875148
11.2147,1.491494982843448
11.2148,1.4122266556473997
11.2149,1.4187122779735373
11.215,1.392352319217516
11.2151,1.4799814651383028
11.215200000000001,1.4682238422417109
11.215300000000001,1.4056725030722297
11.2154,1.4562337169860362
11.2155,1.4251295454595927
11.2156,1.4314822279446662
R,M
7.0868,1.8102943986273166
7.087,1.810312919954896
7.0872,1.8102755711577103
7.0875,1.8102573284176724
7.0876,1.810237664390435
7.0887,1.810218897273047
7.0891,1.8102001649403308
7.0893,1.810178092508343
7.0894,1.8101553469354064
7.0902,1.8101359159985828
7.0907,1.810114549302785
7.0913,1.81009305646246
7.0916,1.8100731291478405
7.0919,1.8100505894431602
7.0923,1.8100245482326576
7.0933,1.810004843857531
7.0941,1.809981589365771
7.0948,1.8099565489521152
7.0949,1.8099337348073137
7.0957,1.8099052572558645
7.096,1.8098801233168886
7.0963,1.8098547472451978
7.0968,1.8098277762241366
7.0976,1.8098018568760064
7.0988,1.8097719856008248
7.099,1.8097424026714641
7.0994,1.8097145467653863
7.1002,1.8096846260698558
7.1005,1.8096553317621344
7.1016,1.8096207945226712
7.1023000000000005,1.8095909693292185
7.1031,1.8095572406207299
7.1038,1.8095238119406782
7.1043,1.8094894673202357
7.1053,1.8094538233723965
7.1064,1.8094182142472666
7.1067,1.8093818127358254
7.1079,1.8093437811755255
7.1088000000000005,1.8093041362243816
7.1098,1.809264041823682
7.1107000000000005,1.8092243783159143
7.1112,1.8091814057573945
7.1126000000000005,1.8091391534332957
7.1136,1.809094359509292
7.1148,1.809048533354942
7.1158,1.8090036536620597
7.1169,1.8089557015211883
7.1181,1.8089046493876206
7.1193,1.8088552101687183
7.1204,1.8088020551150032
7.1219,1.808747338797958
7.1225000000000005,1.8086919257417675
7.1247,1.8086350956553856
7.1258,1.8085748348942912
7.1275,1.808514553392964
7.1291,1.8084534203833889
7.1306,1.8083867543300092
7.1325,1.8083196215972281
7.1338,1.80825088250088
7.136,1.808178483206244
7.1374,1.8081044657602499
7.1392,1.8080287144430973
7.1412,1.8079480881686774
7.1431000000000004,1.8078648303094877
7.1456,1.8077807725153732
7.1476,1.8076892427316402
7.1503000000000005,1.807599230113512
7.1525,1.8075034794947091
7.1552,1.8074049113668145
7.1578,1.8073014641377354
7.1612,1.8071891350684717
7.1637,1.8070785128831843
7.1675,1.80696372890561
7.1701,1.8068419878230761
7.1737,1.8067122501065405
7.1779,1.8065802344915192
7.1814,1.8064383616085946
7.1856,1.806293933093177
7.1896,1.806138911817485
7.1947,1.8059806108944794
7.1993,1.80580908721362
7.2053,1.8056328160830435
7.2107,1.8054479682161961
7.2173,1.8052525284387695
7.2237,1.8050465193576883
7.2309,1.8048296381956124
7.2392,1.8045988960975694
7.2474,1.8043595071215677
7.2564,1.8041082364687364
7.2666,1.8038382553758734
7.2781,1.8035594899544896
7.2901,1.8032661790541915
7.3036,1.8029587616930072
7.3192,1.8026419692687126
7.3365,1.802313214895432
7.3559,1.8019832998820766
7.3782000000000005,1.8016547858228427
7.4039,1.8013374225262055
7.434,1.8010610354808818
7.469,1.8008525385497174
7.4728,1.8008375055547212
7.4766,1.8008241798024116
7.4805,1.8008134283846535
7.485,1.8008014895962607
7.4889,1.8007906472467445
7.4931,1.8007836940234814
7.4974,1.8007772872833665
7.502,1.8007773636348627
7.5066,1.800777214492662
7.5111,1.800772599047411
7.5161,1.8007769259270974
7.5204,1.8007812794388944
7.5251,1.8007885071607819
7.5309,1.8007961396426069
7.5354,1.800809332665
7.5404,1.800828880377808
7.5456,1.800846702941447
7.5511,1.8008692674381197
7.5565,1.8008933437321841
7.5623000000000005,1.8009237058574081
7.5682,1.800958157045992
7.5744,1.8009948449267943
7.58,1.8010363488385235
7.5863000000000005,1.8010832972433193
7.5923,1.8011350711403118
7.5989,1.8011921478121384
7.6052,1.801254330745158
7.6122000000000005,1.8013200393645774
7.619,1.801396979723438
7.6262,1.801481231944994
7.6332,1.8015680286606623
7.6412,1.8016656871159082
7.6485,1.8017686065785499
7.6562,1.8018805264670845
7.664,1.8020043241836483
7.6723,1.8021374134198185
7.6806,1.802276358227313
7.689,1.802430876035706
7.698,1.8025962404854161
7.7073,1.802773424707928
7.7165,1.8029615206656595
7.7261,1.8031700727690376
7.7358,1.8033901306600841
7.746,1.8036245439350242
7.7569,1.8038801831608258
7.7674,1.8041511397011663
7.7785,1.8044409511998807
7.7895,1.804751063391503
7.8016000000000005,1.8050889378483397
7.8137,1.8054500843221957
7.8260000000000005,1.8058344798814248
7.839,1.8062497893213036
7.8523000000000005,1.8066916535420319
7.8660000000000005,1.807171119554773
7.8801000000000005,1.8076802794778468
7.8950000000000005,1.8082299359839067
7.91,1.808815338202358
7.9256,1.8094485033102967
7.9419,1.8101332152002367
7.9588,1.8108583555324504
7.9762,1.8116377906606793
7.9942,1.812480154325305
8.013300000000001,1.8133886252401064
8.0323,1.8143645477074526
8.0526,1.8154146330511043
8.073500000000001,1.8165442307174358
8.0957,1.8177698166402039
8.1182,1.819085725400004
8.1417,1.8205097465554974
8.1664,1.8220480025653125
8.192,1.8237072998986206
8.2188,1.8255111058560254
8.2468,1.827455350126501
8.2759,1.8295663029422389
8.3064,1.831861429607547
8.3383,1.8343455967834263
8.3716,1.837047237198313
8.4065,1.8399908757968044
8.4431,1.8431886841980547
8.4816,1.846678932529894
8.5218,1.8504805320192779
8.5642,1.8546328838729316
8.6085,1.859161369210759
8.655,1.8641143534208833
8.7039,1.8695256342139759
8.754900000000001,1.875446560741857
8.8087,1.881922204419208
8.8655,1.8890064461692662
8.9244,1.8967439742289458
8.9863,1.905188505881128
9.0511,1.9143851329920027
9.1186,1.924363320273434
9.188600000000001,1.9351143409915226
9.2613,1.9466051165466298
9.3348,1.9586922001685116
9.4098,1.970987602510523
9.4882,1.9833342806468837
9.5729,1.9958205973858019
9.6658,2.008306966070422
9.6757,2.0095470086686014
9.6853,2.0107829319774146
9.6956,2.0120161755240176
9.706,2.013246638357084
9.7155,2.0144724860531107
9.726,2.01569779646471
9.7361,2.01691593463459
9.7469,2.0181299858892676
9.7574,2.019339103824116
9.768,2.0205367574186544
9.7784,2.0217329512312534
9.789200000000001,2.022924537891196
9.8004,2.024103911848606
9.8115,2.0252755733660237
9.822700000000001,2.026442290408354
9.8339,2.027595562850575
9.8451,2.0287425260513627
9.8566,2.02987789695615
9.8683,2.031004255291417
9.8802,2.0321140981371753
9.8917,2.033211262029186
9.9039,2.03429873554374
9.9159,2.035370601551793
9.9284,2.036428080910105
9.9404,2.03746680777716
9.953100000000001,2.038486511766415
9.9657,2.039488307130752
9.9784,2.040471399292025
9.9911,2.0414350165353037
10.0042,2.0423773356028083
10.0178,2.043291283530465
10.030800000000001,2.0441838862321724
10.044500000000001,2.0450464474687147
10.0585,2.0458827447198584
10.0716,2.0466886270813385
10.0859,2.047468383690954
10.0998,2.0482043647433352
10.113900000000001,2.0489096859138938
10.1285,2.0495761215721746
10.1431,2.0501996224170225
10.158,2.0507863441183343
10.173,2.05132507354447
10.1883,2.0518124042758448
10.2033,2.052257120191798
10.2188,2.052637398387419
10.2344,2.0529609887501064
10.2505,2.053231208698309
10.266300000000001,2.053430956645957
10.2827,2.0535609020452807
10.2992,2.053618768726303
10.315900000000001,2.0535986346512063
10.3324,2.053499145209982
10.3495,2.0533064233065197
10.3668,2.0530215567767636
10.3844,2.0526369031524108
10.402000000000001,2.0521636845730233
10.42,2.0515392027607855
10.4381,2.0508116828399494
10.4563,2.0499535127064785
10.4748,2.0489576534963168
10.4937,2.0478138062588847
10.5128,2.046511793430433
10.532,2.0450378909729627
10.5515,2.043383966625784
10.5714,2.0415367556333575
10.591000000000001,2.039475707572078
10.6113,2.0371915999694594
10.6318,2.034681992486926
10.6523,2.031875344830552
10.6732,2.028806016957831
10.6943,2.0254302835993974
10.7156,2.021729410221098
10.737,2.0176679331240632
10.7585,2.0132226995271503
10.7804,2.0083569404787207
10.8025,2.003033377167351
10.8245,1.9972070467548615
10.8468,1.99084498211035
10.8693,1.9838848370723352
10.8916,1.976265341594595
10.913400000000001,1.9679245337116287
10.9359,1.9587753705415543
10.958,1.9487087547075432
10.9801,1.937613087921291
11.0016,1.925359737260557
11.0228,1.911811244861433
11.043700000000001,1.896814109152176
11.0641,1.880201767746232
11.0839,1.861791757645824
11.103,1.8413880752742964
11.1143,0.6798071334659402
11.1148,0.6620484741207461
11.115400000000001,0.7308628786759206
11.1163,0.643905710436412
11.1173,0.7471776126414391
11.1188,0.6253614804987849
11.119,0.7631699685933497
11.1209,1.8187639653487393
11.121,0.7788332436619917
11.1226,0.6064184938116979
11.1233,0.7941958537153351
11.1252,0.8092591741702967
11.1277,0.5870678163436467
11.1302,0.8385380585848173
11.1326,0.8527702605010601
11.135200000000001,0.5673102326921188
11.1377,0.8804746147417499
11.138300000000001,1.7936929573835567
11.1404,0.8939630164904495
11.142800000000001,0.9072161422501497
11.1443,0.5471696019139972
11.1457,0.920255663318353
11.148,0.933064576156273
11.1506,0.9456674682901905
11.152800000000001,0.958071445468564
11.1539,1.7659104790175046
11.1555,0.9702722709283456
11.1563,0.526626294457235
11.1578,0.982282581805736
11.16,0.994125843269314
11.1625,1.005758474384689
11.1651,1.0172259729870816
11.1667,1.0285290632922044
11.1681,1.7351407435690962
11.1694,1.0396641713997514
11.1708,1.0506369116951209
11.1715,0.5057129912122545
11.1728,1.06145775881892
11.1752,1.0721969265059947
11.177100000000001,1.0826438965199432
11.178700000000001,1.0930140692041797
11.1804,1.7010859834099117
11.180900000000001,1.1032438870571097
11.1824,1.113341990904366
11.184000000000001,1.123299806468843
11.1857,1.1331296145407677
11.1873,1.1428308979922694
11.1889,1.152401698215316
11.1903,1.161856869794937
11.1904,0.48445364974714356
11.1919,1.663399436215842
11.192,1.1711910394172824
11.1934,1.1804087961074725
11.1942,1.1895091584397912
11.195500000000001,1.1985002253694752
11.1974,1.2073817550934374
11.1981,1.2161518746407876
11.199300000000001,1.2248195347259854
11.2006,1.233382363999008
11.2012,1.6217221083677575
11.201600000000001,1.2418573170671454
11.2026,1.2502123181321048
11.2036,1.2584707455312942
11.2044,1.2666389953934527
11.205300000000001,1.2747462832375793
11.2059,1.282698337211604
11.2071,1.2905889671447655
11.2075,1.2983932387539374
11.208400000000001,1.5756312874271927
11.2089,1.3061289118283488
11.2093,1.3137413392392563
11.209900000000001,1.3212844363707013
11.2105,1.3287440211738633
11.2111,1.3361240786859585
11.2118,1.3434226680704695
11.2121,1.3506419841724973
11.2127,1.35780576619357
11.2131,1.3718370881026203
11.2135,1.5246558611202008
11.213700000000001,1.364846987030096
11.214,1.5138285906034126
11.2142,1.385586125420797
11.2144,1.5083287553910607
11.214500000000001,1.5027740924000998
11.2146,1.3990472473875148
11.2147,1.491494982843448
11.2148,1.4122266556473997
11.2149,1.4187122779735373
11.215,1.392352319217516
11.2151,1.4799814651383028
11.215200000000001,1.4682238422417109
11.215300000000001,1.4056725030722297
11.2154,1.4562337169860362
11.2155,1.4251295454595927
11.2156,1.4314822279446662
The data is imported using Pandas with the code below.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('data.txt')
df = df.sort_values(by=['R'])
plt.plot(df['R'], df['M'])
plt.gcf().set_size_inches(2.55*8,1*8)
plt.xlabel(r'$r$ $(km)$')
plt.ylabel(r'$M/M_\odot$')
plt.show()
exit()
I've shorted data short by X ('R') and it look weird where Y is not monotonically increasing as picture below
Also, if I short the data by Y ('M'), the plot doesn't look so well where X is not monotonically increasing.
Scatter plot looks as shown below.
I have no idea for an equation to fit this plot. Is there any method or package for connecting the point properly?
Edit1:
I've tried doing spline fit. The result is as below.
import numpy as np
tck = interpolate.splrep(df['R'], df['M'],)
xnew= np.linspace(min(df['R'].to_numpy()),max(df['R'].to_numpy()),1000)
ynew = interpolate.splev(xnew, tck)
plt.plot(xnew, ynew)
I guess in this particular case a solution to get the data in the desired order is to sort them by the polar angle of the points in a cartesian plane.
X = <your data>
order = np.argsort(np.arctan2(X[:,1], X[:,0]))
plt.plot(X[order,0], X[order,1])
plt.show()

How to integrate curve from data

Here are my x-values:
[2600.2 2601.2 2602.2 2603.1 2604.1 2605.1 2606. 2607. 2607.9 2608.9
2609.9 2610.8 2611.8 2612.8 2613.7 2614.7 2615.7 2616.6 2617.6 2618.6
2619.5 2620.5 2621.4 2622.4 2623.4 2624.3 2625.3 2626.3 2627.2 2628.2
2629.2 2630.1 2631.1 2632.1 2633. 2634. 2635. 2635.9 2636.9 2637.8
2638.8 2639.8 2640.7 2641.7 2642.7 2643.6 2644.6 2645.6 2646.5 2647.5
2648.5 2649.4 2650.4 2651.3 2652.3 2653.3 2654.2 2655.2 2656.2 2657.1
2658.1 2659.1 2660. 2661. 2662. 2662.9 2663.9 2664.9 2665.8 2666.8
2667.7 2668.7 2669.7 2670.6 2671.6 2672.6 2673.5 2674.5 2675.5 2676.4
2677.4 2678.4 2679.3 2680.3 2681.2 2682.2 2683.2 2684.1 2685.1 2686.1
2687. 2688. 2689. 2689.9 2690.9 2691.9 2692.8 2693.8 2694.7 2695.7
2696.7 2697.6 2698.6 2699.6 2700.5 2701.5 2702.5 2703.4 2704.4 2705.4
2706.3 2707.3 2708.3 2709.2 2710.2 2711.1 2712.1 2713.1 2714. 2715.
2716. 2716.9 2717.9 2718.9 2719.8 2720.8 2721.8 2722.7 2723.7 2724.6
2725.6 2726.6 2727.5 2728.5 2729.5 2730.4 2731.4 2732.4 2733.3 2734.3
2735.3 2736.2 2737.2 2738.2 2739.1 2740.1 2741. 2742. 2743. 2743.9
2744.9 2745.9 2746.8 2747.8 2748.8 2749.7 2750.7 2751.7 2752.6 2753.6
2754.5 2755.5 2756.5 2757.4 2758.4 2759.4 2760.3 2761.3 2762.3 2763.2
2764.2 2765.2 2766.1 2767.1 2768.1 2769. 2770. 2770.9 2771.9 2772.9
2773.8 2774.8 2775.8 2776.7 2777.7 2778.7 2779.6 2780.6 2781.6 2782.5
2783.5 2784.4 2785.4 2786.4 2787.3 2788.3 2789.3 2790.2 2791.2 2792.2
2793.1 2794.1 2795.1 2796. 2797. 2797.9 2798.9 2799.9 2800.8 2801.8
2802.8 2803.7 2804.7 2805.7 2806.6 2807.6 2808.6 2809.5 2810.5 2811.5
2812.4 2813.4 2814.3 2815.3 2816.3 2817.2 2818.2 2819.2 2820.1 2821.1
2822.1 2823. 2824. 2825. 2825.9 2826.9 2827.8 2828.8 2829.8 2830.7
2831.7 2832.7 2833.6 2834.6 2835.6 2836.5 2837.5 2838.5 2839.4 2840.4
2841.4 2842.3 2843.3 2844.2 2845.2 2846.2 2847.1 2848.1 2849.1 2850.
2851. 2852. 2852.9 2853.9 2854.9 2855.8 2856.8 2857.7 2858.7 2859.7
2860.6 2861.6 2862.6 2863.5 2864.5 2865.5 2866.4 2867.4 2868.4 2869.3
2870.3 2871.2 2872.2 2873.2 2874.1 2875.1 2876.1 2877. 2878. 2879.
2879.9 2880.9 2881.9 2882.8 2883.8 2884.8 2885.7 2886.7 2887.6 2888.6
2889.6 2890.5 2891.5 2892.5 2893.4 2894.4 2895.4 2896.3 2897.3 2898.3
2899.2 2900.2 2901.1 2902.1 2903.1 2904. 2905. 2906. 2906.9 2907.9
2908.9 2909.8 2910.8 2911.8 2912.7 2913.7 2914.7 2915.6 2916.6 2917.5
2918.5 2919.5 2920.4 2921.4 2922.4 2923.3 2924.3 2925.3 2926.2 2927.2
2928.2 2929.1 2930.1 2931. 2932. 2933. 2933.9 2934.9 2935.9 2936.8
2937.8 2938.8 2939.7 2940.7 2941.7 2942.6 2943.6 2944.5 2945.5 2946.5
2947.4 2948.4 2949.4 2950.3 2951.3 2952.3 2953.2 2954.2 2955.2 2956.1
2957.1 2958.1 2959. 2960. 2960.9 2961.9 2962.9 2963.8 2964.8 2965.8
2966.7 2967.7 2968.7 2969.6 2970.6 2971.6 2972.5 2973.5 2974.4 2975.4
2976.4 2977.3 2978.3 2979.3 2980.2 2981.2 2982.2 2983.1 2984.1 2985.1
2986. 2987. 2988. 2988.9 2989.9 2990.8 2991.8 2992.8 2993.7 2994.7
2995.7 2996.6 2997.6 2998.6 2999.5 3000.5 3001.5 3002.4 3003.4 3004.3
3005.3 3006.3 3007.2 3008.2 3009.2 3010.1 3011.1 3012.1 3013. 3014.
3015. 3015.9 3016.9 3017.9 3018.8 3019.8]
and y-values:
[-7.44466803e-04 -6.38664122e-04 -5.34609823e-04 -4.42448211e-04
-3.41690555e-04 -2.42654847e-04 -1.54987591e-04 -5.91990560e-05
2.55600336e-05 1.18132985e-04 2.09025991e-04 2.89400351e-04
3.77124735e-04 4.63193491e-04 5.39246590e-04 6.22192168e-04
7.03505639e-04 7.75298863e-04 -2.01875984e-04 9.30157920e-04
-5.76584966e-05 1.59295034e-05 8.08012121e-05 1.51379342e-04
2.20383942e-04 2.81148660e-04 3.47183293e-04 4.11664999e-04
-5.85919853e-04 -5.24369726e-04 -4.64352721e-04 -4.11642743e-04
-3.54520443e-04 -2.98912259e-04 -2.50154195e-04 -1.97405361e-04
-1.46152432e-04 -1.01298756e-04 -5.28713359e-05 -1.05509367e-05
3.50723226e-05 7.92280634e-05 1.17718164e-04 -8.94084909e-04
-8.54153425e-04 -8.19451625e-04 -7.82263155e-04 -7.46510819e-04
-7.15557404e-04 -6.82519783e-04 -6.50903801e-04 -6.23660938e-04
-5.94732888e-04 -5.69901563e-04 5.09541266e-04 -5.18787274e-04
-4.97608457e-04 -4.75397944e-04 -4.54574454e-04 6.16170144e-04
6.34369460e-04 6.51193332e-04 6.65161962e-04 6.79382903e-04
6.92239181e-04 7.02645966e-04 7.12919040e-04 7.21837433e-04
7.28708431e-04 7.35061830e-04 7.39629406e-04 7.43428919e-04
-3.07297461e-04 7.46958864e-04 7.46880284e-04 7.45469661e-04
7.43063292e-04 7.39128670e-04 -3.19316915e-04 -3.25181546e-04
7.20233508e-04 7.11143871e-04 7.01837339e-04 6.90247525e-04
6.78693826e-04 6.64610321e-04 6.49216731e-04 6.34243638e-04
6.16365002e-04 5.97180431e-04 5.78798777e-04 5.57136288e-04
5.34171219e-04 5.12389754e-04 4.86952378e-04 4.60214976e-04
4.35040369e-04 4.05834757e-04 3.78439674e-04 3.46767714e-04
3.13798203e-04 2.83016440e-04 2.47582168e-04 2.10850784e-04
1.76683478e-04 1.37487404e-04 9.69938540e-05 5.94400641e-05
1.64803804e-05 -2.77779379e-05 -6.87212380e-05 -1.15448651e-04
-1.63476655e-04 -2.07814574e-04 -2.58316150e-04 -3.04881898e-04
-3.57860800e-04 -4.12145285e-04 -4.62118682e-04 -5.18887480e-04
-5.76965937e-04 -6.30357620e-04 -6.90928891e-04 -7.52814695e-04
-8.09637384e-04 -8.74026019e-04 -9.39734858e-04 -1.00000336e-03
-1.39302040e-05 -7.64653255e-05 -1.47211271e-04 -2.19288563e-04
-2.85298568e-04 -3.59912644e-04 -4.35865855e-04 -5.05371076e-04
-5.83876630e-04 -6.63729907e-04 -7.36752757e-04 -8.19175452e-04
-9.02955255e-04 -9.79520230e-04 -1.06588804e-03 -1.15362314e-03
-1.23375682e-03 -2.68690973e-04 -3.51178179e-04 -4.44143508e-04
-5.38494735e-04 -6.24599214e-04 -7.21595167e-04 -8.19989322e-04
-9.09743181e-04 -1.01080619e-03 -1.11328051e-03 -1.20671793e-03
-1.31188675e-03 -1.41848077e-03 -4.59113905e-04 -5.68429590e-04
-6.68044666e-04 -7.80100637e-04 -8.93606563e-04 -9.97006096e-04
-1.11328198e-03 -1.23102384e-03 -2.80608069e-04 -4.01151072e-04
-5.23176860e-04 -6.34272793e-04 -7.59132433e-04 -8.85492469e-04
5.82568375e-05 -7.09712713e-05 -2.01718186e-04 -3.20694386e-04
-4.54345109e-04 4.83937944e-04 3.47359177e-04 2.09229380e-04
8.35806570e-05 -5.75154297e-05 -2.00183075e-04 7.31074418e-04
5.85400722e-04 4.38134142e-04 1.36636107e-03 1.21604716e-03
1.06411824e-03 9.25994929e-04 1.83424021e-03 1.69332288e-03
1.53518486e-03 2.43978952e-03 2.29455679e-03 2.13160111e-03
3.03249801e-03 2.88288661e-03 2.71504221e-03 3.61216191e-03
3.45810648e-03 4.35310574e-03 4.17857074e-03 5.08895105e-03
4.91110676e-03 5.81963759e-03 5.63845053e-03 6.52672784e-03
6.36053995e-03 7.24657091e-03 8.13195214e-03 7.96106363e-03
8.84414958e-03 9.72656200e-03 9.55089781e-03 1.04309645e-02
1.13103332e-02 1.22091471e-02 1.20067872e-02 1.28830348e-02
1.37792517e-02 1.46542196e-02 1.55495062e-02 1.64231655e-02
1.72960620e-02 1.81898177e-02 1.90613600e-02 2.10232224e-02
2.19165774e-02 2.27871255e-02 2.47527537e-02 2.56456629e-02
2.76146667e-02 2.95864701e-02 3.04801022e-02 3.24552956e-02
3.44570839e-02 3.64381330e-02 3.73090546e-02 3.93176951e-02
4.01883136e-02 3.99413472e-02 3.97172410e-02 3.83507327e-02
3.69832945e-02 3.45288224e-02 3.31609323e-02 3.06840301e-02
2.71317309e-02 2.46628156e-02 2.21965029e-02 2.08567884e-02
1.94892933e-02 1.81480845e-02 1.78733224e-02 1.75962456e-02
1.62501951e-02 1.59686819e-02 1.67795042e-02 1.65219970e-02
1.62336140e-02 1.59428341e-02 1.56790710e-02 1.53836971e-02
1.50858840e-02 1.48157546e-02 1.45132663e-02 1.53347956e-02
1.39316877e-02 1.36219595e-02 1.33410446e-02 1.30265037e-02
1.27094074e-02 1.24218231e-02 1.20998289e-02 1.06805433e-02
1.03861716e-02 1.00565924e-02 9.72436664e-03 8.32959359e-03
7.99229514e-03 7.68642420e-03 6.25169507e-03 5.90654091e-03
5.59355915e-03 5.24318304e-03 4.89003437e-03 3.47870860e-03
3.12024578e-03 2.75896150e-03 2.43137920e-03 2.06468706e-03
1.69512373e-03 1.36004754e-03 9.84981135e-04 6.06993019e-04
2.64291109e-04 -1.19296827e-04 -4.67067393e-04 -8.56319352e-04
-1.57470803e-04 -5.13089904e-04 -9.11112209e-04 -1.31219422e-03
-5.83499839e-04 -9.90445890e-04 -1.40050508e-03 -6.78741650e-04
-1.09476716e-03 -4.19269184e-04 -7.99266490e-04 -1.28638967e-04
-5.14130274e-04 1.51560600e-04 -2.83100227e-04 4.21200445e-04
1.07979970e-03 6.35578391e-04 1.33364405e-03 1.98499815e-03
1.53105139e-03 2.22274354e-03 1.76233437e-03 1.29849487e-03
1.98245206e-03 1.51203930e-03 1.03813746e-03 6.08625763e-04
1.28038297e-04 -3.07523898e-04 -7.94871439e-04 -1.28580703e-03
-1.73073413e-03 -2.22854468e-03 -2.73000414e-03 -2.07887167e-03
-2.58732249e-03 -1.99267690e-03 -2.45681242e-03 -1.86804972e-03
-1.71336659e-04 4.66408985e-04 2.16330903e-03 2.79823358e-03
3.37734816e-03 3.95383298e-03 5.70282896e-03 6.27564610e-03
5.72281539e-03 6.34484289e-03 5.78445904e-03 5.22006708e-03
4.70866859e-03 3.01363377e-03 2.43748942e-03 7.93751865e-04
-9.10645379e-04 -2.55893384e-03 -4.26871417e-03 -4.86473696e-03
-5.40475552e-03 -6.00879559e-03 -5.49914640e-03 -4.93107329e-03
-4.42706670e-03 -3.92612623e-03 -3.36556562e-03 -2.87038286e-03
-1.25156694e-03 -6.97404716e-04 -2.09949744e-04 1.40618052e-03
1.95380580e-03 2.43337333e-03 2.97583880e-03 3.44934833e-03
3.91956988e-03 4.45395838e-03 4.91800203e-03 4.23648918e-03
4.76133123e-03 4.07090402e-03 3.37574816e-03 2.74604376e-03
2.04183294e-03 1.33281906e-03 1.83408931e-03 1.11587836e-03
4.65318351e-04 -2.62183596e-04 -9.94613493e-04 -1.65803553e-03
-2.39990105e-03 -2.00195122e-03 -2.67843498e-03 -2.28875480e-03
-3.05028833e-03 -2.59258856e-03 -2.21508630e-03 -1.84142275e-03
-1.39322682e-03 -1.02679037e-03 -6.64262378e-04 9.30989361e-04
1.28749758e-03 1.72095891e-03 2.07002683e-03 3.57853978e-03
4.00338438e-03 4.34221377e-03 3.50941007e-03 3.92274433e-03
3.07950391e-03 3.39963667e-03 2.63098462e-03 1.77161722e-03
9.06633181e-04 1.23321618e-04 -7.52413122e-04 -3.75171969e-04
-1.26176158e-03 -2.15410634e-03 -1.79051506e-03 -1.52085428e-03
-2.43005406e-03 -2.07895302e-03 -1.82355060e-03 -2.74985271e-03
-2.41145220e-03 -2.17054397e-03 -1.93425688e-03 -4.24643055e-04
-1.95669324e-04 2.86093317e-05 3.45181395e-04 5.60606434e-04]
How would you integrate the curve from x = 2672.6 to 30005.3 in Python?
You can start out by finding the indices of your x array that are within your integral limits:
idx = np.where((np.array(x)>=2672.6) & (np.array(x)<=30005.3))[0]
And then either using np.trapz to integrate using the trapezoidal rule:
np.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
or one of scipy's integration methods for integrating with fixed samples:
# same as numpy.trapz
sp.integrate.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
# example using simpson's rule
sp.integrate.simps(x=np.array(x)[idx],y=np.array(y)[idx])
output:
import scipy as sp
import numpy as np
idx = np.where((np.array(x)>=2672.6) & (np.array(x)<=30005.3))[0]
>>> np.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
1.4913432492153544
>>> sp.integrate.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
1.4913432492153544
>>> sp.integrate.simps(x=np.array(x)[idx],y=np.array(y)[idx])
1.4892436835956682
Representing the integral:
Note, from your data, I suspect you meant the upper limit to be 3005.3 rather than 30005.3, but that's for you to decide :-)

Categories