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/01/10 23:42] els |
admin:features:geo:indexing [2016/06/28 22:38] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| + | |||
| {{page>:top_add&nofooter&noeditbtn}} | {{page>:top_add&nofooter&noeditbtn}} | ||
| Line 5: | Line 7: | ||
| ===== 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 15: | Line 17: | ||
| * DOUBLE | * DOUBLE | ||
| * CHARACTER | * CHARACTER | ||
| - | * C STRING | + | * STRING |
| If geographic coordinates are stored in character-class datatypes, Omnidex will parse the latitude and longitude. Omnidex can accept the following notations: | If geographic coordinates are stored in character-class datatypes, Omnidex will parse the latitude and longitude. Omnidex can accept the following notations: | ||
| Line 34: | Line 36: | ||
| <code> | <code> | ||
| create table "ZIPCODES" | create table "ZIPCODES" | ||
| - | physical "dat\zipcodes.dat" | + | physical "dat/zipcodes.dat" |
| ( | ( | ||
| - | "ZIP" C STRING(9) | + | "ZIP" STRING(9) |
| - | "CITY" C STRING(25) | + | "CITY" STRING(25) |
| "COUNTY_CODE" CHARACTER(3), | "COUNTY_CODE" CHARACTER(3), | ||
| "STATE" CHARACTER(2), | "STATE" CHARACTER(2), | ||
| Line 53: | 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> | <code> | ||
| create table "ZIPCODES" | create table "ZIPCODES" | ||
| - | physical "dat\zipcodes.dat" | + | physical "dat/zipcodes.dat" |
| ( | ( | ||
| - | "ZIP" C STRING(9), | + | "ZIP" STRING(9), |
| - | "CITY" C STRING(25), | + | "CITY" STRING(25), |
| "COUNTY_CODE" CHARACTER(3), | "COUNTY_CODE" CHARACTER(3), | ||
| "STATE" CHARACTER(2), | "STATE" CHARACTER(2), | ||
| Line 70: | 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"; | ||