TGISwriter

Top  Previous  Next

This class is used for generating output from calculations. Typically as a GIS file with coordinates, but CSV and DBF files are also possible.

 

It is mostly used internally, but made available to users too. There is less error checking in this class, so you are to a higher degree responsible for what you are doing, if you use it directly. The sample uses it several times.

 

This table lists the 13 classes, which all has the same interface:

 


Contains geographic data

Style information

File components

2 GB limit

Codepage

TGISwriterArray

X

 



Unicode

TGISwriterCSV


 

CSV

 

Ansi

TGISwriterDBF


 

DBF

X

Ansi

TGISwriterEFAL

X

X

TAB, MAP, ID, DAT

X

Ansi

TGISwriterEFALx

X

X

TAB, MAP, ID, DAT

 

Ansi / UTF8 / UTF16

TGISwriterGeoJSON

X

 

GEOJSON

X (if string)

UTF8

TGISwriterGML2

X

 

XML, XSD

 

UTF8

TGISwriterGPX

X

 

GPX

 

UTF8

TGISwriterKML2

X

 

KML

 

UTF8

TGISwriterMFAL

X

X

TAB, MAP, ID, DAT

X

Ansi

TGISwriterMIF

X

X

MIF, MID

 

Ansi

TGISwriterMIF8

X

X

MIF, MID

 

UTF8

TGISwriterMITAB

X

X

TAB, MAP, ID, DAT

X

Ansi

TGISwriterSHP

X

 

SHP, SHX, DBF, PRJ, CPG

X

Ansi

 

Despite most of the file formats can hold mixed object types (SHP being the exception), we only support using a single object type.

 

Array

This is not file based opposed to the other formats. Not suited for very large datasets or you may hit an out-of-memory error.

 

CSV

This always uses , as field delimiter, no matter regional settings.

This always uses . as decimal point, no matter regional settings.

First line in the file contains the field names.

 

DBF

Stores codepage information in byte 29 in the header. This is standard, but not all software reads the information.

 

EFAL

This uses the EFAL library for writing TAB files.

EFAL can be downloaded from Precisely website.

Works with at least version 17 and 19.

Call TGISWriter.EFAL_Load(path) to load the library.

 

EFALx

The same as EFAL, except it writes NativeX format, readable with MapInfo 64-bit.

 

GeoJSON

If you don't specify a filename for output, the content is stored in a string property called GeoJSON instead.

 

GML2

2.1.2 format.

 

GPX

This only allows points and lines.

You should only use GPX if your coordinate system is already lat/long, WGS84.

 

KML2

2.2 format.

You should only use KML if your coordinate system is already lat/long, WGS84.

 

MFAL

Requires MIMFAL1500.DLL or MIMFAL1500_64.DLL on the path.

The generated table includes a spatial index and makes it slower to write than MITAB.

 

MIF

MapInfo-Interchange-File format

 

MIF8

The new UTF-8 formatted MIF file for MapInfo 15.2 (64-bit) and up.

 

MITAB

Requires MITAB.DLL or MITAB64.DLL on the path.

The generated table is generated without a spatial index. Pack the table in MapInfo to add this.

It can not generate NativeX tables.

 

SHP

CPG file is a simple text file with the codepage number. ArcGIS can read this information.