NTXShape User Manual

NTXShape Converter version 1.4a
Copyright © 1997-2003 ESRI Canada Limited
All rights reserved

NTXShape translates information stored in the NTX binary file format (a common CARIS exchange format) to the widely supported shapefile format, first made popular by ArcView GIS. The converter will translate either Intel/DEC or Sun/Motorola byte-order binary NTX files. It does not support the CARIS ASCII format.

There are several different ways that you can access the functionality of NTXShape. First, there is an extension for ArcView 3.x. This is most useful when you have ArcView 3.x and have a limited number of NTX files to convert. Second, there a stand-alone command line utility that does not require the presence of ArcView. This version is most useful when a large number of NTX files need to be processed, or when you are using ARC/INFO. Third, there is a new conversion library with Visual Basic bindings. The VB bindings enable you to embed NTX conversion functionality in ArcGIS and other applications. Finally, there is a graphical interface for ArcGIS, constructed using the new VB bindings.


NTXShape is usually bundled as a setup wizard. The wizard makes installation very easy, and also allows you to uninstall via the Windows Add/Remove Programs control panel applet. You must have administrative privileges in order to install or uninstall NTXShape.

ArcView 3.x NTXShape Extension Usage:

It is assumed that you included the NTXShape ArcView extension when you ran the setup wizard. (This option is enabled by default, provided that ArcView 3.x is already installed on the system.)
  • To load the NTXSHAPE converter into an ArcView project you must first be in ArcView with the Project document active. Under the File menu you will find an Extensions option. In the Extensions window, click on the 'NTXShape Converter' checkbox and select 'OK'. This will load NTXSHAPE into the project and make it available any time you reopen that project.
  • To use the conversion routine you must have a View as your active document. Under the 'View' menu, click on the menu option called 'Import NTX'. You will be presented with a File Open dialog that locates files with an '.ntx' suffix. (You can specify extensions other than '.ntx' by typing them in the dialogue, e.g. '*.dtm'.) Select the file to be converted.
  • You will be prompted for a location and name for each output file type (points, lines, polygons). Provide filenames (or accept the defaults) for the output types that you wish to produce. Choose cancel for the output types that you do not want to generate. NTXShape will perform the desired conversion, indicating progress on the status bar. Once the conversion is finished, the themes will be added to the active View document.
  • There are a few additional menu options that come as part of the ArcView 3.x extension. Under the 'Theme' menu item you will find an option called 'Annotate NTX'. This option creates annotation graphics from the point theme. The point theme must be active in order for this option to function. There is also a new experimental option called 'Export NTX Annotation' under the Theme menu. This option saves the annotation to a DXF file. As with 'Annotate NTX', the point theme must be active.

ArcGIS NTXShape Graphical User Inferface:

It is assumed that you included the ArcGIS GUI when you ran the NTXShape setup wizard. (The ArcGIS Graphical User Inferface is enabled by default provided that ArcGIS Desktop is present on the system.)
  • NTXShape is exposed as a tool in ArcToolbox. To access it, open ArcToolbox, navigate to the "Conversion Tools\Import to Shapefile", and double-click "NTX to Shapefile." This will bring up a dialog box in which you can choose the NTX file to be converted, and then select what kinds of output shapefile to produce. The dialog also has options to allow you to convert only a subset of the features, e.g. only the features from a given theme in the NTX file, or only those having feature codes matching a given pattern; to access these options, click the "Advanced button". Once you have finished selecting your choices in the dialog, click OK. NTXShape will perform the desired conversion, showing a progress bar while it is running.
  • NTXShape can also be accessed from within ArcMap. The user interface is the same as in ArcToolbox, except that there is an option labeled "Add to Map", which will cause ArcMap to load the output shapefiles into the active data frame as layers.
    Before you can access the NTXShape command from ArcMap, you must add the command to the user interface. Open the Customize dialog (View / Toolsbars / Customize), go to the Commands tab, and find "Import NTX" in the "Data Converters" category. Simply drag the "Import NTX" command onto your ArcMap user interface, e.g. onto a toolbar or into the File menu. Then close the Customize dialog. The command will be available immediately.

NTXShape Command Line Usage:

Following are instructions in the use of the Command Line version of the NTXShape converter utility. We assume that you included the command line interface when you ran the NTXShape setup wizard. (The command line program is enabled by default.)

From the command prompt in Windows NT / 2000 / XP, and also from the ARC prompt in ArcINFO Workstation, the command line version of NTXShape can be executed simply as NTXSHAPE without specifying a path. If you are using Windows 9x/ME, you may need to either supply the full path to the application (by default, C:\Program Files\NTXShape\ntxshape.exe), or else add the directory where you installed NTXShape to the path in AUTOEXEC.BAT.

