Importing GML 2.1 Files - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Syntax

Import file_name
	[ Type "GML21" ]
	[ Layer layer_name]
	[ Into table_name ]
	[ Overwrite ]
	[ CoordSys... ]

file_name is the name of the GML 2.1 file to import.

layer_name is the name of the GML layer.

table_name is the MapInfo table name.

Description

Type is "GML21" for GML 2.1 files.

Overwrite causes the TAB file to be automatically overwritten. If Overwrite is not specified, an error will result if the TAB file already exists.

The Coordsys clause is optional. If the GML file contains a supported projection and the Coordsys clause is not specified, the projection from the GML file will be used. If the GML file contains a supported projection and the Coordsys clause is specified, the projection from the Coordsys clause will be used. If the GML file does not contain a supported projection, the Coordsys clause must be specified.

Note: If the Coordsys clause does not match the projection of the GML file, your data may not import correctly. The coordinate system must match the coordinate system of the data in the GML file. It will not transform the data from one projection to another.

Example

Sample importing using GML21 style:

Import "D:\midata\GML\GML2.1\mi_usa.xml" Type "GML21" layer "USA" Into 
"D:\midata\GML\GML2.1\mi_usa_USA.TAB" Overwrite CoordSys Earth Projection 
1, 104