# Is a point inside a 4 point polygon?

**URL:** <https://community.cesium.com/t/is-a-point-inside-a-4-point-polygon/4070>\
**Category:** CesiumJS\
**Created:** [May 2, 2016, 3:32pm UTC](https://community.cesium.com/t/is-a-point-inside-a-4-point-polygon/4070 "2016-05-02T15:32:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravit.hazan19](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@ravit.hazan19](https://community.cesium.com/u/ravit.hazan19)\
**Post date:** [May 2, 2016, 3:32pm UTC](https://community.cesium.com/t/is-a-point-inside-a-4-point-polygon/4070/1 "2016-05-02T15:32:16Z")

</div>

Hi,  
Given two point I am drawing some kind of rectangle(It should be a rectangle but there is a slight error).  
As my somehow rectangle is not a real rectangle - Creating a rectangle out of this point and using rectangle.contains has some errors and what you see isn't what you get(you see a point in the rectangle but actually it isn't).

Any idea for a solution?

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [May 3, 2016, 2:57pm UTC](https://community.cesium.com/t/is-a-point-inside-a-4-point-polygon/4070/2 "2016-05-03T14:57:42Z")

</div>

Hello,

Can you please describe a little more about what you are trying to do, or can you provide a code example? I don’t quite understand.

Thanks,

Hannah
