This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
admin:features:geo:optimization [2011/01/10 23:37] els created |
admin:features:geo:optimization [2012/10/26 14:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| {{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
| Line 5: | Line 6: | ||
| ===== Geographic Searches ===== | ===== Geographic Searches ===== | ||
| - | [[admin:features:geo:home|Overview]] -> [[admin:features:geo:latlong|Latitude and Longitude]] -> [[admin:features:geo:radius|Radius Distance Searches]] -> [[admin:features:geo:indexing|Indexing]] -> **[[admin:features:geo:optimization|Optimization]]** | + | [[admin:features:geo:home|Overview]] | [[admin:features:geo:latlong|Latitude and Longitude]] | [[admin:features:geo:radius|Radius Distance Searches]] | [[admin:features:geo:indexing|Indexing]] | **[[admin:features:geo:optimization|Optimization]]** |
| ---- | ---- | ||
| Line 18: | Line 19: | ||
| === Example 1: Distance between two sets of coordinates === | === Example 1: Distance between two sets of coordinates === | ||
| - | <code> | + | <code sql> |
| select $distance(40.0, -105.0, 41.0, -106.0) distance | select $distance(40.0, -105.0, 41.0, -106.0) distance | ||
| from $omnidex; | from $omnidex; | ||
| Line 26: | Line 27: | ||
| === Example 2: Distance between two sets of coordinates using columns === | === Example 2: Distance between two sets of coordinates using columns === | ||
| - | <code> | + | <code sql> |
| select zip, | select zip, | ||
| $distance(40.0, -105.0, latitude, longitude) distance, | $distance(40.0, -105.0, latitude, longitude) distance, | ||
| Line 37: | Line 38: | ||
| === Example 3: Distance between an origin and multiple sets of destination coordinates === | === Example 3: Distance between an origin and multiple sets of destination coordinates === | ||
| - | <code> | + | <code sql> |
| select state, zip, latitude, longitude | select state, zip, latitude, longitude | ||
| from zipcodes | from zipcodes | ||
| Line 54: | Line 55: | ||
| * [[admin:optimization:home|Optimization Strategies]] | * [[admin:optimization:home|Optimization Strategies]] | ||
| - | * [[admin:optimization:geo:math|The Math Behind Geographic Searches]] | + | * [[admin:features:geo:math|The Math Behind Geographic Searches]] |
| * [[dev:sql:functions:distance|$DISTANCE function]] | * [[dev:sql:functions:distance|$DISTANCE function]] | ||