Hello all, I am new to working with map files but have a strong database background. I have recently downloaded several .shp files and used ogr2ogr to import into MySQL. Everything appears to have worked correctly because I can run an area() function in MySQL and get a result for each of the files. My problem is that I have lat/long data in another table which I believe I have correctly converted to a POINT datatype in MySQL. However, when I run a query using something like the within() function in MySQL, I can&#39;t get a result at all. My import of shapefiles contains 73 polygons which designate specific areas within Wichita, KS. I have 2,900 points in my table I am analyzing which I know all have physical addresses in Wichita, KS. However, my queries return no results. I suspect there may be a problem with the way I imported the shapefiles into the database that the database is not associating the area correctly.<br>
<br>The import was done with this command:<br><br>ogr2ogr -f &quot;MySQL&quot; MySQL:&quot;dbname,user=root,host=localhost,password=secret&quot; -lco engine=MYISAM source.shp<br><br>My query is:<br><br>select b.* from locations b, area z where contains(z.SHAPE, b.locPoint);<br>
<br>z.SHAPE is of datatype GEOMETRY in MySQL. b.locPoint is of datatype POINT in MySQL.<br><br>Any suggestions or pointers to the right information would be appreciated. <br clear="all"><br>-- <br><br>Bob Scheller<br>Hotspot Interactive, Inc.<br>
Office: 913-871-6990<br>Mobile: 913-653-2877<br>