Closed tboch closed 7 years ago
Apologies, this is something I changed / broke in https://github.com/hipspy/hips/commit/8af90581b6d63c75d939226de4d23116609312b5 .
The reason I did was that I was using http://alasky.unistra.fr/DSS/DSS2Merged/properties for the example, and that file does not have a hips_service_url
key!???
OK, let me check this with my CDS colleagues. Reading again the HiPS document, it seems that hips_service_url key
is not required, which I don't understand for now.
A practical solution for now to get it to work for as many HiPS as possible might be to use hips_service_url
and to fall back to moc_access_url
(and leave a comment to one case where each is missing to explain why we do that). But yes, @adl1995 - Please wait for Thomas to make a decision here before making a PR.
Alright, for historical and pragmatic reasons, things are more complex than I first thought. The algorithm we could use is:
hips_service_url
if it existsmoc_access_url
@tboch Is the properties URL present under a key named properties_url
? I haven't been able to find this in any of the files in hips-extra
repository.
@adl1995 no, there isn't such key and I'm not sure why we would need one. What is the use case you were thinking of?
@tboch I was actually asking for clarification on third point of the algorithm you mentioned. Where can I find the properties URL?
Actually, the properties URL is the URL we pass as a parameter of class method HipsSurveyProperties.fetch
So, for example, if we start from the properties URL 'http://alasky.unistra.fr/DSS/DSS2Merged/properties'
and we can not find hips_service_url
or moc_access_url
, then base_url
should return 'http://alasky.unistra.fr/DSS/DSS2Merged'
@tboch Okay, but the object could also be instantiated from a local properties file, such as done here, what should be done in this case? Also, currently we don't store the properties URL in the fetch
class method. I think to make this possible, this would need to be manually added in OrderedDict
in the parse
method.
@adl1995 right, if the properties comes from a local file, then this last fallback can not be applied.
@adl1995 fixed this in PR #60
Closing this issue.
base_url
should be determined using thehips_service_url
keyword from the properties file.moc_access_url
currently used points to the coverage of the HiPS and this property might be missing. example: http://skies.esac.esa.int/pla/HFI_SkyMap_100_2048_R2_02_full_HiPS/properties doesn't have amoc_access_url
property. On the other hand,hips_service_url
will always be found.