Open dr-shorthair opened 4 years ago
Item 1.:
INSERT {
?gf loci:isMemberOf ?reg .
?reg a rdf:Bag , loci:Dataset ; rdfs:member ?gf .
}
WHERE {
{ ?gf a geof:ContractedCatchment . } UNION { ?gf a geof:DrainageDivision . } UNION { ?gf a geof:RiverRegion . }
BIND( IRI ( REPLACE ( STR (?gf), "(#|/)[^#/]*$", "$1" )) AS ?reg )
}
Item 2.:
INSERT { ?gf geo:hasGeometry ?gg . }
WHERE {
?gf a geof:RiverRegion .
BIND( IRI( CONCAT( "http://gds.loci.cat/geometry/geofabric2_1_1_riverregion/" , REPLACE( str( ?gf), '^.*(#|/)', "" ))) AS ?gg )
}
INSERT { ?gf geo:hasGeometry ?gg . }
WHERE {
?gf a geof:DrainageDivision.
BIND( IRI( CONCAT( "http://gds.loci.cat/geometry/geofabric2_1_1_awradrainagedivision/" , REPLACE( str( ?gf), '^.*(#|/)', "" ))) AS ?gg )
}
INSERT { ?gf geo:hasGeometry ?gg . }
WHERE {
?gf a geof:ContractedCatchment.
BIND( IRI( CONCAT( "http://gds.loci.cat/geometry/geofabric2_1_1_ahgfcontractedcatchment/" , REPLACE( str( ?gf), '^.*(#|/)', "" ))) AS ?gg )
}
Item 3.:
INSERT { ?gf dcterms:identifier ?id. }
WHERE {
{ ?gf a geof:ContractedCatchment . } UNION { ?gf a geof:DrainageDivision . } UNION { ?gf a geof:RiverRegion . }
BIND( STRDT( REPLACE( str( ?gf), '^.*(#|/)', "" ), geof:geofabric-id ) AS ?id)
}
geofabric view adapted by commit: https://github.com/CSIRO-enviro-informatics/geofabric-dataset/commit/26eb1f6abaea37196f18bd1e63ac7c6c0a252d69
This can probably be closed now.
@ashleysommer i can see you've implemented externalising the link to the geometry to gds.loci.cat so thanks for that.
The URI isn't quite right. We're using links like this. http://gds.loci.cat/geometry/geofabric2_1_1_awradrainagedivision/9400203
In geofabricld.net drainagedivision features, eg. https://geofabricld.net/drainagedivision/9400203?_view=geofabric&_format=text/turtle
... could you change this:
geo:hasDefaultGeometry <http://gds.loci.cat/geometry/geofabric2_1_1_drainagedivision/9400203> ;
geo:hasGeometry <http://gds.loci.cat/geometry/geofabric2_1_1_drainagedivision/9400203> .
to
geo:hasDefaultGeometry <http://gds.loci.cat/geometry/geofabric2_1_1_awradrainagedivision/9400203> ;
geo:hasGeometry <http://gds.loci.cat/geometry/geofabric2_1_1_awradrainagedivision/9400203> .
(missing awra
in the uri)
@jyucsiro Ok, made that change.
https://github.com/CSIRO-enviro-informatics/loci.cat/wiki/Simplifying-the-initial-ontologies describes a simplification of the Geofabric datasets to match a more unified Loc-I ontology pattern. The goal is to simplify/harmonize the SPARQL queries.
The transformations required are illustrated by-example as follows.
Original format from test data
Minor regularization
reg:register
→loci:isMemberOf
and inversegeo:hasGeometry
link to geometry servicehttp://linked.data.gov.au/dataset/geofabric/contractedcatchment/ rdfs:member http://linked.data.gov.au/dataset/geofabric/contractedcatchment/12101547 .