<div dir="ltr">Hi All,<div><br></div><div>I've been running into an issue from the combined usage of the "get_isolines" and "area_poly_sphere" functions. First, I'm using get_isolines to isolate a contour that completes loop around some location on the globe. Then I want to find the area within that contour.</div><div><br></div><div>What I've noticed is that occasionally (not always) the get_isolines function will find a contour with multiple identical lat,lon pairs for the given contour. This is problematic for the area_poly_sphere code which requires unique vertex points as far as I can tell.</div><div><br></div><div>Is there anyway to avoid get_isolines from providing identical lat,lon points for a unique contour? If not, is there a function I could use to remove non-unique lat,lon pairs? </div><div><br></div><div>Here is a print out snippet of the relevant get_isolines output of what I'm trying to avoid (see index values 212,213). </div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Variable: x</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Type: float</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Total Size: 2452 bytes</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">            </span>613 values</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 1</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>[points | 613]</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Coordinates:<span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 5</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>n_points :<span class="gmail-Apple-tab-span" style="white-space:pre">       </span>( 4, 613, 29, 7, 21, 41, 38, 45, 29 )</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>start_point :<span class="gmail-Apple-tab-span" style="white-space:pre">    </span>( 0, 4, 617, 646, 653, 674, 715, 753, 798 )</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>segment_count :<span class="gmail-Apple-tab-span" style="white-space:pre">  </span>9</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>level :<span class="gmail-Apple-tab-span" style="white-space:pre">  </span> 2</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>_FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">     </span>9.96921e+36</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(211)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>17.06323</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(212)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>16</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(213)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>16</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(214)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>14.94309</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(215)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>13.88631</span></p></div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Variable: y</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Type: float</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Total Size: 2452 bytes</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">            </span>613 values</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 1</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>[points | 613]</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Coordinates:<span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 5</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>n_points :<span class="gmail-Apple-tab-span" style="white-space:pre">       </span>( 4, 613, 29, 7, 21, 41, 38, 45, 29 )</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>start_point :<span class="gmail-Apple-tab-span" style="white-space:pre">    </span>( 0, 4, 617, 646, 653, 674, 715, 753, 798 )</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>segment_count :<span class="gmail-Apple-tab-span" style="white-space:pre">  </span>9</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>level :<span class="gmail-Apple-tab-span" style="white-space:pre">  </span> 2</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">  </span>_FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">     </span>9.96921e+36</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(211)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>69.65783</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(212)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>69.83716</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(213)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>69.83716</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(214)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>70.0269</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(215)<span class="gmail-Apple-tab-span" style="white-space:pre">      </span>70.21735</span></p></div><div><br clear="all"><div>It seems like the code is outputting an unnecessary extra lat,lon pair at 69.83716 N, 16E. Why does this happen, and how can I avoid this for accurate spherical area calculations?</div><div><br></div><div>Thanks,</div><div>Philippe</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br></div><div><div style="font-size:12.8px">-------------------------------------</div><div style="font-size:12.8px">Philippe P. Papin, Ph.D.<br><div><div style="font-size:13px">NRC Research Associate</div><div style="font-size:13px">Global Modeling Division</div><div style="font-size:13px">Naval Research Laboratory - Monterey, CA </div></div></div><div style="font-size:12.8px"><font color="#222222" face="arial, sans-serif"><a href="http://www.atmos.albany.edu/student/ppapin/" target="_blank">http://www.atmos.albany.edu/student/ppapin/</a></font></div></div></div></div></div></div></div>