Skip to content

The `gmt2shp` Python CLI tool is designed to convert geographical data from the GMT (Generic Mapping Tools) format to ESRI's Shapefile format.

License

Notifications You must be signed in to change notification settings

okaragoz/gmt2shp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmt2shp Tool

Purpose

The gmt2shp tool is designed to convert geographical data from the GMT (Generic Mapping Tools) format to ESRI's Shapefile format. It provides a simple and efficient command-line interface for geospatial data conversion, supporting customization of the Coordinate Reference System (CRS).

Description

This Python-based tool takes a GMT file as input and generates a corresponding Shapefile. It allows users to specify the output file's base name and the desired CRS. The tool is equipped with features like verbose output and a progress bar for enhanced user experience.

Installation

Prerequisites

  • Python 3
  • pip (Python package installer)

Steps

  1. Clone the repository:
    git clone https://github.com/okaragoz/gmt2shp.git
  2. Navigate to the cloned directory:
    cd gmt2shp
  3. Install the required dependencies:
    pip install .

Usage

Run the tool from the command line:

gmt2shp <input_gmt_file> <output_shapefile_base> [--crs CRS] [--verbose]
  • <input_gmt_file>: Path to the input GMT file.
  • <output_shapefile_base>: Base name for the output Shapefile.
  • --crs CRS: (Optional) Specify the Coordinate Reference System. Defaults to "EPSG:4326".
  • --verbose: (Optional) Enable verbose output.

Example:

gmt2shp example.gmt example_output --crs "EPSG:4326" --verbose

Dependencies

  • geopandas
  • shapely
  • tqdm (for progress bar functionality)
  • argparse (for command-line interface handling)

Contributing

Contributions to the gmt2shp tool are welcome. Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The `gmt2shp` Python CLI tool is designed to convert geographical data from the GMT (Generic Mapping Tools) format to ESRI's Shapefile format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages