IMPORT POI Statement |
This statement converts GIS-formatted POI data to GBFS data.
IMPORT POI [gbfs1 = %col1] FROM "path\src_file" WHERE condition;
gbfsX | One or more GBFS columns. See the 'Column Names' section below for a list of appropriate GBFS columns. |
colX | An expression referencing one or more GIS columns in src_table. This column will be converted to GBFS data. |
path\src_file | Specifies the path and file containing the GIS shapefile data. |
condition | A logic expression that is satisfied by a subset of the data in path\src_file. This expression, along with the WHERE keyword, is optional. |
The following GBFS columns are available for population through the Alchemy IMPORT POI command.
Column | Description | Type | Length | Values |
LABEL | The label assigned to this POI. This label may be rendered by GeoBase on a map. | Text | Variable | |
LANG | Language code: the language that should be associated with this POI. | Text | 3 | ENG: English FRE: French SPA: Spanish |
PHONE | The phone number associated with this POI. This data may be presented using a BalloonPushPin placed at the POI's map location. | Text | Variable | |
TYPE | The type of this POI. See 'POI Types' table below. | Numeric | Variable | 0-21 |
FOOD | Optional. The food type of this POI | |||
GEOM | Optional. The geometry of this POI. If this is specified it must be a LatLon. This is not necessary when importing POIs from a shapefile, as the shapefile has geometry associated with each row. Other formats, such as CSV will require processing to specify the LatLon. | LatLon |
This table shows the different POI (point of interest) types. The polygon TYPE field should contain one of the type values listed below (in the left-hand column).
Name | Description |
Airport | 4581 |
Amusement Park | 7996 |
ATM | 3578 |
Automobile Club | 8699 |
Bank | 6000 |
Book Store | 9995 |
Border Crossing | 9999 |
Bowling Center | 7933 |
British Rail Station | 10001 |
Bus Station | 4170 |
Business | 5000 |
Business Service | 9994 |
Car Dealer | 5511 |
Car Repair | 7538 |
Casino | 7985 |
Cemetery | 9591 |
Church | 9992 |
Cinema | 7832 |
City Hall, or Local Authority Center | 9121 |
Coffee Shop | 9996 |
Convention Center | 7990 |
Community Center | 7994 |
Commuter Rail Station | 4100 |
Court House | 9211 |
Ferry Terminal | 4482 |
Fire Station | 7392 |
Golf Course | 7992 |
Grocery Store | 5400 |
Higher Education | 8200 |
Hospitals | 8060 |
Hotel or Motel | 7011 |
Ice Skating Rink | 7998 |
Library | 8231 |
London Underground Station | 10002 |
Marina | 4493 |
Monument | 5999 |
Motorcycle Dealership | 5571 |
Museum | 8410 |
Nightlife | 5913 |
Park | 7947 |
Park And Ride | 7522 |
Parking Garage | 7521 |
Parking Lot | 7520 |
Performing Arts Center | 7929 |
Petrol Station | 5540 |
Pharmacy | 9997 |
Police Station | 9221 |
Public Sport Airport | 4580 |
Rental Car | 7510 |
Rest Area | 7897 |
Restaurant | 5800 |
Schools | 8211 |
Shopping | 6512 |
Ski Resort | 7012 |
Sports Center | 7997 |
Sports Complex | 7940 |
Tourist Attraction | 7999 |
Tourist Information | 7389 |
Train Station | 4013 |
Unknown | 0 |
Winery | 2084 |
To import POIs from CSV format text files, use the following format.
IMPORT POI [name = %name, geom = wkt(%point)] FROM "csv://src_file";
name | An expression referencing one or more column in the CSV source file. |
geom | A column of POI location data stored as well known text (WKT) in the CSV source file. |
poi_label,poi_type,poi_location Hamburger Heaven,5800,POINT(-118.265676 34.046188)
Note |
---|
Note the formatting of our point. For Well Known Text, the location should be formatted as 'Longitude Latitude', reversing the conventional GeoBase standard of 'Latitude Longitude'. Note also the use of a space as a separator rather than a comma. |
The IMPORT POI statement required to import data from the example CSV file shown above is:
IMPORT POI [ label = %poi_label, type = %poi_type, geom = wkt(%poi_location) ] FROM "csv://mycsvfile.csv";
The 'poi_label' column provides a name for each POI and the 'poi_type' the type of POI (refer to the 'POI Types' table above). The 'poi_location' column provides POI points stored as WKT.