<div dir="ltr">Nisha,<div><br></div><div>There is more than one way to define a square or rectangle on the surface of the earth.  They are mathematically and geographically different.</div><div><br></div><div>1.  You can define a rectangle by its four corner points, with the edges defined as great circle lines between the four corners.  This defines a spherical polygon.  gc_inout is the correct way to handle a polygon defined this way.</div><div><br></div><div>2.  You can define a rectangle by its four corner points, connected by straight lines in cartesian coordinate space (i.e. lat/lon space).  A simple example would be the area between 30 to 35 degrees north, and 80 to 100 west.  gc_inout would NOT give correct results for this definition.</div><div><br></div><div>There may be other ways as well.  A &quot;rectangle&quot; could be defined as a region enclosed by four straight lines, drawn over the surface of the earth in any map projection, of which there are many.</div><div><br></div><div>Which definition do you have in mind?<br></div><div><br></div><div>--Dave</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 9, 2015 at 2:57 PM, Manisha Ganeshan <span dir="ltr">&lt;<a href="mailto:manisha.ganeshan86@gmail.com" target="_blank">manisha.ganeshan86@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I&#39;m wondering if a function like gc_inout can work for other polygons, specifically square/rectangle? </div><div><br></div><div>Regards,</div><div>Nisha<span><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Dr. Manisha Ganeshan<div>Universities Space Research Association</div><div>Maryland, U.S.A.</div></div></div></font></span></div></div></blockquote></div></div></div>