Ask you to give a thought ~
Reply content:
Ask you to give a thought ~
Correct the demand, PO Master's demand is "geo-fence"
Solution:
Postgis+postgresql
Elasticsearch/solr
I'm afraid I can't do it by MySQL.
or redesign the library.
ID |
place_id |
lat |
LNG |
1 |
1 |
1.1111 |
1.1111 |
2 |
1 |
1.1111 |
1.1111 |
3 |
1 |
1.1111 |
1.1111 |
4 |
1 |
1.1111 |
1.1111 |
Reference: http://www.cnblogs.com/LBSer/...
You this seems to be a purely mathematical problem, to say the idea, you can use four small triangles t1-t4 the quadrilateral complement into a rectangular r, now inconvenient to draw, you imagine. And then judge to give the point P
p 在 R 内 && p 不在 {T1-T4} 内
Define a Point object: P[x,y], X is latitude, y is longitude
Area of the parcel four vertices are: a[x,y], b[x,y], c[x,y], D[x,y]
Known points are: Ptr[x,y]
UH ~ ~
You should give me a few samples.
Otherwise, also to you science and geography knowledge, it is too wordy ~
Using the MySQL space function and operation, save directly save a polygon area, judge the time using the St_contains function
Using Point, St_astext, POLYGON, st_x, st_y, st_distance, these are much better than direct-saving jingwei.
Http://dev.mysql.com/doc/refm ...