fxntf: Ordnance Survey Vector Files

A file-based interface, converting to nodes, polylines, polygons and text with or without column attributes.

The interface has been designed to work with the following Ordnance Survey data, although other NTF data may possibly be read:

Land-Line
Land-Line Plus
Meridian
Strategi
Data-Point (aka Code-Point)
Address-Point

fxntf will not correctly handle NTF data from Ordnance Survey Northern Ireland (OSNI). Reading the data will produce some errors, and not all data will be translated, especially polygons and multi-line text. These problems will be resolved in a future version.

The units of measure for NTF data sets is assumed to be metres, and is set automatically by the translator.

Extensions to Standard Commands

query_tables

query_tables <client_string_array>

Returns the names of all ntf files in the current directory and sub-directories. This list is also selectable by the following command:

iselect * from fxtables

select

select {*} from <file>

Selects the ntf file from which all data is to be fetched. No column attribute selection is available, but NTF features have an associated feature code, commonly termed a layer. Layers can be turned on or off (by the set_layers command) to facilitate a limited selection capability.

Additional Commands

full_names

full_names { on | off | true | false | 0 | 1 }

When set, create structures with the full NTF names for attributes. When not set, create structures with 2-character mnemonic attribute names. The default value is off, unless set otherwise in a startup script.

polygon_hack

polygon_hack { on | off | true | false | 0 | }

Ordnance Survey data has no representation for polygons. They are contained in the file as a polyline with a common start and finish point. If the command polygon_hack on is given, then polygons will be created for closed polylines, otherwise simple polylines are created. The default value is off, unless set otherwise in a startup script.

query_layers

query_layers { <client_string_array> {<client_numeric_array>}}

Returns up to two sets of data to the client:

1. the names of all layers (feature categories) used within the currently open file ,
2. whether or not the layers are currently selected, i.e. whether an objfetch command will retrieve them

Ordnance Survey data has no representation for polygons. They are contained in the file as a polyline.

set_layers

set_layers {<layer> ...}

Select particular layers. Supplying no parameters will select all layers in the file.

topology

topology { on | off | true | false | 0 | 1 }

When set, adds geometry id to class structure as field "gid". When not set, the entity field att[1] gets set with the geometry id value. The default value is off, unless set otherwise in a startup script.

unset_layers

unset_layers { <layer> ... }

De-select particular layers. Supplying no parameters will de-select all layers in the file.