Note that there are some explanatory texts on larger screens.

plurals
  1. US3030
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COHi to answer your edit. I am not very skilled in using MYSQL. I am using an older version of MYSQL (released < 2 years ago), but which apparently supports the geometry modules. I am using MYSQL administrator GUI (freeware) and selected ISAM for the table.. I have created the table using both the gui interface and SQL code multiple times. I have imported the data from a CSV multiple times with different syntax (trial and error). Every time it is successful I seem to get the same result when trying to display the "coord" column (point(x y) column) in php, a bunch of computer code characters..
      singulars
    2. COHi again. Just to make it clear. I end up with 4 sets of coordinates from the user input [x=10,y=10] [x=10,y=20] [x=15,y=15] [x=5,y=5]. I need to order them into two groups, X_max, X_min, and Y_max, Y_min. Then test each row of the database. So if the X value of a point (in the db) is between X_max and X_min, the Y value of that point must be between Y_max and Y_min. That is the logic that works for a square, but does not work for an irregular polygon. At the moment I think the solution is to add an extra test in php to the SQL result, based on a calculated vector. IF CALC_VECTOR IS BETWEEN..
      singulars
    3. COHi again. I will test tomorrow but I am pretty sure it won't work. That is the statement I had (but without the brackets). The problem is, that code is fine if the polygon is a square, but it's an irregular polygon (a diamond). So I am getting some rouge results with that code, ie: a point may be between the X axis (min - max) and the Y axis (min - max) values, but is actually outside of the true polygon. I think I need to rethink my logic completely.
      singulars
 

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