uw-macrostrat / gplates-reconstruct Goto Github PK
View Code? Open in Web Editor NEWPython web service for PyGplates
Python web service for PyGplates
In reference to paleobiodb/data_service#11, the data service should return back modern coordinates as part of the GPlates service for Holocene rotations.
Hi,
Is it possible to change the default rotation model from Wright(2013) to Scotese(2016)?
The 2016 update is big change from the 2013 model:
UpdateRotationModel_MacrostratReconstruct.pptx
Here are the links to the 2016 model:
"url": "https://www.earthbyte.org/paleomap-paleoatlas-for-gplates/",
"data_url": "ftp://ftp.earthbyte.org/earthbyte/PaleoAtlas_Scotese_v3.zip",
Thanks!
Ananya
We will want to provide parallel paths (essentially a clone of this service) for the Seton EarthByte model and other EarthByte models as they are released.
I have been communicating with @jonhusson about adding additional rotation models such as the Torsvik and Cocks (2017) model:
http://www.earthdynamics.org/earthhistory/Data_Software.html
http://www.earthdynamics.org/earthhistory/bookdata/CEED6.zip
In this model, however, 000 represents the mantle reference frame rather than the spin axis reference frame. 001 is the spin axis reference frame (i.e. the reference frame one would wish to reconstruct to using gplates-reconstruct). The pygplates.reconstruct() function takes an anchor_plate_id argument (default is 0).
One solution for this would be to add the default anchor_plate_id to models.json. The .json for Torsvik and Cocks could look like:
{
"name": "torsvik2017",
"citation": "Torsvik, T. and Cocks, L.R.M. 2017. Earth History and Palaeogeography. Cambridge University Press",
"url": "http://www.cambridge.org/9781107105324",
"data_url": "http://www.earthdynamics.org/earthhistory/bookdata/CEED6.zip",
"date_acquired": "2017-10-30",
"isbn": "9781107105324",
"min_age": 0,
"max_age": 500,
"coverage": "continental",
"models": [{
"min_age": 0,
"max_age": 500,
"rotation_file": "Torsvik_Cocks_HybridRotationFile.rot",
"anchor_plate_id": 1,
}]
}
that anchor_plate_id could be extracted in models.py and then fed into the rotate function within reconstruct.py
def rotate(features, age, model):
if len(models[model]['models']) == 1:
rotation_model = models[model]['models'][0]['rotation']
anchor_plate = models[model]['models'][0]['anchor_plate_id']
for rot in models[model]['models']:
if rot['min_age'] <= age and rot['max_age'] >= age:
rotation_model = rot['rotation']
rotated = []
pygplates.reconstruct(features, rotation_model, rotated, age, anchor_plate)
return rotated
Only use the 0-550 model and plates.
The data service cannot process larger features, and will return an error that the request is too long.
Example GeoJSON:
https://macrostrat.org/api/places?format=geojson_bare&name=Wisconsin&placetype=region
Example Rotation Attempt:
curl -X POST -F my.geojson -F -o rotated_my.geojson -- https://dev.macrostrat.org/reconstruct
Error Type:
Sometimes it will return the textfile rotate_my.geojson with the following error message.
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Other times Bash will return a curl error that the argument list is too long.
The links to the original gplates files in the README are dead/non-existent.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.