# Contour Problem

**URL:** <https://community.thinkgeo.com/t/contour-problem/3462>\
**Category:** WPF\
**Created:** [July 11, 2013, 4:21pm UTC](https://community.thinkgeo.com/t/contour-problem/3462 "2013-07-11T16:21:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Behnam](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@Behnam](https://community.thinkgeo.com/u/Behnam)\
**Post date:** [July 11, 2013, 4:21pm UTC](https://community.thinkgeo.com/t/contour-problem/3462/1 "2013-07-11T16:21:04Z")

</div>

Hi,  
  
  
  
I&nbsp;attached&nbsp;my&nbsp;origin&nbsp;points&nbsp;and&nbsp;the&nbsp;grid&nbsp;which&nbsp;I&nbsp;have&nbsp;been&nbsp;created&nbsp;based&nbsp;on&nbsp;then(I&nbsp;assigned&nbsp;a&nbsp;random&nbsp;number&nbsp;between&nbsp;0-10&nbsp;to&nbsp;all&nbsp;points&nbsp;as&nbsp;value).  
  
I’m&nbsp;trying&nbsp;to&nbsp;read&nbsp;isoFeatures&nbsp;inside&nbsp;grid&nbsp;file&nbsp;using&nbsp;below&nbsp;code:

> `List<``double``> isoLineBreaks = `&nbsp;new&nbsp;List\<double\>()&nbsp;{&nbsp;10&nbsp;};&nbsp;  
> `           ``var gridFeatureSource = new GridFeatureSource("0.grid");`  
> `               ``gridFeatureSource.Open();`  
> `               ``Collection<``Feature``> isoFeatures = IsoLineLayer.GetIsoFeatures(gridFeatureSource.GenerateGridMatrix(),`  
> `   ``isoLineBreaks, "GridCellValue",``                                     ``IsoLineType.ClosedLinesAsPolygons);`  
> `             `&nbsp;

  
it&nbsp;keap&nbsp;return&nbsp;back&nbsp;only&nbsp;one&nbsp;feature&nbsp;which&nbsp;is&nbsp;one&nbsp;big&nbsp;rectangle&nbsp;similar&nbsp;to&nbsp;extent&nbsp;of&nbsp;origin&nbsp;points.  
  
could&nbsp;you&nbsp;please&nbsp;help&nbsp;me&nbsp;to&nbsp;find&nbsp;the&nbsp;problem?  
  
  
  
  
  
[orignANDgrid.zip](https://community.thinkgeo.com/uploads/default/original/1X/8dce762685a1c8b4f7dac722bcf92ff4b9f987c9.zip) (3.32 KB)

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [July 15, 2013, 2:27am UTC](https://community.thinkgeo.com/t/contour-problem/3462/2 "2013-07-15T02:27:22Z")

</div>

Hi&nbsp;Ben,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;&nbsp;  
&nbsp;Based&nbsp;on&nbsp;your&nbsp;data,&nbsp;there&nbsp;should&nbsp;return&nbsp;0&nbsp;isoFeatures&nbsp;rather&nbsp;a&nbsp;"big&nbsp;rectangle&nbsp;similar&nbsp;to&nbsp;extent&nbsp;of&nbsp;origin&nbsp;points"&nbsp;  
&nbsp;&nbsp;  
&nbsp;now,&nbsp;it&nbsp;has&nbsp;been&nbsp;fixed,&nbsp;would&nbsp;you&nbsp;please&nbsp;get&nbsp;the&nbsp;latest&nbsp;version&nbsp;7.0.35.0&nbsp;or&nbsp;7.0.0.35&nbsp;and&nbsp;try&nbsp;it&nbsp;again.if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Hope&nbsp;it&nbsp;helps&nbsp;  
&nbsp;&nbsp;  
&nbsp;Summer

---

<div class="post-metadata">

**Author:** ![Behnam](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@Behnam](https://community.thinkgeo.com/u/Behnam)\
**Post date:** [July 15, 2013, 4:20am UTC](https://community.thinkgeo.com/t/contour-problem/3462/3 "2013-07-15T04:20:14Z")

</div>

`Posted By Summer on 07-15-2013 02:27 AMBased on your data, there should return 0 isoFeatures rather a "big rectangle similar to extent of origin points" `if&nbsp;you&nbsp;look&nbsp;at&nbsp;grid&nbsp;file&nbsp;you&nbsp;can&nbsp;see&nbsp;3&nbsp;area&nbsp;on&nbsp;it,&nbsp;so&nbsp;why&nbsp;you&nbsp;think&nbsp;it&nbsp;should&nbsp;return&nbsp;0&nbsp;isoFeature?  
  
  
  
Regards,  
  
Ben

---

<div class="post-metadata">

**Author:** ![Summer1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Summer1](https://community.thinkgeo.com/u/Summer1)\
**Post date:** [July 16, 2013, 4:55am UTC](https://community.thinkgeo.com/t/contour-problem/3462/4 "2013-07-16T04:55:22Z")

</div>

Hi&nbsp;Ben,  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;query,&nbsp;please&nbsp;correct&nbsp;me&nbsp;if&nbsp;I&nbsp;am&nbsp;wrong,&nbsp;did&nbsp;you&nbsp;think&nbsp;that&nbsp;the&nbsp;"10"&nbsp;in&nbsp;"List\<double\>&nbsp;isoLineBreaks&nbsp;=&nbsp;&nbsp;new&nbsp;List()&nbsp;{&nbsp;10&nbsp;};"&nbsp;means&nbsp;to&nbsp;return&nbsp;all&nbsp;isolines&nbsp;which&nbsp;is&nbsp;under&nbsp;10?&nbsp;if&nbsp;so,&nbsp;"10"&nbsp;didn’t&nbsp;mean&nbsp;it,&nbsp;"10"&nbsp;means&nbsp;it&nbsp;will&nbsp;return&nbsp;lines&nbsp;which&nbsp;holds&nbsp;the&nbsp;value&nbsp;which&nbsp;equals&nbsp;to&nbsp;10&nbsp;rather&nbsp;smaller&nbsp;than&nbsp;10,&nbsp;in&nbsp;your&nbsp;data&nbsp;there&nbsp;is&nbsp;no&nbsp;a&nbsp;line&nbsp;that&nbsp;could&nbsp;hold&nbsp;the&nbsp;value&nbsp;10,&nbsp;so&nbsp;the&nbsp;returned&nbsp;polygon&nbsp;count&nbsp;is&nbsp;0.&nbsp;Actually,&nbsp;if&nbsp;you&nbsp;use&nbsp;“"List\<double\>&nbsp;isoLineBreaks&nbsp;=&nbsp;&nbsp;new&nbsp;List()&nbsp;{&nbsp;2,4,6,8&nbsp;};”&nbsp;then,&nbsp;the&nbsp;polygons&nbsp;that&nbsp;hold&nbsp;value&nbsp;2,4,6,8&nbsp;will&nbsp;be&nbsp;returned&nbsp;like&nbsp;the&nbsp;following&nbsp;picture:&nbsp;

 ![](https://community.thinkgeo.com/uploads/default/original/2X/1/16004858fe85a1b4514f1736156dbc2410e41147.PNG)  
  
Hope&nbsp;it&nbsp;helps  
  
  
  
Summer
