fix spatial subselect: region, region point and region bounding box data must be referenced by 3 different variables inside the query

This commit is contained in:
Enrico Ottonello 2020-03-17 16:27:14 +01:00
parent 32b91c277d
commit ef42eb551a
1 changed files with 20 additions and 20 deletions

View File

@ -30,17 +30,17 @@ CONSTRUCT {
?record aoprop:accessPolicy ?accessPolicy .
?record aoprop:accessRights ?accessRights .
?record aoprop:landingPage ?landingPage .
?record aoprop:spatial ?spatial .
?spatial aoprop:placeName ?spatialPlaceName .
?spatial aoprop:spatialCoordinateSystem ?spatialCoordinateSystem .
?spatial aoprop:location ?location .
?location aoprop:lat ?spatialLocationLat .
?location aoprop:lon ?spatialLocationLon .
?spatial aoprop:boxlocation ?boxlocation .
?boxlocation aoprop:boxMaxLat ?spatialLocationBBMaxLat .
?boxlocation aoprop:boxMaxLon ?spatialLocationBBMaxLon .
?boxlocation aoprop:boxMinLat ?spatialLocationBBMinLat .
?boxlocation aoprop:boxMinLon ?spatialLocationBBMinLon .
?record aoprop:spatialRegion ?spatialRegion .
?spatialRegion aoprop:placeName ?spatialPlaceName .
?spatialRegion aoprop:spatialCoordinateSystem ?spatialCoordinateSystem .
?record aoprop:spatialRegionPoint ?spatialRegionPoint .
?spatialRegionPoint aoprop:lat ?spatialLocationLat .
?spatialRegionPoint aoprop:lon ?spatialLocationLon .
?record aoprop:spatialRegionBox ?spatialRegionBox .
?spatialRegionBox aoprop:boxMaxLat ?spatialLocationBBMaxLat .
?spatialRegionBox aoprop:boxMaxLon ?spatialLocationBBMaxLon .
?spatialRegionBox aoprop:boxMinLat ?spatialLocationBBMinLat .
?spatialRegionBox aoprop:boxMinLon ?spatialLocationBBMinLon .
?record aoprop:temporal ?temporal .
?temporal aoprop:uri ?temporal .
?temporal aoprop:periodName ?temporalPeriodName .
@ -58,10 +58,10 @@ CONSTRUCT {
?record aoprop:language ?language .
}
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::aat>
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::273>
from <https://ariadne-infrastructure.eu/api_________::ariadne_plus::ads::271>
where {
?record aocat:has_language / skos:prefLabel ?language .
?record aocat:has_original_id ?originalId .
?record aocat:has_original_id ?originalId .
?record aocat:is_part_of ?partOf .
?record aocat:has_creator ?creator .
?creator aocat:has_name ?creatorName .
@ -136,22 +136,22 @@ where {
{
select *
where {
?record aocat:has_spatial_coverage ?spatial .
?spatial aocat:has_place_name ?spatialPlaceName .
?record aocat:has_spatial_coverage ?spatialRegion .
?spatialRegion aocat:has_place_name ?spatialPlaceName .
optional {
?spatial aocat:has_coordinate_system ?spatialCoordinateSystem .
?spatialRegion aocat:has_coordinate_system ?spatialCoordinateSystem .
}
optional {
?spatial aocat:has_latitude ?spatialLocationLat ;
?record aocat:has_spatial_coverage ?spatialRegionPoint .
?spatialRegionPoint aocat:has_latitude ?spatialLocationLat ;
aocat:has_longitude ?spatialLocationLon .
BIND(uri(concat('https://www.ariadne-infrastructure.eu/property/location/', md5(concat(str(?spatialLocationLat), str(?spatialLocationLon))))) as ?location)
}
optional {
?spatial aocat:has_bounding_box_max_lat ?spatialLocationBBMaxLat ;
?record aocat:has_spatial_coverage ?spatialRegionBox .
?spatialRegionBox aocat:has_bounding_box_max_lat ?spatialLocationBBMaxLat ;
aocat:has_bounding_box_max_lon ?spatialLocationBBMaxLon ;
aocat:has_bounding_box_min_lat ?spatialLocationBBMinLat ;
aocat:has_bounding_box_min_lon ?spatialLocationBBMinLon ;
BIND(uri(concat('https://www.ariadne-infrastructure.eu/property/location/', md5(concat(str(?spatialLocationBBMaxLat), str(?spatialLocationBBMaxLon), str(?spatialLocationBBMinLat), str(?spatialLocationBBMinLon))))) as ?boxlocation)
}
}
}