You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · GIS vector

GMT — GMT ASCII Vectors (.gmt)

Plain-text vector format of the Generic Mapping Tools, storing multi-segment points, lines and polygons.

Type
Vector · GIS vector
Extension
.gmt
Converter
Read & write
Coordinate system
Any (EPSG, ESRI, custom)
Layers
Single

What is a GMT file?

GMT ASCII Vectors is the plain-text vector format used by the Generic Mapping Tools (GMT), an open-source collection of command-line programs for processing geographic data and producing maps, originally created by Paul Wessel and Walter H. F. Smith. In its basic form a file lists coordinate pairs line by line, with lines starting with ">" separating individual segments such as lines or polygon rings.

An extended convention adds comment headers beginning with "# @": the first line identifies the version and geometry type, while further keys record the region, projection, field names, field types and per-segment attribute values. A file can therefore hold attributed points, lines or polygons, but only one geometry type and one layer. The coordinate reference system may be stored as an EPSG code, PROJ string or WKT, and data is often geographic WGS 84. The format is common in geophysics, oceanography and academic cartography.

GMT ASCII Vectors files are usually exchanged by researchers in geophysics, oceanography and academic mapping who work with the Generic Mapping Tools. Because the file is plain text, it is easy to inspect and edit, but a file holds only one geometry type and one layer. Check the coordinate order, the segment separators and whether the "# @" header carries the CRS and attribute fields before converting.

Typical uses

  • Exchanging coastlines, boundaries and track lines between GMT scripts.
  • Storing attributed points, lines or polygons for map production in GMT or PyGMT.
  • Converting research vector data to GeoPackage or Shapefile for use in GIS software.
  • Archiving small vector datasets in a human-readable text form.
Files: Single text file (.gmt) with a "# @VGMT1.0" header; attributes and the coordinate system are stored in comment lines.

Sample GMT files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena roads and paths st-helena-roads.gmt

Roads and paths (lines)

110 named roads, streets, tracks and paths (OSM segments merged by name) with class, surface, speed limit and length. GMT vector (OGR_GMT) text format.

  • st-helena-roads · LineString · 110
  • EPSG:4326
  • 113.2 kB
Attributes (8)
idIntegernameStringclassStringrefStringonewayStringmaxspeedIntegersurfaceStringlength_mReal
1Airport Access RoadtertiaryNonenoNonepaved13088.3
2Airport Access RoadtertiaryNoneyesNonepaved177.1
3Casons RoadtertiaryNonenoNoneNone6132.5
4China LanetertiaryNoneyesNoneNone34.1
5Commonwealth AvenuetertiaryNoneno48asphalt3035.7

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena land cover st-helena-landcover.gmt

Land cover (polygons)

190 land-cover polygons (forest, scrub, farmland, residential, water, …) from OpenStreetMap with area in hectares. GMT vector (OGR_GMT) text format.

  • st-helena-landcover · Polygon · 190
  • EPSG:4326
  • 130.5 kB
Attributes (6)
idIntegerlandcoverStringosm_classStringnameStringarea_haRealosm_idString
1beachbeachNone0.6241102771696
2beachbeachSandy Bay Beach0.557550627544
3farmlandfarmlandNone4.50235798087
4farmlandfarmlandNone4.10835798079
5farmlandfarmlandNone3.73535798064

© OpenStreetMap contributors, ODbL 1.0

Frequently asked questions

Attributes and CRS are only stored if the file uses the extended "# @" header convention. A basic file contains just coordinates and ">" segment separators, so no field names or projection can be read from it.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.