Giter VIP home page Giter VIP logo

gplates-reconstruct's People

Contributors

aazaff avatar cambro avatar jczaplew avatar jonhusson avatar mmcclenn avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

swanson-hysell

gplates-reconstruct's Issues

add support for anchor_plate_id

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

Unable to handle large features

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.

Issue

I tried to transfer a geoJSON file using the "reconstruct an entire file" code and it's not working. Can anyone tell why I got the error that my "argument list is too long"?

screen shot 2016-08-10 at 4 02 11 pm

Dead README links

The links to the original gplates files in the README are dead/non-existent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.