0

I am new at using GMT (Generic Mapping Tools) and I am wondering if it can use a shapefile of a hydrographical network.

Can I perhaps change my .shp to .gmt format and combine it with a GMT map? If so, how?

5
  • possible duplicate of GMT grid to ESRI readable format
    – Fezter
    Commented Jul 16, 2014 at 0:59
  • I think this is the exact opposite
    – Fotini_M
    Commented Jul 16, 2014 at 1:13
  • 1
    Can you edit your question to explain the GMT abbreviation, please?
    – PolyGeo
    Commented Jul 16, 2014 at 3:29
  • I agree with PolyGeo. Also network shapefile? You mean a group of shape files to load into something? I have never heard of a network shapefile in esri.
    – Brad Nesom
    Commented Jul 16, 2014 at 3:40
  • 2
    @BradNesom I think "hydrographical network shapefile" will be a line shapefile of a hydrographic network. GMT could be en.wikipedia.org/wiki/Generic_Mapping_Tools. In any event I think this question should be focussed on the conversion and the extra parts researched/asked separately.
    – PolyGeo
    Commented Jul 16, 2014 at 4:03

3 Answers 3

4

Convert from shape to gmt use this
example code :

ogr2ogr -f "GMT" Hudson_bounds.gmt Hudson_bounds.shp

3
  • how can i use this? at my command prompt? please can you help me i can understand it
    – Fotini_M
    Commented Jul 17, 2014 at 0:06
  • @Fotini_M you can get the ogr2ogr commandline tool by installing GDAL
    – user2856
    Commented Jul 17, 2014 at 3:15
  • Type it from youre command prompt window, link was provided by Luke. Commented Jul 17, 2014 at 7:07
0

In GDAL 2.2.1 the call is:

ogr2ogr -f "OGR_GMT" Hudson_bounds.gmt Hudson_bounds.shp

0

Shapefiles can be converted to xy segment files using QGIS. Just right click on the shapefile in QGIS and then Save As -> Format "Generic Mapping Tools [GMT]". Use WGS84 as the CRS, give a file name and click OK.

This is highly userfriendly when dealing with multi segment shapefiles.

1
  • Can't find this options at all in Qgis
    – VGB
    Commented Nov 23, 2022 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.