Click or drag to resize

IMPORT Statement

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
IMPORT Statement

This statement converts GIS-formatted data to GBFS data. GeoBase supports the import of the following predefined data types:

  • CITIES
  • LINES (such as railways or borders)
  • POI (points of interest - such as gas stations, restaurants or monuments)
  • POINT ADDRESSES (points representing a street address)
  • POLYGONS (such as lakes, forests or parks)
  • CONSTRAINTS (such as turn restrictions, restrictions may have an associated time/date window)
  • STREETS (such as roads or freeways)
  • TMC (Traffic Message Channel codes for street links)

Syntax

Alchemy
IMPORT import_type [id = %src_id, dest_col1 = exp1, dest_col2 = exp2, ...] 
  FROM "path\src_file" WHERE condition;
IMPORT ... ;
COMMIT;
Tip Tip

A COMMIT statement only has effect after a street import

Note Note

Specify the code page to be used for an import file by adding '@@1234', where '1234' denotes the codepage. For example, to import UTF-8, which has a Microsoft code page value of '65001':

Alchemy
IMPORT POLYGONS [ 
LABEL = %name, 
TYPE =5 
] FROM "buildings@@65001";

Without this code, accented characters in UTF-8 formatted data will be corrupted.

Nomenclature

import_type Specifies the type of data to be collected. Can be one of: CITIES, LINES, POI, POINT_ADDRESSES, POLYGONS, CONSTRAINTS, or STREETS
id A required field of unique identifiers that cannot be omitted
src_id A column of unique identifiers in src_table
dest_colX One or more columns that have GBFS data passed to them. See CITIES, LINES, POI, POLYGONS, CONSTRAINTS or STREETS for a description of acceptable column names and data values
expX A logic expression that may contain references to one or more columns in src_file
path\src_fileSpecifies the path and file containing the 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

Examples

Local variables

It is possible to define a local variable and a value within an initial pair of braces ({..}) that can then be used within the IMPORT statement. This capability allows for more advanced logic than would otherwise be possible within the import statement itself.

Alchemy
IMPORT STREETS [
  ... ,
  FUNC_CLASS = getType(%my_column),
  ... ;
]

Re-written to use a local variable:

Alchemy
IMPORT STREETS {
  ...;
  $my_type = getType(%my_column);
  ...;
}
[
  ... ,
  FUNC_CLASS = $my_type,
  ... ;
]