Giter VIP home page Giter VIP logo

Comments (8)

raymondben avatar raymondben commented on September 25, 2024

Thanks Shawn - actually there's a newish R package from @sckott for handling WKT strings, including a validator - https://github.com/ropensci/wellknown. I'll look at replacing ALA4R's home-rolled dodgy check_wkt with that.

from ala4r.

shawnlaffan avatar shawnlaffan commented on September 25, 2024

No worries Ben. That saves me listing another issue regarding ring ordering checks.

Cheers,
Shawn.

from ala4r.

raymondben avatar raymondben commented on September 25, 2024

Hmm, the wellknown package is an improvement, but not a total solution. It also thinks that whitespaces are invalid in some cases (e.g. before the comma). I'm not sure if they are valid or not, but it''s kind of a moot point because the ALA servers quite happily accept those WKT strings. So I've also modified the ALA4R functions that take WKT strings, so that WKT strings are NOT checked prior to submitting the request to the ALA. If the request fails (and if the server provides no diagnostic information) then the WKT string is checked and if it fails, a warning is issued that it might have been the problem. The occurrences function always behaved this way, but specieslist and sites_by_species did not.
I think that's about the best we can do for the time being ... let me know if it doesn't seem a suitable solution (or if the ring ordering checks are causing problems).

(ALA4R v1.25 contains these changes)

from ala4r.

shawnlaffan avatar shawnlaffan commented on September 25, 2024

Thanks for that. I'll sing out if problems persist.

from ala4r.

sckott avatar sckott commented on September 25, 2024

@raymondben can you share some example wkt that you refer to that was invalid, and what fxn were you using in wellknown

from ala4r.

raymondben avatar raymondben commented on September 25, 2024

@sckott - sure, see ropensci-archive/wellknown#9

from ala4r.

sckott avatar sckott commented on September 25, 2024

thanks

from ala4r.

raymondben avatar raymondben commented on September 25, 2024

ropensci/wellknown now handles the whitespaces, so our check_wkt::is_valid_wkt_polygon also handles them. Further wkt parsing inconsistencies - please notify!

from ala4r.

Related Issues (20)

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.