Comments (8)
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.
No worries Ben. That saves me listing another issue regarding ring ordering checks.
Cheers,
Shawn.
from ala4r.
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.
Thanks for that. I'll sing out if problems persist.
from ala4r.
@raymondben can you share some example wkt that you refer to that was invalid, and what fxn were you using in wellknown
from ala4r.
@sckott - sure, see ropensci-archive/wellknown#9
from ala4r.
thanks
from ala4r.
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)
- Make package skeleton HOT 1
- Change Macropus genus in example HOT 1
- Google analytics
- Document API dependencies HOT 2
- Case study - Latitudonal gradient analysis HOT 1
- Case study - area report HOT 1
- Case study - text mining Darwin Core terms HOT 1
- Develop ALA4R training materials
- sites_by_species can fail on valid WKT
- ala_list() test failing HOT 1
- ALA4R Travis build failing
- problem accessing records using occurrences() HOT 6
- Sites by species failing while waiting for task to complete
- Make use of new image web service
- Generate DOIs for downloads HOT 1
- Publish to CRAN - v 1.8.0 HOT 1
- Retrieve data resource information
- Implement facet search
- Include data quality filters in ala_occurrences
- Progress bar for downloads, or an initial count on how many records to expect HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ala4r.