NTXShape supports a number of command line arguments, providing substantial power and flexibility.

NTXSHAPE <ntxfile> {outfile}
         {ALL | POINT | LINE | POLYGON | DESC | NAME | LINEZ | datatype}
         {SAFE | OVERWRITE | APPEND} {theme number} {fcode pattern}

  • Following the convention of ArcInfo Workstation, you may use '#' as a placeholder for any optional argument. Using '#' is the same as specifying the default value for that argument.
  • <ntxfile> is the NTX file to be processed. This argument is required.
  • {outfile} is the name and/or location for the output files. If it is not supplied then the name and location of the input NTX file will be used. If just a directory path is supplied then the converter will use the input NTX file for naming and use the specified path for location. For example, you may use "." for this argument to place the output files in the current directory.
  • {ALL | POINT | LINE | ...} specifies which kind of output should be produced. The POINT option converts symbols, names, spot heights, and soundings, creating a point shapefile. The LINE option converts the various line types supported by the NTX format into a line shapefile. The ALL option is the default; it generates both point and line shapefiles. The POLYGON option will generate polygons from the topological lines and label points stored in the NTX file, on a per-theme basis. The DESC option converts only the descriptors, resulting in a DBF file. The NAME option takes the NTX name features, and converts them as a line shapefile with a TEXT attribute, so that text labels can be splined along the line. The LINEZ option converts lines from the NTX file, but produces a 3D line shapefile as the output. Lastly, you can specify a datatype by number instead of by name. For example, if you only want the type 4 lines, you can specify 4 instead of LINE.
  • {SAFE | OVERWRITE | APPEND} tells the converter what to do if the file already exists. In SAFE mode (the default), NTXShape will abort if the output shapefile already exists. In OVERWRITE mode, NTXShape will replace the existing shapefile. In APPEND mode, NTXShape will add the conversion results to the existing file, if possible. The APPEND option can be very useful for joining together the results of multiple NTX files (tiles or mapsheets) into a single shapefile. e.g. In a directory containing several NTX files and no shapefiles, FOR %f IN (*.ntx) DO NTXSHAPE %f ntxarea.shp POLY APPEND would iterate through a set of NTX files in a directory, build polygons, and append them together to create a shapefile called ntxarea.shp.
  • If a theme number is specified, only the features from that theme will be processed. To get all of the features that are not of a given theme, add a minus sign (-) before the theme number. e.g. NTXSHAPE abc.ntx abc.shp POINT # -1001 would extract all points except those in theme 1001.
  • If an argument is given for the fcode pattern, only the records whose feature code matches the pattern will be processed. In the pattern, asterisk (*) matches zero or more characters. A question mark (?) matches exactly one character. Square brackets can also be used to specify which characters are allowed, either as individual characters or as a range. For example, [a-z] would match any letter, whereas [aeiou] would match any vowel. A bar (|) can be used to specify multiple patterns. It is strongly recommended that you enclose the fcode pattern in quotes. e.g. NTXSHAPE abc.ntx abc.shp LINE # # "DL*|RRRD*" would extract all of the lines whose FCODE begins with DL or with RRRD.
  • If the conversion results in no records (e.g. you specify LINE for an NTX file that contains only points), the result is a shapefile with zero records. Most software, including ArcView, will see this as an invalid shapefile.
  • By default the program creates two files: a shape file of point features (xxx_p.shp), and a shape file of line features (xxx_l.shp). Here 'xxx' is the name specified for the output. If there is only one output file (e.g. when using any output argument other than ALL), the default output filename will be xxx.shp with no suffix.

Visual Basic / VBA Bindings:

NTXShape now exposes Visual Basic and VBA bindings, allowing NTX conversion functionality to be accessed from ArcGIS, among other things. The API is experimental and may change change signficantly in the future. To access NTXShape from Visual Basic, choose Project/References in Visual Basic; or Tools/References from ArcMap/ArcCatalog’s Visual Basic Editor window. Select "NTX Conversion Library" from the list. Although there is no help file at this time, some embedded documentation notes are accessible through the VB Object Browser or the ESRI Object Browser. Here is a very brief introduction to the library:
Dim hntx As NTXHandle
hntx = NTXOpen(ntxFileName)
NTXSetThemeFilter hntx, 1001

NTXConvertPoints hntx, outputShapefile, showProgress:=ntxFalse
NTXClose hntx
For a more complete example, you may wish to browse the source code for the NTXShape ArcGIS User Interface, which is written using the API: