ropensci / mregions

MarineRegions R client

Home Page:https://docs.ropensci.org/mregions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get feature based on the marine regions id

samuelbosch opened this issue · comments

Hi @sckott,

I've recently been working on getting the distribution from WoRMS (worrms::wm_distribution) which returns a marineregions id from which you can call the getGazetteerWMSes.json end point e.g. http://www.marineregions.org/rest/getGazetteerWMSes.json/1906/
Based on this WMS I've then managed to get geojson from the WFS. I still have some bugs but would like to integrate this in mregions. Code dump: https://github.com/iobis/mregions/blob/master/R/mr_gazetteer.R

Some questions:

  • Any thoughts on this?
  • Can I use the sf package instead of sp? Or would you prefer for me to change everything to sp
  • Should I use crul instead of httr?
  • Shall I also try to add the other gazetteer REST services? http://marineregions.org/gazetteer.php?p=webservices

Samuel

hi @samuelbosch

  • Yes, please do send PR
  • Sure, feel free to do sf instead of sp
  • I guess I haven't moved to crul yet, but I do want to move to it as I should have vcr pkg done soon, which will let us cache http requests to improve the test suite
  • Yes, please do add other REST services

We are working on an update of the web services and will implement a new web service that retrieves the geometries of a feature (by mrgid). So there is no need to implement this functionality in the mregions package, we'll cover that after the web services have been upgraded (foreseen in summer 2021).
I'll open new issues for the additional questions.