Skip to content

Python code for plotting image with Generic Mapping Tools in interactive way.

Notifications You must be signed in to change notification settings

aditdp/gmt_pyplotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GMT_Pyplotter1727945891061

What is GMT

Generic Mapping Tools (GMT) is an open source collection of about 100 command-line tools for manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing high-quality illustrations ranging from simple x-y plots via contour maps to artificially illuminated surfaces, 3D perspective views and animations. The GMT supplements add another 50 more specialized and discipline-specific tools. This program can be running either as Command Line Interface (CLI) or as a script code.

Complication

  • not beginer friendly
  • steep learning curve with the GMT
  • Prone typing error when inputing commands or parameters
  • time consuming when creating the script (trial and error)

GMT_Pyplotter

Executable python code, that help user to create GMT script in interactive way. Just type the parameters, the program will generate and download the requested data for you. Run interactively in command line interface with input validation with error handling. Each needed variable for each process, calculated carefully based on user input. Flexible with available operating system, works on Windows, Linux or macOS. If the output not as expected, re-run the gmt_pyplotter.

How it's work

In the begining of the script, the GMT program is check for the installation location and the version match the required specification.

Follow the instruction for installing required application.

  1. In the begining, select a directory for output (map and another additional data)
  2. Then select the output format (jpg, png, eps, pdf, etc..)
  3. Pick a name for the map
  4. input the general info such as map projection, map width, and coordinate.
  5. Select layers and then generate the map.

Available layers

  1. Coastal line
  2. Earth relief
  3. Contour line
  4. Earthquake plot
  5. Focal Mechanism plot
  6. Indonesia regional tectonic plot
  7. Map inset

How to use

In the terminal or cmd/powershell type the command:

gmt_pyplotter

Then input the required parameter based on the map to be generate

Requirements

  • gawk or gnuwin32
  • Generic Mapping Tools >=6.4.0
  • Python version >= 3.10

Installation

  1. Make sure the required apps already installed or the apps will guide the required external programs

  2. Open terminal (linux or macOS) or cmd / powershell (Windows operating system)

  3. Change directory to the directory of installer where there is setup.py exist, and enter the following command:

    pip install .
    

    To uninstall just enter following command:

    pip uninstal gmt_pyplotter
    

License

Copyright (c) 2024 by BRIN (Badan Riset dan Inovasi Nasional / National Research and Innovation Agency of Indonesia)

About

Python code for plotting image with Generic Mapping Tools in interactive way.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages