我有2個獨立表格(鏈接&部分)。鏈接表內的信息是有點像這樣,在地理區域上加入表格
Links Table
----------------------------------------------------------------------------
| id | Description | startLat | startLng | endLat | endLng |
----------------------------------------------------------------------------
| 1000259 | Link Number 1 |52.891372 |-1.768254 |52.892545 |-1.775278 |
| 1000359 | Link Number 2 |52.894892 |-1.780513 |52.894306 |-1.774793 |
| 1000279 | Link Number 3 |52.894306 |-1.774793 |52.895000 |-1.765273 |
| 1000258 | Link Number 4 |52.895000 |-1.765273 |52.895500 |-1.755278 |
| 1000255 | Link Number 5 |52.895500 |-1.755278 |52.896500 |-1.745278 |
| 1000555 | Link Number 6 |52.896500 |-1.745278 |52.897250 |-1.735278 |
----------------------------------------------------------------------------
並且這些部分表出現這樣的,
Sections Table
-----------------------------------------------------------------------------
| id | Description | fromLat | fromLng | toLat | toLng |
-----------------------------------------------------------------------------
| 625 | Section 1 | 52.893598 | -1.775120 | 52.885053|-1.756409 |
| 713 | Section 2 | 52.897273 | -1.788324 | 52.898285|-1.724721 |
| ... | ... | ... | ... | ... | ... |
| ... | ... | ... | ... | ... | ... |
-----------------------------------------------------------------------------
我想運行一個查詢,給了我所有這一切都被部分覆蓋的鏈接。因此,如果我說第2部分有多少鏈接,我應該收到部分信息經緯度所涵蓋的所有鏈接。
P.S.請注意,部分比鏈接長...任何幫助!
段和鏈接應該在同一行上嗎?或者您如何知道該段上/段內的鏈接? – Bulat 2014-08-27 16:41:20