Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To what does the geodeticDatum (occurrences) field relate? #7

Closed
johnbaums opened this issue Apr 16, 2015 · 5 comments
Closed

To what does the geodeticDatum (occurrences) field relate? #7

johnbaums opened this issue Apr 16, 2015 · 5 comments

Comments

@johnbaums
Copy link

Consider x <- occurrences('Diplolaena grandiflora', fq='geospatial_kosher:true', download_reason_id=10).

Is x$data$geodeticDatum the datum associated with x$data$latitude and x$data$longitude, or have the coordinates given in those fields already been transformed to WGS84 (or GDA94? - though they are basically identical AFAIK)?

If they have been transformed, then:

  1. perhaps the name "geodeticDatumOriginal" might be more appropriate; and

  2. What does this mean for the following row:

    subset(x$data, id=='5400e754-d39c-4814-82ca-2f29b40fb3e2', 
           c('id', 'geodeticDatum', 'latitude', 'longitude', 
             'geodeticDatumAssumedWgs84', 'unrecognizedGeodeticDatum'))
    
    
    #                                       id geodeticDatum latitude longitude geodeticDatumAssumedWgs84 unrecognizedGeodeticDatum
    #139 5400e754-d39c-4814-82ca-2f29b40fb3e2      113.5681 -25.9764  113.5681                     FALSE                      TRUE
    

    If the datum is unrecognised, and it's not assumed to be WGS84, what datum is assumed? In this case latitudeOriginal and longitudeOriginal match latitude and longitude, so it seems no transformation has taken place. Note also that the original occurrences() query requested geospatial_kosher records only - should records such as 5400e754-d39c-4814-82ca-2f29b40fb3e2 be omitted?

@raymondben
Copy link
Collaborator

This relates to the underlying ALA service that delivers the data - ALA4R just wraps that service. I've asked the ALA devs for comment, will report here.

@WCSPNG
Copy link

WCSPNG commented Apr 22, 2015

Nice package. Over the last 24 hours the occurrences function is producing errors that I haven't seen previously. Any ideas? e.g.

x=occurrences(taxon="penguins", download_reason_id=10)
Error in read.table(unz(thisfile, filename = "data.csv"), header = TRUE, :
no lines available in input

@raymondben
Copy link
Collaborator

@WCSPNG - I created a new issue for your comment, see #8

@raymondben
Copy link
Collaborator

Back to the geodeticDatum question. From the ALA devs:

"Generally it appears to operate like this:

  1. if datum is not supplied then set assertion geodeticDatumAssumedWgs84 and use raw lat lon and wgs84 as the processed location
  2. else if datum is not recognised then set assertion unrecognizedGeodeticDatum and use raw lat lon and raw datum as the processed location
  3. else if lat lon transformation to wgs84 is not successful then set assertion decimalLatLongConversionFailed and use transformed lat lon and wgs84 as the processed location

Your example http://biocache.ala.org.au/ws/occurrence/5400e754-d39c-4814-82ca-2f29b40fb3e2 is (2). The processed location is using the unrecognised datum.

If supplying a valid raw datum the raw location and processed location datums do vary http://sandbox.ala.org.au/ws/occurrences/8580591d-80ba-44c9-9572-96a3d292581e"

I'll close the issue here. If more info is needed, suggest raising an issue on the repo that provides the underlying service: https://github.com/AtlasOfLivingAustralia/biocache-service

@WCSPNG
Copy link

WCSPNG commented Apr 24, 2015

Thank very much Ben.

The occurrence function started functioning normally again about 24
hours after I posted on GitHub. I now suspect that a rogue .Rprofile
file might have been interferring with the downloads (oddly "search
_fulltext" was working but not "occurrences") . Apologies for bothering you.

Wonderful package - so useful. I've stuck a RMarkdown doc on Rpubs to
showcase the package at a very basic level.

Cheers,
Nathan

On 23/04/2015 5:00 PM, Ben Raymond wrote:

@WCSPNG https://github.com/WCSPNG - I created a new issue for your
comment, see #8 #8


Reply to this email directly or view it on GitHub
#7 (comment).

Click here
https://www.mailcontrol.com/sr/Ozia0S6fQBbGX2PQPOmvUqW%21RI4xIDLrMVeu4IDYsR+gN%21lnmeTw7l1a4vbsEpc5MBnckTdHjFJsVqdfswMBgw==
to report this email as spam.

Scientific Support Officer
WCS Papua New Guinea
PO Box 277, Goroka, Eastern Highlands Province, Papua New Guinea
PNG Phone: (+675) 532-3494 Fax: (+675) 532-3180

/Our vision for PNG:
Gutpela sindaun, gutpela solwara, gutpela bus.
Empowered communities with healthy forests and seas./


This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants