Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you cannot change dbs to one that has spatial operators implemented correctly like PostgreSQL's PostGIS extension <code>http://postgis.refractions.net/</code> , you can solve this problem using a two-part approach.</p> <p>First let MySQL give you an bounding box pre-filtering result based on the bounding box (that is what it does by default) using their intersects operator (<code>http://dev.mysql.com/doc/refman/5.1/en/functions-that-test-spatial-relationships-between-geometries.html#function_intersects</code>). If queries are slow, make sure that you have an index on your geometry field first.</p> <p>Then hydrate the original geometry that you used in your query into a geometry object of GIS geometry library like GEOS (<code>http://trac.osgeo.org/geos/</code>) (C++ based, although it also has bindings for different languages like Python), Shapely (<code>http://trac.gispython.org/lab/wiki/Shapely)</code>, <a href="http://www.gdal.org/ogr/" rel="noreferrer">OGR</a> ( or the Java Topology Suite (JTS) <code>http://www.vividsolutions.com/jts/jtshome.htm</code>). </p> <p>Test each of the geometries that you get back from your query result using the appropriate operator like <strong>within</strong> or <strong>intersects</strong>. Any of these libraries will give you a boolean result.</p> <p>Personally, I would look at the samples for OGR since it has a big community that is ready to help.</p> <p>Oh yeah, and sorry for putting the links like that... I guess since I am "new" I can only post one link (?)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload