This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
admin:features:geo:indexing [2011/04/13 03:30] 127.0.0.1 external edit |
admin:features:geo:indexing [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
+ | |||
{{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
Line 33: | Line 34: | ||
**Example** | **Example** | ||
- | <code sql> | + | <code> |
create table "ZIPCODES" | create table "ZIPCODES" | ||
physical "dat/zipcodes.dat" | physical "dat/zipcodes.dat" | ||
Line 54: | Line 55: | ||
==== Indexing Geographic Coordinates ==== | ==== Indexing Geographic Coordinates ==== | ||
- | Geographic coordinates are indexed in a multi-column Omnidex index containing first the latitude and then the longitude. This index will then be available for use in optimizing the [[dev:sql:functions:distance|$DISTANCE function]] in SQL SELECT statements. | + | Geographic coordinates are indexed in a multi-column Omnidex index containing first the **longitude and then the latitude**. This index will then be available for use in optimizing the [[dev:sql:functions:distance|$DISTANCE function]] in SQL SELECT statements. |
- | <code sql> | + | <code> |
create table "ZIPCODES" | create table "ZIPCODES" | ||
physical "dat/zipcodes.dat" | physical "dat/zipcodes.dat" | ||
Line 71: | Line 72: | ||
"AREACODES" CHARACTER(15), | "AREACODES" CHARACTER(15), | ||
"TIME_ZONE" TINYINT, | "TIME_ZONE" TINYINT, | ||
- | omnidex "LATLONG" ("LATITUDE", "LONGITUDE"), | + | omnidex "LONGLAT" ("LONGITUDE", "LATITUDE"), |
) | ) | ||
in "star.xml"; | in "star.xml"; |