next up previous index
Next: dbf_storage Up: Data Storage Previous: csv_storage and tab_storage   Index


flt_storage

As in the case of tab storage, the constructor expects an entry storage_location in its argument. It is the base directory where the data are stored to and loaded from.

The methods load_table() and determine_field_names() interpret the argument table_name as a subdirectory in the base directory in which each attribute is stored as a single file in a binary format. The file names correspond to attribute names with an extension that determines the type of the stored data. The file extension consists of three parts, one character for the byte order, one character for the type of the data, and one or more characters for the size of the column in bytes. The extension is similar to the dtype for numpy arrays, only the charakter for the byte order is changed from '<', '>', or '|' (for little endian, big endian, or irrelevant) to 'l', 'b', or 'i'.

The method write_dataset() stores attribute according to the scheme above. By default the file extensions are determined automatically. This can be changed by an entry valuetypes in write_resources, which is a dictionary with a type for each attribute.


next up previous index
Next: dbf_storage Up: Data Storage Previous: csv_storage and tab_storage   Index
info (at) urbansim.org