title: MySQL geospatial functions to identify whether a rectangle have points in a non uniform four sided polygon and vice versa
body: <p>Inputs:
  There are two inputs, both are drawn in earth's surface</p>
  
  <ul>
  <li>Input 1: 
  A rectangular shape, with the top left corner coordinates and bottom right corner coordinates. These coordinates are defined in latitude,longitude pairs. </li>
  <li>Input 2: 
  A four sided polygon(a shape strictly not a rectangle), with top left,top right,bottom left and bottom right coordinates. These coordinates are defined in latitude,longitude pairs.Data type of each value is decimal and the data is stored in a mySQL table.</li>
  </ul>
  
  <p>How can I identify if any point inside the rectangle comes inside the polygon and vice versa using MySQL geospatial functions ?</p>
  
  <p>Please see a pictorial representation at <a href="http://i.stack.imgur.com/KDju4.jpg" rel="nofollow">http://i.stack.imgur.com/KDju4.jpg</a></p>