title: How do I Convert A GeoJSON List of Coordinate Pairs from Polygons to MultiPolygons?
body: <p>this is my first SO question so bare with me on it. I'll follow up with any questions you may have about the dataset.
  Essentially, I'm trying to export Polygons from a GeoJSON format in Python to MultiPolygons. I'm not dealing with inner rings in this situation and instead, only dealing with separate polygons that are part of the same feature.
  The first coordinate pair matches one halfway down the list which should be the closing vertex to create the full polygon. However, when I try to build the geoJSON using MultiPolygon, it's not catching the closing vertex. Do I need to create another array within my GeoJSON template? Here is what I'm dealing with below:</p>
  <p>{
  &quot;type&quot;: &quot;Feature&quot;,
  &quot;geometry&quot;: {
  &quot;type&quot;: &quot;MultiPolygon&quot;,
  &quot;coordinates&quot;: [
  [
  [<strong>-79.61123945099996, 43.721808245000034</strong>],
  [-79.611124366999945, 43.721691027000077],
  [-79.611111266999956, 43.721694136000053],
  [-79.610997192999946, 43.721733924000034],
  [-79.610645108999961, 43.720953449000035],
  [-79.610625742999957, 43.720910504000074],
  [-79.610741060999942, 43.720873686000061],
  [-79.611097236999967, 43.720819664000032],
  [-79.611695669999961, 43.720768816000032],
  [-79.612286291999965, 43.720682416000045],
  [-79.612399453999956, 43.720661620000044],
  [-79.612447630999952, 43.720659502000046],
  [-79.612449305999974, 43.720659671000078],
  [-79.612518532999957, 43.720684950000077],
  [-79.612550815999953, 43.720725478000077],
  [-79.612667530999943, 43.721042800000077],
  [-79.612668964999955, 43.721046741000066],
  [-79.612714036999989, 43.721241834000068],
  [-79.612751350999986, 43.72160154900007],
  [-79.612755080999989, 43.721637452000039],
  [-79.612829431999955, 43.722354263000057],
  [-79.61287638899995, 43.722567384000058],
  [-79.612971460999972, 43.722771906000048],
  [-79.613108203999957, 43.722957862000044],
  [-79.613008290999971, 43.723004443000036],
  [-79.612832364999974, 43.722949827000036],
  [-79.612752433999958, 43.722923586000036],
  [-79.612715561999948, 43.722878643000058],
  [-79.612640133999946, 43.722864064000078],
  [-79.612008116999959, 43.722635037000032],
  [-79.611981008999976, 43.722568023000065],
  [-79.611852546999955, 43.722379942000032],
  [-79.611754976999975, 43.722264966000068],
  [-79.611650385999951, 43.722124983000072],
  [-79.611588353999934, 43.722038821000069],
  [-79.611438002999989, 43.721918874000039],
  [-79.611354559999938, 43.721864904000029],
  [<strong>-79.61123945099996, 43.721808245000034</strong>],
  [-79.615005153999959, 43.724676721000037],
  [-79.614956217999975, 43.724542822000046],
  [-79.614920367999957, 43.724397802000055],
  [-79.614873232999969, 43.724168390000045],
  [-79.61472165899994, 43.724021132000075],
  [-79.614834790999964, 43.723927020000076],
  [-79.614880248999953, 43.723941177000029],
  [-79.614923543999964, 43.723954029000026],
  [-79.614982076999979, 43.723969650000072],
  [-79.615041339999948, 43.723983777000058],
  [-79.615101232999962, 43.723996394000039],
  [-79.615161704999934, 43.724007486000062],
  [-79.615222671999959, 43.724017047000075],
  [-79.615284063999979, 43.724025060000031],
  [-79.615330376999964, 43.724029862000066],
  [-79.61537872699995, 43.72403419300008],
  [-79.61543889699999, 43.724038243000052],
  [-79.615501171999938, 43.724040768000066],
  [-79.615547951999986, 43.724041441000054],
  [-79.615596668999956, 43.724041465000028],
  [-79.615657069999941, 43.724040169000034],
  [-79.615717355999948, 43.724037181000028],
  [-79.615781303999938, 43.724032256000044],
  [-79.615845061999948, 43.724026136000077],
  [-79.615904626999964, 43.724018758000057],
  [-79.616584333999981, 43.723920345000067],
  [-79.616839888999948, 43.723883298000032],
  [-79.616978991999986, 43.723869196000066],
  [-79.619369596999945, 43.723581859000035],
  [-79.620139676999941, 43.723821041000065],
  [-79.620781493999971, 43.724517952000042],
  [-79.621407588999944, 43.725198202000058],
  [-79.621686516999944, 43.725501395000038],
  [-79.618419291999942, 43.724604442000043],
  [-79.617135858999973, 43.725052291000054],
  [-79.617083434999984, 43.725070585000026],
  [-79.61603138199996, 43.725437648000025],
  [-79.615738510999961, 43.725602405000075],
  [-79.615400602999955, 43.725349885000071],
  [-79.615304545999948, 43.725168104000034],
  [-79.615104679999945, 43.724976768000033],
  [-79.615124720999972, 43.724813159000064],
  [-79.615070066999976, 43.724758973000064],
  [-79.615005153999959, 43.724676721000037],
  [-79.623669575999941, 43.725848943000074],
  [-79.623743787999956, 43.725826005000044],
  [-79.624186404999989, 43.726580879000039],
  [-79.624463924999986, 43.727002028000072],
  [-79.624285701999952, 43.727021382000032],
  [-79.624018738999951, 43.727050384000052],
  [-79.623825425999939, 43.727071382000076],
  [-79.62378160999998, 43.727082755000026],
  [-79.623637867999946, 43.727120036000031],
  [-79.623509544999933, 43.727153312000041],
  [-79.623381234999954, 43.72718659700007],
  [-79.623252910999952, 43.727219873000081],
  [-79.623216339999942, 43.727229355000077],
  [-79.623124721999943, 43.727245596000046],
  [-79.623001500999976, 43.727267443000073],
  [-79.622888565999972, 43.72728451200004],
  [-79.622755914999971, 43.727274527000077],
  [-79.62265049399997, 43.727266586000042],
  [-79.622538539999937, 43.727256308000051],
  [-79.622408045999975, 43.727212105000035],
  [-79.622229310999955, 43.727151564000053],
  [-79.622248877999937, 43.727111707000063],
  [-79.622263625999949, 43.727082670000073],
  [-79.622277691999955, 43.727053454000043],
  [-79.622291036999968, 43.72702405900003],
  [-79.622303685999952, 43.726994503000071],
  [-79.622315614999934, 43.726964794000025],
  [-79.622326824999959, 43.726934933000052],
  [-79.622338731999946, 43.726900814000032],
  [-79.622349191999945, 43.726868388000071],
  [-79.622358880999968, 43.726835838000056],
  [-79.622367774999987, 43.726803171000029],
  [-79.622375887999965, 43.726770388000034],
  [-79.622383205999938, 43.726737516000071],
  [-79.622389728999963, 43.726704555000026],
  [-79.622395469999958, 43.726671513000042],
  [-79.622400403999961, 43.726638401000059],
  [-79.622404543999949, 43.726605235000079],
  [-79.622407889999977, 43.726572025000053],
  [-79.622410427999966, 43.726538771000037],
  [-79.62241217199994, 43.726505491000069],
  [-79.622413108999979, 43.726472203000071],
  [-79.622413251999944, 43.726438898000026],
  [-79.622412587999975, 43.726405602000057],
  [-79.622411116999956, 43.726372317000028],
  [-79.622408851999978, 43.726339059000054],
  [-79.622407534999979, 43.726286784000081],
  [-79.622428166999953, 43.726248370000064],
  [-79.622463919999973, 43.726223299000026],
  [-79.623669575999941, 43.725848943000074],
  [-79.590143053999952, 43.733536012000059],
  [-79.589877036999951, 43.732977982000079],
  [-79.589422870999954, 43.732025230000033],
  [-79.589077131999943, 43.731262783000034],
  [-79.58881534599999, 43.730685459000028],
  [-79.588749829999983, 43.730540974000064],
  [-79.588557912999988, 43.730117728000039],
  [-79.588347799999951, 43.72964554400005],
  [-79.587946346999956, 43.728743347000034],
  [-79.587674297999968, 43.72813194400004],
  [-79.587660789999973, 43.728069386000072],
  [-79.587879613999974, 43.727916815000071],
  [-79.588117873999977, 43.727714109000033],
  [-79.588417815999946, 43.727515856000025],
  [-79.588678156999947, 43.727295130000073],
  [-79.588891212999954, 43.727101443000038],
  [-79.589176422999969, 43.726912201000061],
  [-79.589411591999976, 43.726722997000081],
  [-79.589624275999938, 43.726542810000069],
  [-79.589902048999988, 43.726313067000035],
  [-79.590172171999939, 43.726155338000069],
  [-79.59046755899999, 43.726033593000068],
  [-79.590759113999979, 43.725943355000027],
  [-79.591055751999988, 43.725880114000063],
  [-79.591341200999977, 43.725857388000065],
  [-79.59171977699998, 43.725857087000065],
  [-79.59204161599996, 43.725789320000047],
  [-79.592147134999948, 43.725546204000068],
  [-79.592185091999966, 43.725258135000047],
  [-79.592136869999933, 43.724925133000056],
  [-79.592117752999968, 43.724601109000048],
  [-79.592248409999968, 43.724312968000049],
  [-79.592536569999936, 43.72404270100003],
  [-79.592916036999952, 43.723875873000054],
  [-79.593311446999962, 43.723736034000069],
  [-79.59372088899994, 43.723641188000045],
  [-79.593929353999954, 43.723571058000061],
  [-79.594150032999949, 43.723496817000068],
  [-79.594559896999954, 43.723424469000065],
  [-79.594919728999969, 43.723356663000061],
  [-79.595249867999939, 43.723396893000029],
  [-79.595362766999983, 43.723414801000047],
  [-79.595510366999974, 43.723457334000045],
  [-79.595674302999953, 43.72346404700005],
  [-79.595982335999963, 43.723504293000076],
  [-79.596257938999941, 43.723639079000066],
  [-79.596556866999947, 43.723805347000052],
  [-79.596835927999962, 43.72391762500007],
  [-79.59708825499996, 43.724047928000061],
  [-79.597342590999972, 43.724218733000043],
  [-79.59756396399996, 43.724394066000059],
  [-79.597710776999975, 43.724515456000063],
  [-79.597866566999983, 43.72466834100004],
  [-79.598065043999952, 43.724834693000048],
  [-79.598277493999944, 43.725005532000068],
  [-79.598417133999988, 43.725243944000056],
  [-79.598452032999944, 43.725473444000045],
  [-79.598468744999934, 43.725729964000038],
  [-79.598358194999946, 43.725964090000048],
  [-79.598277086999985, 43.726175688000069],
  [-79.598190196999951, 43.726409793000073],
  [-79.598196771999937, 43.726634817000047],
  [-79.598276591999934, 43.726819274000036],
  [-79.598449117999962, 43.727003650000029],
  [-79.598567340999978, 43.727188073000036],
  [-79.598674358999972, 43.727399509000065],
  [-79.598896904999947, 43.727570340000057],
  [-79.599135258999979, 43.727682648000041],
  [-79.599420919999943, 43.727785916000073],
  [-79.599736637999968, 43.727767638000046],
  [-79.600065511999958, 43.727731344000063],
  [-79.600229926999987, 43.727692672000046],
  [-79.600304975999961, 43.727678686000047],
  [-79.600365205999935, 43.727667461000067],
  [-79.598216763999972, 43.72274630000004],
  [-79.598097648999953, 43.722485370000072],
  [-79.597966050999958, 43.722179443000073],
  [-79.597264989999985, 43.720627347000061],
  [-79.596929466999939, 43.719895898000061],
  [-79.59638446799994, 43.718638844000054],
  [-79.596363832999941, 43.718589355000063],
  [-79.595825032999983, 43.717320649000044],
  [-79.597088707999944, 43.717639119000069],
  [-79.598985597999956, 43.718114546000038],
  [-79.599052254999947, 43.718126553000047],
  [-79.599293198999987, 43.718169302000035],
  [-79.603459526999984, 43.719159182000055],
  [-79.603518113999939, 43.71917263000006],
  [-79.60637232199997, 43.719830926000043],
  [-79.606962383999985, 43.719957027000078],
  [-79.607071192999967, 43.71997996500005],
  [-79.60791878699996, 43.720158646000073],
  [-79.608869738999942, 43.720358138000051],
  [-79.608259912999983, 43.723234053000056],
  [-79.608728203999988, 43.72656680800003],
  [-79.608792042999937, 43.726662336000061],
  [-79.61088495599995, 43.729793959000062],
  [-79.609831260999954, 43.731259124000076],
  [-79.609160041999985, 43.732202352000058],
  [-79.609614861999944, 43.732646676000059],
  [-79.609684148999975, 43.732706076000056],
  [-79.609814799999981, 43.732949215000076],
  [-79.609881000999962, 43.733031614000026],
  [-79.609923428999934, 43.733090720000064],
  [-79.610013352999943, 43.733292708000079],
  [-79.610018214999968, 43.733431083000028],
  [-79.610017536999976, 43.733647063000035],
  [-79.610013875999982, 43.733672502000047],
  [-79.609991959999945, 43.733749015000058],
  [-79.609901151999964, 43.73409821100006],
  [-79.60671806199997, 43.733724609000035],
  [-79.606307451999953, 43.733662760000072],
  [-79.605800133999935, 43.733663232000026],
  [-79.605324607999989, 43.733709654000052],
  [-79.604722310999989, 43.733790677000059],
  [-79.603242852999983, 43.734131228000081],
  [-79.603203392999944, 43.734142349000081],
  [-79.60308510699997, 43.734172131000037],
  [-79.602139439999974, 43.734382274000041],
  [-79.601148973999955, 43.734602324000036],
  [-79.601001362999966, 43.734635118000028],
  [-79.600729718999958, 43.734696826000061],
  [-79.599835901999938, 43.734899865000045],
  [-79.599163572999942, 43.735052578000079],
  [-79.598873517999948, 43.735118109000041],
  [-79.598185026999943, 43.735273653000036],
  [-79.597542266999938, 43.735422168000071],
  [-79.597326344999942, 43.735472057000038],
  [-79.597005399999944, 43.735546211000042],
  [-79.595894882999971, 43.735802788000058],
  [-79.595142796999937, 43.735976543000049],
  [-79.594956037999964, 43.736019689000045],
  [-79.594232162999958, 43.736187912000048],
  [-79.593990924999957, 43.736243972000068],
  [-79.592446876999986, 43.736602771000037],
  [-79.591701754999974, 43.736775955000041],
  [-79.59140380499997, 43.736140678000027],
  [-79.590881481999986, 43.735032664000073],
  [-79.590744856999947, 43.734749703000034],
  [-79.590517734999935, 43.734301714000026],
  [-79.590445510999984, 43.73415946800003],
  [-79.590370858999961, 43.734013858000026],
  [-79.590143053999952, 43.733536012000059],
  [-79.59449, 43.73129]
  ]
  ]
  },
  &quot;properties&quot;: { &quot;number&quot;: 3 }
  }</p>
  <p>In bold, you'll see the coordinate pairs that should create the closed polygon. Should Pyplt be able to detect MultiPolygons by this same pair of coordinate pairs? If not, how should I go about creating my GeoJSON to detect MultiPolygons? Below is what I'm using to create the GeoJSON loop for each feature:</p>
  <pre><code>geojson = {&quot;type&quot;: &quot;FeatureCollection&quot;,&quot;features&quot;: []}
  
  for _, row in df3.iterrows():
      feature = {&quot;type&quot;: &quot;Feature&quot;, &quot;geometry&quot;: {&quot;type&quot;: &quot;MultiPolygon&quot;, &quot;coordinates&quot;: [row['coordinates']]}, &quot;properties&quot;:{&quot;school&quot;: row['School']}}
      geojson['features'].append(feature)
  </code></pre>
  <p>Thanks for any help at all on this!</p>