# Rectangle Shape - CenterPoint Exception

**URL:** <https://community.thinkgeo.com/t/rectangle-shape-centerpoint-exception/622>\
**Category:** WinForms\
**Created:** [August 18, 2009, 7:14am UTC](https://community.thinkgeo.com/t/rectangle-shape-centerpoint-exception/622 "2009-08-18T07:14:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldi](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@ldi](https://community.thinkgeo.com/u/ldi)\
**Post date:** [August 18, 2009, 7:14am UTC](https://community.thinkgeo.com/t/rectangle-shape-centerpoint-exception/622/1 "2009-08-18T07:14:41Z")

</div>

when&nbsp;calling&nbsp;GetCenterPoint

The&nbsp;shape&nbsp;you&nbsp;provided&nbsp;does&nbsp;not&nbsp;pass&nbsp;our&nbsp;simple&nbsp;validation.

The&nbsp;Shape&nbsp;is&nbsp;contructed&nbsp;as

&nbsp;

&nbsp;

new&nbsp;RectangleShape(new&nbsp;PointShape(longitude,&nbsp;latidude),&nbsp;new&nbsp;PointShape(longitude&nbsp;+&nbsp;longStep,&nbsp;latidude&nbsp;+&nbsp;latStep)));.

&nbsp;

CalculateGridCellValue(

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 19, 2009, 2:25am UTC](https://community.thinkgeo.com/t/rectangle-shape-centerpoint-exception/622/2 "2009-08-19T02:25:59Z")

</div>

Lars,&nbsp;  
&nbsp;&nbsp;  
&nbsp;When&nbsp;you&nbsp;use&nbsp;the&nbsp;following&nbsp;constructor,&nbsp;it&nbsp;should&nbsp;follow:&nbsp;  
&nbsp;longStep&nbsp;\>&nbsp;0&nbsp;  
&nbsp;LatStep&nbsp;\<&nbsp;0&nbsp;  
&nbsp;&nbsp;  
&nbsp;Because&nbsp;the&nbsp;first&nbsp;parameter&nbsp;should&nbsp;be&nbsp;upper&nbsp;left&nbsp;point&nbsp;and&nbsp;the&nbsp;second&nbsp;parameter&nbsp;should&nbsp;be&nbsp;lower&nbsp;right&nbsp;Point.&nbsp;The&nbsp;Y&nbsp;axis&nbsp;direction&nbsp;should&nbsp;be&nbsp;from&nbsp;south&nbsp;to&nbsp;north.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;
