Closed jyucsiro closed 4 years ago
@benjaminleighton creating an issue for the work you've been doing looking into this
The current API supports these cases albeit indirectly for example ASGS 2016 SA1 <-- ASGS 2016 LGA via two separate queries:
curl -X GET "http://localhost:8080/api/v1/location/overlaps?uri=http%3A%2F%2Flinked.data.gov.au%2Fdataset%2Fasgs2016%2Flocalgovernmentarea%2F10050&areas=true&proportion=true&contains=true&within=false&crosswalk=false&count=1000&offset=0" -H "accept: application/json"
Then this searches for everything built out of (one of those) meshblock including SA1: curl -X GET "http://localhost:8080/api/v1/location/overlaps?uri=http%3A%2F%2Flinked.data.gov.au%2Fdataset%2Fasgs2016%2Fmeshblock%2F10003720000&areas=true&proportion=true&contains=false&within=true&crosswalk=false&count=1000&offset=0" -H "accept: application/json"
The priority on this issue depends on how necessary it is in the short term to integrate this into the "crosswalks" functionality or something similar. It is probably fastest to use a combination of the above queries at the moment.
The LGA->SA1 use case is well handled and works well.
Testing other regions, found that the current problem is that albers areas are not available to do the proportion calculations. See http://loci.cat/integration-api.html for a list of datatypes for valid features to use with this API functionality. Also note the GH Issue https://github.com/CSIRO-enviro-informatics/asgs-dataset/issues/15 and a possible solution, which is to aggregate albers areas from the base units to build area values for returned features (since there are no overlaps).
Currently, the integration-api throws an error and doesn't return any feature uris. Could it be refactored with the above suggested solution, i.e. aggregate areas from matching base unit features?
This issue is for looking into validation and any refactoring needed to allow the
/location/overlaps
endpoint to work with new cache features. New logic might be needed to determine intra-dataset 'crosswalks'.Examples: