8000 GitHub - KentaroEmoto/EMTools: Useful tools for geosciences. Create kmz file to plot colored icons in Google Earth.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

KentaroEmoto/EMTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. EMTools
  2. License
  3. Contact

EMTools

The EMTools consists of several programs useful for geosciences.

makeKMZ

Python code to create a KMZ file to plot colored circle icons in Google Earth by using the lists of longitudes, latitudes and values.

Requirements

  • Python 3.9.15
  • matplotlib 3.6.3
  • numpy 1.23.5
  • pillow 9.4.0

Usage

Just import MakeKMZ and call the make_kmz function.

import makeKMZ
makeKMZ.make_kmz(kmzname, lon, lat, values, list_label)

where parameters are

kmzname (str): Name of the output KMZ file.
lon ([float]): Array of longitudes.
lat ([float]): Array of latitudes.
values ([float]): Array of values used for the color scale.
list_label ([str]): List of labels of icons.

Demo

See example/earthquakes.py, which creates a map of the 20 largest earthquakes listed on the USGS website.

The screenshot of the output kmz file opened in Google Earth is Product Name Screen Shot

(back to top)

getGSIMaps

Python code to download tile images of GSI Maps. Downloaded image can be used to plot the map by GMT (PyGMT) as the background.

Requirements

  • Python 3.9.16
  • numpy 1.23.3
  • pillow 9.3.0
  • pygmt 0.8.0 (to run the example code)

Usage

Just import getGSIMaps and call the create_image function.

import getGSIMaps
getGSIMaps.create_image(out_image_name, lon1, lat1, lon2, lat2, zoom = None, map_type = 'std'):

where parameters are

out_image_name (str): Output image name
lon1 (float): Longitude of the bottom left corner of the region
lat1 (float): Latitude of the bottom left corner of the region
lon2 (float): Longitude of the top right corner of the region
lat2 (float): Latitude of the top right corner of the region
zoom (int, optional): Zoom level of the tile. 1:global to 18:local. Defaults to None.
map_type (str, optional): Tile ID of the map type. 'std', 'pale', 'english', 'seamlessphoto', and etc. (See https://maps.gsi.go.jp/development/ichiran.html). Defaults to 'std'.

Demo

See example/plotGSIMaps.py, which plot a map of Shimabara Penuinsula by PyGMT with the satellite image as the background.

The output image of this demo is

Output map
This map is based on the photo published by Geospatial Information Authority of Japan. Data resources: Landsat8 (GSI, TSIC, GEO Grid/AIST), Landsat8 (courtesy fo the U.S. Geological Survey), Bathymetry (GEBCO)

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Kentaro Emoto - emoto.kentaro.430@m.kyushu-u.ac.jp

Project Link: https://github.com/KentaroEmoto/EMTools

(back to top)

About

Useful tools for geosciences. Create kmz file to plot colored icons in Google Earth.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0