GPlates Web Service Python client/proxy
Project description
GPlates Web Service Python Client/Proxy
This Python package allows users to access GPlates Web Service more easily via simple Python programming interface.
Installation
pip install gwspy
How to use
The following Python code reconstructs three locations to 100Ma with Muller2019 reconstruction model.
# pip install gwspy shapely
import shapely
from gwspy import PlateModel, reconstruct_shapely_points
lats = [50, 10, 50]
lons = [-100, 160, 100]
points = [shapely.Point(x, y) for x, y in zip(lons, lats)]
model = PlateModel("Muller2019")
paleo_points = reconstruct_shapely_points(model, points, 100)
print(paleo_points)
GPlates Web Service server
By default, https://gws.gplates.org is used. You can use .env file to specify your service URL. Alternertively, you can export GWS_URL=https://your-service-url
in a terminal.
See env.template and setup GWS server with Docker.
Dependencies
API reference
API reference can be found at https://michaelchin.github.io/gplates-python-proxy/.
Examples
👉 reconstruct_shapely_points.py
The red dots are present-day locations. The blue dots are paleo-locations at 100Ma.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gwspy-0.1.2.tar.gz
.
File metadata
- Download URL: gwspy-0.1.2.tar.gz
- Upload date:
- Size: 455.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcc424ccf2552fde85220053c5fd44b0bb07efb2f1b23e9eb37045c29a15b401 |
|
MD5 | d0aa032477bc4a0e9dc2c069b8466221 |
|
BLAKE2b-256 | eb615836e37697f144cc0fea6a544922c24486998d3b533c5fd980c3ee4777a8 |
File details
Details for the file gwspy-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: gwspy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 461.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fcd2ebd946628a98b2d7ba2556b5f7078770c8cacfec5e95f95baaf1153079 |
|
MD5 | 6927a6e85cdf1bbb5a84b0f4f1f12b6b |
|
BLAKE2b-256 | dfdc7a343e530a79745fcff42fedcc13e1036e8de084d2733555a7dc28443913 |