diff --git a/.gitignore b/.gitignore index 6c25108..3dc419f 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,6 @@ dist/ # Windows-specific files: Thumbs.db + +# Project-specific ignore: +trajectory_*.csv \ No newline at end of file diff --git a/uk/orchestrator/common_namespaces.py b/uk/orchestrator/common_namespaces.py new file mode 100644 index 0000000..8faa025 --- /dev/null +++ b/uk/orchestrator/common_namespaces.py @@ -0,0 +1,164 @@ +NS_SEP = ':' + +OWL_NS = 'owl' +OWL_TERM_ALLVALUESFROM = 'allValuesFrom' +OWL_ALLVALUESFROM = OWL_NS + NS_SEP + OWL_TERM_ALLVALUESFROM +OWL_TERM_CLASS = 'Class' +OWL_CLASS = OWL_NS + NS_SEP + OWL_TERM_CLASS +OWL_TERM_DATATYPEPROPERTY = 'DatatypeProperty' +OWL_DATATYPEPROPERTY = OWL_NS + NS_SEP + OWL_TERM_DATATYPEPROPERTY +OWL_TERM_NAMEDINDIVIDUAL = 'NamedIndividual' +OWL_NAMEDINDIVIDUAL = OWL_NS + NS_SEP + OWL_TERM_NAMEDINDIVIDUAL +OWL_TERM_OBJECTPROPERTY = 'ObjectProperty' +OWL_OBJECTPROPERTY = OWL_NS + NS_SEP + OWL_TERM_OBJECTPROPERTY +OWL_TERM_ONPROPERTY = 'onProperty' +OWL_ONPROPERTY = OWL_NS + NS_SEP + OWL_TERM_ONPROPERTY +OWL_TERM_QUALIFIEDCARDINALITY = 'qualifiedCardinality' +OWL_QUALIFIEDCARDINALITY = OWL_NS + NS_SEP + OWL_TERM_QUALIFIEDCARDINALITY +OWL_TERM_RESTRICTION = 'Restriction' +OWL_RESTRICTION = OWL_NS + NS_SEP + OWL_TERM_RESTRICTION +OWL_TERM_THING = 'Thing' +OWL_THING = OWL_NS + NS_SEP + OWL_TERM_THING +OWL_TERM_UNIONOF = 'unionOf' +OWL_UNIONOF = OWL_NS + NS_SEP + OWL_TERM_UNIONOF + +RDF_NS = 'rdf' +RDF_TERM_PROPERTY = 'Property' +RDF_PROPERTY = RDF_NS + NS_SEP + RDF_TERM_PROPERTY +RDF_TERM_TYPE = 'type' +RDF_TYPE = RDF_NS + NS_SEP + RDF_TERM_TYPE + +RDFS_NS = 'rdfs' +RDFS_TERM_COMMENT = 'comment' +RDFS_COMMENT = RDFS_NS + NS_SEP + RDFS_TERM_COMMENT +RDFS_TERM_DOMAIN = 'domain' +RDFS_DOMAIN = RDFS_NS + NS_SEP + RDFS_TERM_DOMAIN +RDFS_TERM_ISDEFINEDBY = 'isDefinedBy' +RDFS_ISDEFINEDBY = RDFS_NS + NS_SEP + RDFS_TERM_ISDEFINEDBY +RDFS_TERM_LABEL = 'label' +RDFS_LABEL = RDFS_NS + NS_SEP + RDFS_TERM_LABEL +RDFS_TERM_RANGE = 'range' +RDFS_RANGE = RDFS_NS + NS_SEP + RDFS_TERM_RANGE +RDFS_TERM_SUBCLASSOF = 'subClassOf' +RDFS_SUBCLASSOF = RDFS_NS + NS_SEP + RDFS_TERM_SUBCLASSOF + +SKOS_NS = 'skos' +SKOS_TERM_ALTLABEL = 'altLabel' +SKOS_ALTLABEL = SKOS_NS + NS_SEP + SKOS_TERM_ALTLABEL +SKOS_TERM_PREFLABEL = 'prefLabel' +SKOS_PREFLABEL = SKOS_NS + NS_SEP + SKOS_TERM_PREFLABEL + +XSD_NS = 'xsd' +XSD_TERM_BOOLEAN = 'boolean' +XSD_BOOLEAN = XSD_NS + NS_SEP + XSD_TERM_BOOLEAN +XSD_BOOL_TRUE = '1' +XSD_BOOL_FALSE = '0' +XSD_BOOL_TRUE_ALT = 'true' +XSD_BOOL_FALSE_ALT = 'false' +XSD_TERM_DATE = 'date' +XSD_DATE = XSD_NS + NS_SEP + XSD_TERM_DATE +XSD_TERM_TIME = 'time' +XSD_TIME = XSD_NS + NS_SEP + XSD_TERM_TIME +XSD_TERM_DATETIME = 'dateTime' +XSD_DATETIME = XSD_NS + NS_SEP + XSD_TERM_DATETIME +XSD_DATETIME_FORMATSTR = '%Y-%m-%dT%H:%M:%S.%f' +XSD_TERM_DOUBLE = 'double' +XSD_DOUBLE = XSD_NS + NS_SEP + XSD_TERM_DOUBLE +XSD_TERM_FLOAT = 'float' +XSD_FLOAT = XSD_NS + NS_SEP + XSD_TERM_FLOAT +XSD_TERM_INTEGER = 'integer' +XSD_INTEGER = XSD_NS + NS_SEP + XSD_TERM_INTEGER +XSD_TERM_STRING = 'string' +XSD_STRING = XSD_NS + NS_SEP + XSD_TERM_STRING + +DCTERMS_NS = 'dcterms' +DCTERMS_TERM_TITLE = 'title' +DCTERMS_TITLE = DCTERMS_NS + NS_SEP + DCTERMS_TERM_TITLE + +## Common namespaces +default_prefixes = { + "dc": "http://purl.org/dc/elements/1.1/", + "dcam": "http://purl.org/dc/dcam/", + DCTERMS_NS: "http://purl.org/dc/terms/", + "fn": "http://www.w3.org/2005/xpath-functions#", + "foaf": "http://xmlns.com/foaf/0.1/", + OWL_NS: "http://www.w3.org/2002/07/owl#", + RDF_NS: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + RDFS_NS: "http://www.w3.org/2000/01/rdf-schema#", + SKOS_NS: "http://www.w3.org/2004/02/skos/core#", + XSD_NS: "http://www.w3.org/2001/XMLSchema#", +} + +_default_prefixes_inverse = \ + {value: key for key, value in default_prefixes.items()} + +def expandIRI(iri: str, knss) -> str: + # Split the IRI string at the first colon. + partList = iri.split(':', 1) + # If the first part matches a known namespace, then replace + # that namespace with its full URL, otherwise just return + # the original string. + return knss[partList[0]] + partList[1] if partList[0] in knss else iri + +def isNamespacedIRI(iri: str, knss) -> bool: + # Split the IRI string at the first colon. + partList = iri.split(':', 1) + return partList[0] in knss + +def nameFromIRI(iri: str, includeNamespace: bool=False, + knssInv: dict=None) -> str: + """ + Extracts the 'name' of an entity from an IRI string, by using + everything following the last hash if present, otherwise + the last forward slash if present, otherwise the last colon if + present. If none of these are present, the whole string is returned. + Prepends the namespace with an underscore if applicable and requested. + WARNING: IRIs are arbitrary and should never be abused to convey or + extract information, meaning, or conclusion of *any kind*! + """ + if iri.find('#') > 0: + if includeNamespace: + parts = iri.rsplit('#', 1) + key = parts[0] + '#' + if key in knssInv: + parts[0] = knssInv[key] + return '_'.join(parts) + else: + return parts[1] + else: + return iri.rsplit('#', 1)[1] + elif iri.find('/') > 0: + if includeNamespace: + parts = iri.rsplit('/', 1) + key = parts[0] + '/' + if key in knssInv: + parts[0] = knssInv[key] + return '_'.join(parts) + else: + return parts[1] + else: + return iri.rsplit('/', 1)[1] + elif iri.find(':') > 0: + # This covers namespaced IRIs. + if includeNamespace: + return '_'.join(iri.rsplit(':', 1)) + else: + return iri.rsplit(':', 1)[1] + else: + return iri + +def namespace_name_or_iri(name: str, prefixes: dict[str, str], + prefix_key: str) -> str: + if ":" in name: + # The name is either already namespaced, or is a full IRI. + for p in prefixes: + if name.startswith(prefixes[p]): + # This is a full IRI for which we have a namespace. + return name.replace(prefixes[p], f"{p}:") + # If we cannot find a matching namespace IRI, we assume the + # name is already namespaced. + return name + else: + # The name appears to be neither namespaced, nor a full IRI, + # so we prepend the given prefix with a colon. + return f"{prefix_key}:{name}" diff --git a/uk/orchestrator/processor.py b/uk/orchestrator/processor.py new file mode 100644 index 0000000..b032ca0 --- /dev/null +++ b/uk/orchestrator/processor.py @@ -0,0 +1,304 @@ +import requests +import time +import logging + +from storeclient import RemoteStoreClient +import sparql_builder as qb +from common_namespaces import RDF_TYPE, DCTERMS_TITLE + + +logger = logging.getLogger(__name__) + +STACK_HOST = "http://localhost:3838" + +FTA_PREPROCESS_TRAJECTORY_ROUTE = "preprocess" +FTA_INSTANTIATE_TRAJECTORY_ROUTE = "instantiate" +PROCESS_TRAJECTORY_ROUTE = "process_trajectory" +CALCULATE_EXPOSURE_ROUTE = "calculate_exposure" +EXPORT_CSV_TRAJ_ROUTE = "csv_export/trajectory" +GENERATE_LAYER_ROUTE = "" + +TIMEOUT = 3600 + +TWA_BASE_URL = "https://www.theworldavatar.com/kg/" + +# DCAT +DCAT_BASE_URL = "http://www.w3.org/ns/dcat#" +DCAT_DATASET = DCAT_BASE_URL + "Dataset" +# OntoDevice +OD_BASE_URL = "https://www.theworldavatar.com/kg/ontodevice.owl/" +OD_POINT = OD_BASE_URL + "Point" +# OntoTimeSeries +OTS_BASE_URL = "https://www.theworldavatar.com/kg/ontotimeseries/" +OTS_HAS_TIMESERIES = OTS_BASE_URL + "hasTimeSeries" +# OntoExposure +OE_BASE_URL = "https://www.theworldavatar.com/kg/ontoexposure/" +OE_TRAJECTORY_COUNT = OE_BASE_URL + "TrajectoryCount" +OE_TRAJECTORY_AREA = OE_BASE_URL + "TrajectoryArea" +OE_TRAJECTORY_AREA_WGT_SUM = OE_BASE_URL + "TrajectoryAreaWeightedSum" +#https://www.theworldavatar.com/kg/ontoexposure/Count +#https://www.theworldavatar.com/kg/ontoexposure/Area +#https://www.theworldavatar.com/kg/ontoexposure/AreaWeightedSum +OE_HAS_DISTANCE = OE_BASE_URL + "hasDistance" + + +def log_msg(msg: str, level = logging.INFO) -> None: + """ + Utility function that prints a message to the console and + appends the same message to a log file for record keeping. + """ + timestamp = time.strftime("%Y-%m-%dT%H:%M:%S") + logger.log(level, f"{timestamp}: {msg}") + if level >= logger.getEffectiveLevel(): + print(f"{timestamp}: WARNING: {msg}" if level == logging.WARN + else f"{timestamp}: {msg}") + + +class TripleStore: + + def __init__(self, query_url: str) -> None: + self.query_url = query_url + self.store_client = RemoteStoreClient(query_url) + + +class TrajectoryStore(TripleStore): + + def get_trajectory_iris(self) -> list[str]: + """ + Queries the triple store for OntoDevice:Point instances + that have a timeseries and returns the list of Point IRIs. + """ + sb = qb.SPARQLSelectBuilder() + pointVarName = "point" + tsVarName = "ts" + sb.addVar(qb.makeVarRef(pointVarName)) + sb.addWhere(qb.makeVarRef(pointVarName), + qb.makeIRIRef(OTS_HAS_TIMESERIES), qb.makeVarRef(tsVarName)) + sb.addWhere(qb.makeVarRef(pointVarName), + qb.makeIRIRef(RDF_TYPE), qb.makeIRIRef(OD_POINT)) + query_str = sb.build() + response = self.store_client.query(query_str) + return [b[pointVarName]["value"] for b in response["results"]["bindings"]] + + +class EnvironmentalDataStore(TripleStore): + + def get_dataset_iris(self) -> dict[str, str]: + """ + Queries the triple store for environmental datasets and returns a + dictionary with the dataset titles as keys and their IRIs as values. + """ + sb = qb.SPARQLSelectBuilder() + datasetVarName = "dataset" + titleVarName = "title" + sb.addVar(qb.makeVarRef(datasetVarName)) + sb.addVar(qb.makeVarRef(titleVarName)) + sb.addWhere(qb.makeVarRef(datasetVarName), + qb.makeIRIRef(RDF_TYPE), qb.makeIRIRef(DCAT_DATASET)) + sb.addWhere(qb.makeVarRef(datasetVarName), + qb.makeIRIRef(DCTERMS_TITLE), qb.makeVarRef(titleVarName)) + query_str = sb.build() + response = self.store_client.query(query_str) + return {b[titleVarName]["value"]:b[datasetVarName]["value"] for b in response["results"]["bindings"]} + + +class MetricStore(TripleStore): + + def _instantiate_metric(self, type_iri: str, distance: int) -> str: + """ + Instantiates an exposure metric by adding hard-coded triples + to the triple store. + """ + ub = qb.SPARQLUpdateBuilder() + metric_iri = f"{TWA_BASE_URL}{type_iri.rstrip(' /').split('/')[-1]}{str(distance)}m" + ub.addInsert( + qb.makeIRIRef(metric_iri), "a", qb.makeIRIRef(type_iri) + ) + ub.addInsert( + qb.makeIRIRef(metric_iri), + qb.makeIRIRef(OE_HAS_DISTANCE), + f'"{str(distance)}"' + ) + update_str = ub.build() + self.store_client.update(update_str) + return metric_iri + + def instantiate_metrics(self) -> None: + """ + Instantiates some exposure metrics. + """ + self._instantiate_metric(OE_TRAJECTORY_COUNT, 50) + self._instantiate_metric(OE_TRAJECTORY_AREA, 50) + + def get_metric_iris(self, type_iri: str) -> list[str]: + sb = qb.SPARQLSelectBuilder() + metricVarName = "metric" + sb.addVar(qb.makeVarRef(metricVarName)) + sb.addWhere(qb.makeVarRef(metricVarName), + qb.makeIRIRef(RDF_TYPE), qb.makeIRIRef(type_iri)) + query_str = sb.build() + response = self.store_client.query(query_str) + return [b[metricVarName]["value"] for b in response["results"]["bindings"]] + + +class Agent: + + def __init__(self, base_url: str) -> None: + self.base_url = f"{base_url.rstrip(' /')}/" + + +class TrajectoryAgent(Agent): + + def preprocess(self, timeout: int) -> str: + """ + Runs trajectory preprocessing. + """ + url = f"{self.base_url}{FTA_PREPROCESS_TRAJECTORY_ROUTE}" + r = requests.post(url, params={}, timeout=timeout) + r.raise_for_status() + return r.text + + def instantiate(self, timeout: int) -> str: + """ + Runs trajectory instantiation. + """ + url = f"{self.base_url}{FTA_INSTANTIATE_TRAJECTORY_ROUTE}" + r = requests.post(url, params={}, timeout=timeout) + r.raise_for_status() + return r.text + + +class TripAgent(Agent): + + def process_trajectory(self, iri: str, timeout: int) -> str: + """ + Runs trip detection for a trajectory. + """ + url = f"{self.base_url}{PROCESS_TRAJECTORY_ROUTE}" + r = requests.post(url, params={"iri": iri}, timeout=timeout) + r.raise_for_status() + return r.text + + +class ExposureCalculationAgent(Agent): + + def calculate_exposure(self, subject: str, exposure: str, calculation: str, timeout: int) -> str: + url = f"{self.base_url}{CALCULATE_EXPOSURE_ROUTE}" + params = { + "subject": subject, + "exposure": exposure, + "calculation": calculation + } + r = requests.post(url, json=params, timeout=timeout) + r.raise_for_status() + return r.text + + def export_csv(self, traj_iri: str, + metric_type_iri: str | list[str], + exposure_table: str | list[str], + include_lat_lng: bool, + refresh_of_cache: bool, + timeout: int, + filename: str + ) -> str: + url = f"{self.base_url}{EXPORT_CSV_TRAJ_ROUTE}" + params = { + "subject": traj_iri, + "rdf_type": metric_type_iri, + "exposure_table": exposure_table, + "include_lat_lng": include_lat_lng, + "refresh_of_cache": refresh_of_cache + } + r = requests.get(url, params=params, timeout=timeout) + log_msg(f"Request URL: {r.request.url}") + r.raise_for_status() + with open(filename, "wb") as f: + f.write(r.content) + return f"Wrote file '{filename}'." + + +class TripLayerGenerator(Agent): + + def generate(self, iri: str, layer_group_name: str, host: str, + layer_name: str, colour: str, width: int, timeout: int + ) -> str: + url = f"{self.base_url}{GENERATE_LAYER_ROUTE}" + params = { + "iri": iri, + "layerGroupName": layer_group_name, + "host": host, + "layerName": layer_name, + "colour": colour, + "width": width + } + r = requests.post(url, params=params, timeout=timeout) + r.raise_for_status() + return r.text + + +def instantiate_trajectories(): + traj_agent = TrajectoryAgent(f"{STACK_HOST}/fenland-trajectory-agent") + log_msg("Preprocessing trajectories...") + log_msg(traj_agent.preprocess(TIMEOUT)) + log_msg("Instantiating trajectories...") + log_msg(traj_agent.instantiate(TIMEOUT)) + + +def instantiate(): + instantiate_trajectories() + time.sleep(5) + trajectory_store = TrajectoryStore(f"{STACK_HOST}/blazegraph/namespace/hd4/sparql") + traj_iris = trajectory_store.get_trajectory_iris() + #print(f"Trajectory IRIs: {traj_iris}") + env_store = EnvironmentalDataStore(f"{STACK_HOST}/blazegraph/namespace/kb/sparql") + env_dataset_iris = env_store.get_dataset_iris() + log_msg(f"Environmental datasets:\n{str(env_dataset_iris)}") + metric_store = MetricStore(f"{STACK_HOST}/blazegraph/namespace/hd4/sparql") + metric_store.instantiate_metrics() + count_metric_iris = metric_store.get_metric_iris(OE_TRAJECTORY_COUNT) + area_metric_iris = metric_store.get_metric_iris(OE_TRAJECTORY_AREA) + log_msg(f"Trajectory count metrics: {str(count_metric_iris)}") + log_msg(f"Trajectory area metrics: {str(area_metric_iris)}") + trip_agent = TripAgent(f"{STACK_HOST}/trip-agent") + exp_calc_agent = ExposureCalculationAgent(f"{STACK_HOST}/exposure-calculation-agent") + layer_generator = TripLayerGenerator(f"{STACK_HOST}/trip-layer-generator/") + for traj_iri in traj_iris: + log_msg(f"Detecting trips for trajectory '{traj_iri}'...") + log_msg(trip_agent.process_trajectory(traj_iri, timeout=TIMEOUT)) + for exp_key in env_dataset_iris: + log_msg(f"Calculating exposure of '{exp_key}' to trajectory '{traj_iri}'...") + log_msg(exp_calc_agent.calculate_exposure( + traj_iri, env_dataset_iris[exp_key], count_metric_iris[0], TIMEOUT)) + exp_key = "greenspace_sites" + log_msg(f"Calculating exposure of '{exp_key}' to trajectory '{traj_iri}'...") + log_msg(exp_calc_agent.calculate_exposure( + traj_iri, env_dataset_iris[exp_key], area_metric_iris[0], TIMEOUT)) + time.sleep(1) + log_msg(f"Generating GeoServer layers for trajectory '{traj_iri}'...") + log_msg(layer_generator.generate(traj_iri, "Trajectories", STACK_HOST, + f"trajectory_{traj_iri.rstrip(' /')[-8:]}", "cyan", 3, TIMEOUT)) + + +def export_results(): + trajectory_store = TrajectoryStore(f"{STACK_HOST}/blazegraph/namespace/hd4/sparql") + traj_iris = trajectory_store.get_trajectory_iris() + env_store = EnvironmentalDataStore(f"{STACK_HOST}/blazegraph/namespace/kb/sparql") + env_dataset_iris = env_store.get_dataset_iris() + exp_calc_agent = ExposureCalculationAgent(f"{STACK_HOST}/exposure-calculation-agent") + for traj_iri in traj_iris: + log_msg(f"Exporting CSV for trajectory '{traj_iri}'...") + log_msg(exp_calc_agent.export_csv(traj_iri, + [OE_TRAJECTORY_COUNT, OE_TRAJECTORY_AREA], + list(env_dataset_iris.keys()), True, True, TIMEOUT, + f"trajectory_{traj_iri.rstrip(' /')[-8:]}.csv")) + + +def main(): + logging.basicConfig(filename="job.log", + encoding="UTF-8", level=logging.INFO) + instantiate() + export_results() + + +if __name__== '__main__': + main() diff --git a/uk/orchestrator/requirements.txt b/uk/orchestrator/requirements.txt new file mode 100644 index 0000000..2969aba --- /dev/null +++ b/uk/orchestrator/requirements.txt @@ -0,0 +1,4 @@ +requests +pandas +rdflib +SPARQLWrapper \ No newline at end of file diff --git a/uk/orchestrator/sparql_builder.py b/uk/orchestrator/sparql_builder.py new file mode 100644 index 0000000..53a0e24 --- /dev/null +++ b/uk/orchestrator/sparql_builder.py @@ -0,0 +1,166 @@ +import sparql_constants +import common_namespaces + +def makeIRIRef(iri) -> str: + return iri if common_namespaces.isNamespacedIRI(iri, \ + common_namespaces.default_prefixes) else '<' + iri + '>' + +def makeVarRef(varName: str) -> str: + return '?' + varName + +def makeLiteralStr(valueStr: str, typeStr: str) -> str: + return '"' + valueStr + '"^^' + typeStr + +def make_prefix_str(namespace: str, url: str) -> str: + return f"{sparql_constants.PREFIX} {namespace}: <{url}>" + +class SPARQLWhereBuilder(): + + def __init__(self): + self._prefixes = {} + self._vars = [] + self._wheres = [] + self._filter = "" + self._optional_wheres = [] + + def addPrefix(self, ans, aurl): + self._prefixes[ans] = aurl + return self + + def addVar(self, avar): + self._vars.append(avar) + return self + + def addWhere(self, asub, apred, aobj, optional: bool=False): + if optional: + self._optional_wheres.append([asub, apred, aobj]) + else: + self._wheres.append([asub, apred, aobj]) + return self + + def addFilter(self, filter: str): + self._filter = filter + return self + + def autoAddPrefixes(self, apat, anss): + """ + Iterates through a collection of triples and adds + any of the provided namespaces, if they appear in the + triples, as prefixes. + """ + # Iterate through all triples in the pattern. + for triple in apat: + # Iterate through all three components of the triple. + for s in triple: + # Catch literals. + parts = s.rsplit('^^', 1) + pre_ns = parts[1] if len(parts) == 2 else s + # Extract the string before any colon. + ns = pre_ns.split(':', 1)[0] + # If that string matches a known namespace... + if ns in anss: + self.addPrefix(ns, anss[ns]) + + def buildPattern(self, apat, optional: bool=False): + pstrlist = [] + ## TODO: Separate multiple operations by semicolon, + ## without repeating the subject. + for triple in apat: + pstr = " ".join(triple) + if optional: + pstr = f"{sparql_constants.OPTIONAL} {{{pstr}}}" + pstrlist.append(pstr) + return " . ".join(pstrlist) + + def build(self) -> str: + if self._wheres or self._optional_wheres: + strlist = [] + strlist.append(sparql_constants.WHERE + " {") + if self._wheres: + strlist.append(self.buildPattern(self._wheres)) + if self._filter != "": + strlist.append(sparql_constants.FILTER) + strlist.append(self._filter) + if self._optional_wheres: + if self._wheres: + strlist.append(".") + strlist.append(self.buildPattern(self._optional_wheres, + optional=True)) + strlist.append("}") + return " ".join(strlist) + else: + return "" + +class SPARQLSelectBuilder(SPARQLWhereBuilder): + + def __init__(self): + super().__init__() + self._is_distinct = False + self._limit = 0 + + def set_distinct(self, distinct: bool=True) -> None: + self._is_distinct = distinct + + def add_limit(self, limit: int) -> None: + self._limit = limit + + def build(self, additional_prefixes: dict[str, str]={}): + prefix_lib = common_namespaces.default_prefixes.copy() + prefix_lib.update(additional_prefixes) + self.autoAddPrefixes(self._wheres, prefix_lib) + strlist = [] + for p in self._prefixes: + strlist.append(make_prefix_str(p, self._prefixes[p])) + strlist.append(sparql_constants.SELECT) + if self._is_distinct: + strlist.append(sparql_constants.DISTINCT) + strlist.extend(self._vars) + ## Build where block. + strlist.append(super().build()) + if self._limit > 0: + strlist.append(sparql_constants.LIMIT) + strlist.append(str(self._limit)) + return " ".join(strlist) + +class SPARQLUpdateBuilder(SPARQLWhereBuilder): + + def __init__(self): + super().__init__() + self._inserts = [] + self._deletes = [] + + def addInsert(self, asub, apred, aobj): + self._inserts.append([asub, apred, aobj]) + return self + + def addDelete(self, asub, apred, aobj): + self._deletes.append([asub, apred, aobj]) + return self + + def build(self): + strlist = [] + if self._inserts: + self.autoAddPrefixes(self._inserts, common_namespaces.default_prefixes) + if self._deletes: + self.autoAddPrefixes(self._deletes, common_namespaces.default_prefixes) + for p in self._prefixes: + strlist.append(make_prefix_str(p, self._prefixes[p])) + if self._deletes: + strlist.append(sparql_constants.DELETE) + if not self._wheres: + strlist.append(sparql_constants.DATA) + strlist.append("{") + strlist.append(self.buildPattern(self._deletes)) + strlist.append("}") + if self._inserts: + if self._deletes: + strlist.append(";") + strlist.append(sparql_constants.INSERT) + if not self._wheres: + strlist.append(sparql_constants.DATA) + strlist.append("{") + strlist.append(self.buildPattern(self._inserts)) + strlist.append("}") + ## Build where block. + strlist.append(super().build()) + return " ".join(strlist) diff --git a/uk/orchestrator/sparql_constants.py b/uk/orchestrator/sparql_constants.py new file mode 100644 index 0000000..8fe91d9 --- /dev/null +++ b/uk/orchestrator/sparql_constants.py @@ -0,0 +1,54 @@ +## SPARQL 1.1 language definition +## https://www.w3.org/TR/sparql11-query/ +ADD = "ADD" +ALL = "ALL" +ASC = "ASC" +AS = "AS" +ASK = "ASK" +BASE = "BASE" +BIND = "BIND" +CLEAR = "CLEAR" +CONSTRUCT = "CONSTRUCT" +COPY = "COPY" +COUNT = "COUNT" +CREATE = "CREATE" +DATA = "DATA" +DEFAULT = "DEFAULT" +DELETE = "DELETE" +DESC = "DESC" +DESCRIBE = "DESCRIBE" +DISTINCT = "DISTINCT" +DROP = "DROP" +FILTER = "FILTER" +FROM = "FROM" +GRAPH = "GRAPH" +GROUP_BY = "GROUP BY" +HAVING = "HAVING" +INSERT = "INSERT" +INTO = "INTO" +LIMIT = "LIMIT" +LOAD = "LOAD" +MAX = "MAX" +MIN = "MIN" +MINUS = "MINUS" +MOVE = "MOVE" +NAMED = "NAMED" +OFFSET = "OFFSET" +OPTIONAL = "OPTIONAL" +ORDER_BY = "ORDER BY" +PREFIX = "PREFIX" +REDUCED = "REDUCED" +SELECT = "SELECT" +SERVICE = "SERVICE" +SILENT = "SILENT" +SUM = "SUM" +TO = "TO" +UNION = "UNION" +UNDEF = "UNDEF" +USING = "USING" +VALUES = "VALUES" +WHERE = "WHERE" +WITH = "WITH" + +ISIRI = "isIRI" +ISLITERAL = "isLiteral" diff --git a/uk/orchestrator/storeclient.py b/uk/orchestrator/storeclient.py new file mode 100644 index 0000000..75d6f69 --- /dev/null +++ b/uk/orchestrator/storeclient.py @@ -0,0 +1,62 @@ +import json +from SPARQLWrapper import SPARQLWrapper, JSON, POST +from rdflib import Graph + +class StoreClient: + + def query(self, query_str: str) -> dict: + raise Exception(f"Query method is not implemented " + f"for abstract {self.__class__.__name__} class!") + + def update(self, query_str: str) -> None: + raise Exception(f"Update method is not implemented " + f"for abstract {self.__class__.__name__} class!") + +class RemoteStoreClient(StoreClient): + + def __init__(self, url: str) -> None: + self._url = url + + def url(self): + return self._url + + def query(self, query_str: str) -> dict: + w = SPARQLWrapper(self.url()) + w.setReturnFormat(JSON) + w.setQuery(query_str) + return w.query().convert() + + def update(self, query_str: str) -> None: + if query_str is not None and query_str != "": + w = SPARQLWrapper(self.url()) + w.setMethod(POST) + w.setQuery(query_str) + w.query() + +class RdflibStoreClient(StoreClient): + + def __init__(self, + g: Graph | None = None, filename: str | None = None + ) -> None: + if g is None: + self._g = Graph() + if filename is not None: + self._g.parse(filename) + else: + self._g = g + + def query(self, query_str: str) -> dict: + reply = self._g.query(query_str) + json_bytes = reply.serialize(format='json') + if json_bytes is None: + q_result = {} + else: + # Decode UTF-8 bytes to Unicode, and convert single quotes + # to double quotes to make it a valid JSON string. + json_str = json_bytes.decode('utf8').replace("'", '"') + q_result = json.loads(json_str) + return q_result + + def update(self, query_str: str) -> None: + if query_str is not None and query_str != "": + self._g.update(query_str) diff --git a/uk/stack-data-uploader/inputs/config/fastfoodoutlets.json b/uk/stack-data-uploader/inputs/config/fastfoodoutlets.json new file mode 100644 index 0000000..fafe1d7 --- /dev/null +++ b/uk/stack-data-uploader/inputs/config/fastfoodoutlets.json @@ -0,0 +1,35 @@ +{ + "database": "postgres", + "workspace": "the_world_avatar", + "datasetDirectory": "fastfoodoutlets", + "skip": false, + "dataSubsets": [ + { + "type": "vector", + "skip": false, + "schema": "public", + "table": "fastfoodoutlets", + "subdirectory": "vector", + "ogr2ogrOptions": { + "layerCreationOptions": { + "GEOMETRY_NAME": "wkb_geometry" + }, + "sridIn": "EPSG:27700", + "sridOut": "EPSG:4326", + "inputDatasetOpenOptions": { + "X_POSSIBLE_NAMES": "feature_easting", + "Y_POSSIBLE_NAMES": "feature_northing" + } + }, + "additionalMetadata": { + "prefixes": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "triplePatterns": "?dataSubset rdfs:label 'Fast food outlets'." + } + } + ], + "mappings": [ + "fastfoodoutlets.obda" + ] +} diff --git a/uk/stack-data-uploader/inputs/config/greenspace.json b/uk/stack-data-uploader/inputs/config/greenspace.json new file mode 100644 index 0000000..30598d6 --- /dev/null +++ b/uk/stack-data-uploader/inputs/config/greenspace.json @@ -0,0 +1,71 @@ +{ + "database": "postgres", + "workspace": "the_world_avatar", + "datasetDirectory": "greenspace", + "dataSubsets": [ + { + "type": "vector", + "skip": false, + "schema": "public", + "table": "greenspace_sites", + "subdirectory": "sites", + "ogr2ogrOptions": { + "otherOptions": { + "-nlt": ["MULTIPOLYGON"] + } + }, + "geoServerSettings": { + "virtualTable": { + "name": "greenspace_sites_extended", + "sql": "SELECT *, \"distName1\" AS \"name\" FROM greenspace_sites", + "escapeSql": false, + "geometry": { + "name": "wkb_geometry", + "type": "MultiPolygon", + "srid": 27700 + } + } + }, + "additionalMetadata": { + "prefixes": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "triplePatterns": "?dataSubset rdfs:label 'Greenspace areas'." + } + }, + { + "type": "vector", + "skip": false, + "schema": "public", + "table": "greenspace_accesspoints", + "subdirectory": "accesspoints", + "ogr2ogrOptions": { + "otherOptions": { + "-nlt": ["POINT"] + } + }, + "geoServerSettings": { + "virtualTable": { + "name": "greenspace_accesspoints_extended", + "sql": "SELECT *, \"accessType\" AS \"name\" FROM greenspace_accesspoints", + "escapeSql": false, + "geometry": { + "name": "wkb_geometry", + "type": "Point", + "srid": 27700 + } + } + }, + "additionalMetadata": { + "prefixes": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "triplePatterns": "?dataSubset rdfs:label 'Greenspace access points'." + } + } + ], + "mappings": [ + "greenspace.obda" + ] +} + diff --git a/uk/stack-data-uploader/inputs/config/hd4.json b/uk/stack-data-uploader/inputs/config/hd4.json new file mode 100644 index 0000000..0a06ba8 --- /dev/null +++ b/uk/stack-data-uploader/inputs/config/hd4.json @@ -0,0 +1,9 @@ +{ + "name": "hd4", + "externalDatasets": [ + "fastfoodoutlets", + "greenspace", + "physact", + "supermarkets" + ] +} diff --git a/uk/stack-data-uploader/inputs/config/physact.json b/uk/stack-data-uploader/inputs/config/physact.json new file mode 100644 index 0000000..11e174a --- /dev/null +++ b/uk/stack-data-uploader/inputs/config/physact.json @@ -0,0 +1,35 @@ +{ + "database": "postgres", + "workspace": "the_world_avatar", + "datasetDirectory": "physact", + "skip": false, + "dataSubsets": [ + { + "type": "vector", + "skip": false, + "schema": "public", + "table": "physact", + "subdirectory": "vector", + "ogr2ogrOptions": { + "layerCreationOptions": { + "GEOMETRY_NAME": "wkb_geometry" + }, + "sridIn": "EPSG:27700", + "sridOut": "EPSG:4326", + "inputDatasetOpenOptions": { + "X_POSSIBLE_NAMES": "feature_easting", + "Y_POSSIBLE_NAMES": "feature_northing" + } + }, + "additionalMetadata": { + "prefixes": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "triplePatterns": "?dataSubset rdfs:label 'Physical activity venues'." + } + } + ], + "mappings": [ + "physact.obda" + ] +} diff --git a/uk/stack-data-uploader/inputs/config/supermarkets.json b/uk/stack-data-uploader/inputs/config/supermarkets.json new file mode 100644 index 0000000..a00b038 --- /dev/null +++ b/uk/stack-data-uploader/inputs/config/supermarkets.json @@ -0,0 +1,35 @@ +{ + "database": "postgres", + "workspace": "the_world_avatar", + "datasetDirectory": "supermarkets", + "skip": false, + "dataSubsets": [ + { + "type": "vector", + "skip": false, + "schema": "public", + "table": "supermarkets", + "subdirectory": "vector", + "ogr2ogrOptions": { + "layerCreationOptions": { + "GEOMETRY_NAME": "wkb_geometry" + }, + "sridIn": "EPSG:27700", + "sridOut": "EPSG:4326", + "inputDatasetOpenOptions": { + "X_POSSIBLE_NAMES": "feature_easting", + "Y_POSSIBLE_NAMES": "feature_northing" + } + }, + "additionalMetadata": { + "prefixes": { + "rdfs": "http://www.w3.org/2000/01/rdf-schema#" + }, + "triplePatterns": "?dataSubset rdfs:label 'Supermarkets'." + } + } + ], + "mappings": [ + "supermarkets.obda" + ] +} diff --git a/uk/stack-data-uploader/inputs/data/fastfoodoutlets/fastfoodoutlets.obda b/uk/stack-data-uploader/inputs/data/fastfoodoutlets/fastfoodoutlets.obda new file mode 100644 index 0000000..ecd2922 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/fastfoodoutlets/fastfoodoutlets.obda @@ -0,0 +1,25 @@ +[PrefixDeclaration] +ffo: https://www.theworldavatar.com/kg/ontofastfoodoutlets/ +bot: https://w3id.org/bot# +fibo-fnd-arr-id: https://spec.edmcouncil.org/fibo/ontology/FND/Arrangements/IdentifiersAndIndices/ +fibo-fnd-plc-adr: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Addresses/ +fibo-fnd-plc-loc: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/ +fibo-fnd-rel-rel: https://spec.edmcouncil.org/fibo/ontology/FND/Relations/Relations/ +geo: http://www.opengis.net/ont/geosparql# +sf: http://www.opengis.net/ont/sf +rdfs: http://www.w3.org/2000/01/rdf-schema# +xsd: http://www.w3.org/2001/XMLSchema# + +[MappingDeclaration] @collection [[ +mappingId FastFoodOutlet +target ffo:fastfoodoutlet_{ogc_fid} a ffo:fastfoodoutlet; + ffo:hasName "{name}"^^xsd:string ; + fibo-fnd-plc-adr:hasAddress ffo:address_{ogc_fid} . + ffo:address_{ogc_fid} a fibo-fnd-plc-adr:ConventionalStreetAddress ; + fibo-fnd-plc-loc:hasCountry ; + fibo-fnd-arr-id:isIndexTo ffo:location_{ogc_fid} . + ffo:location_{ogc_fid} a fibo-fnd-plc-loc:PhysicalLocation ; + a sf:Point; + geo:asWKT "{wkb_geometry}"^^geo:wktLiteral . +source SELECT ogc_fid, name, ref_no, pointx_class, ST_ASTEXT(wkb_geometry) as wkb_geometry FROM fastfoodoutlets +]] diff --git a/uk/stack-data-uploader/inputs/data/fastfoodoutlets/vector/Readme.md b/uk/stack-data-uploader/inputs/data/fastfoodoutlets/vector/Readme.md new file mode 100644 index 0000000..fcdf2e6 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/fastfoodoutlets/vector/Readme.md @@ -0,0 +1 @@ +Place the file `FastFoodOutlets_only_PoI2017.csv` here. diff --git a/uk/stack-data-uploader/inputs/data/greenspace/accesspoints/Readme.md b/uk/stack-data-uploader/inputs/data/greenspace/accesspoints/Readme.md new file mode 100644 index 0000000..7b26996 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/greenspace/accesspoints/Readme.md @@ -0,0 +1 @@ +Place the files `GB_AccessPoint.dbf`, `GB_AccessPoint.prj`, `GB_AccessPoint.shp`, and `GB_AccessPoint.shx` here. diff --git a/uk/stack-data-uploader/inputs/data/greenspace/greenspace.obda b/uk/stack-data-uploader/inputs/data/greenspace/greenspace.obda new file mode 100644 index 0000000..f66ec35 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/greenspace/greenspace.obda @@ -0,0 +1,24 @@ +[PrefixDeclaration] +ontogreenspace: https://www.theworldavatar.com/kg/ontogreenspace/ +rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# +owl: http://www.w3.org/2002/07/owl# +xsd: http://www.w3.org/2001/XMLSchema# + +[MappingDeclaration] @collection [[ +mappingId GreenspaceBasicInfo +target ontogreenspace:{id} a ontogreenspace:Greenspace ; + ontogreenspace:hasFunction "{function}"^^xsd:string ; + ontogreenspace:hasDistrictName1 "{distName1}"^^xsd:string ; + ontogreenspace:hasDistrictName2 "{distName2}"^^xsd:string ; + ontogreenspace:hasDistrictName3 "{distName3}"^^xsd:string ; + ontogreenspace:hasDistrictName4 "{distName4}"^^xsd:string . +source SELECT "id", "function", "distName1", "distName2", "distName3", "distName4" + FROM "greenspace_sites" + +mappingId GreenspaceLocation +target ontogreenspace:GeoPoint_{id} a ontogreenspace:SpatialLocation ; + ontogreenspace:hasGeometry "{geometry}"^^xsd:string ; + ontogreenspace:linkedToGreenspace ontogreenspace:{id} . +source SELECT "id", ST_AsText("wkb_geometry") AS "geometry" + FROM "greenspace_sites" +]] diff --git a/uk/stack-data-uploader/inputs/data/greenspace/sites/Readme.md b/uk/stack-data-uploader/inputs/data/greenspace/sites/Readme.md new file mode 100644 index 0000000..77e22c8 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/greenspace/sites/Readme.md @@ -0,0 +1 @@ +Place the files `GB_GreenspaceSite.dbf`, `GB_GreenspaceSite.prj`, `GB_GreenspaceSite.shp`, and `GB_GreenspaceSite.shx` here. diff --git a/uk/stack-data-uploader/inputs/data/physact/physact.obda b/uk/stack-data-uploader/inputs/data/physact/physact.obda new file mode 100644 index 0000000..9faf9a6 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/physact/physact.obda @@ -0,0 +1,26 @@ +[PrefixDeclaration] +pa: https://www.theworldavatar.com/kg/ontophysact/ +bot: https://w3id.org/bot# +fibo-fnd-arr-id: https://spec.edmcouncil.org/fibo/ontology/FND/Arrangements/IdentifiersAndIndices/ +fibo-fnd-plc-adr: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Addresses/ +fibo-fnd-plc-loc: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/ +fibo-fnd-rel-rel: https://spec.edmcouncil.org/fibo/ontology/FND/Relations/Relations/ +geo: http://www.opengis.net/ont/geosparql# +sf: http://www.opengis.net/ont/sf +rdfs: http://www.w3.org/2000/01/rdf-schema# +xsd: http://www.w3.org/2001/XMLSchema# + +[MappingDeclaration] @collection [[ +mappingId PhysicalActivityVenue +target pa:physicalactivityvenue_{ogc_fid} a pa:physicalactivityvenue; + pa:hasName "{name}"^^xsd:string ; + fibo-fnd-plc-adr:hasAddress pa:address_{ogc_fid} . + pa:address_{ogc_fid} a fibo-fnd-plc-adr:ConventionalStreetAddress ; + fibo-fnd-plc-adr:hasPostalCode {postcode} ; + fibo-fnd-plc-loc:hasCountry ; + fibo-fnd-arr-id:isIndexTo pa:location_{ogc_fid} . + pa:location_{ogc_fid} a fibo-fnd-plc-loc:PhysicalLocation ; + a sf:Point; + geo:asWKT "{wkb_geometry}"^^geo:wktLiteral . +source SELECT ogc_fid, name, ref_no, pointx_class, postcode, ST_ASTEXT(wkb_geometry) as wkb_geometry FROM physact +]] diff --git a/uk/stack-data-uploader/inputs/data/physact/vector/Readme.md b/uk/stack-data-uploader/inputs/data/physact/vector/Readme.md new file mode 100644 index 0000000..e516e48 --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/physact/vector/Readme.md @@ -0,0 +1 @@ +Place the file `poi-extract-2023-12-phys-act.csv` here. diff --git a/uk/stack-data-uploader/inputs/data/supermarkets/supermarkets.obda b/uk/stack-data-uploader/inputs/data/supermarkets/supermarkets.obda new file mode 100644 index 0000000..a9d9e7a --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/supermarkets/supermarkets.obda @@ -0,0 +1,26 @@ +[PrefixDeclaration] +smkt: https://www.theworldavatar.com/kg/ontosupermarket/ +bot: https://w3id.org/bot# +fibo-fnd-arr-id: https://spec.edmcouncil.org/fibo/ontology/FND/Arrangements/IdentifiersAndIndices/ +fibo-fnd-plc-adr: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Addresses/ +fibo-fnd-plc-loc: https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/ +fibo-fnd-rel-rel: https://spec.edmcouncil.org/fibo/ontology/FND/Relations/Relations/ +geo: http://www.opengis.net/ont/geosparql# +sf: http://www.opengis.net/ont/sf +rdfs: http://www.w3.org/2000/01/rdf-schema# +xsd: http://www.w3.org/2001/XMLSchema# + +[MappingDeclaration] @collection [[ +mappingId Supermarket +target smkt:supermarket_{ogc_fid} a smkt:supermarket; + smkt:hasName "{name}"^^xsd:string ; + fibo-fnd-plc-adr:hasAddress smkt:address_{ogc_fid} . + smkt:address_{ogc_fid} a fibo-fnd-plc-adr:ConventionalStreetAddress ; + fibo-fnd-plc-adr:hasPostalCode {postcode} ; + fibo-fnd-plc-loc:hasCountry ; + fibo-fnd-arr-id:isIndexTo smkt:location_{ogc_fid} . + smkt:location_{ogc_fid} a fibo-fnd-plc-loc:PhysicalLocation ; + a sf:Point; + geo:asWKT "{wkb_geometry}"^^geo:wktLiteral . +source SELECT ogc_fid, name, "POSTCODE_1" as postcode, ST_ASTEXT(wkb_geometry) as wkb_geometry FROM supermarkets +]] diff --git a/uk/stack-data-uploader/inputs/data/supermarkets/vector/Readme.md b/uk/stack-data-uploader/inputs/data/supermarkets/vector/Readme.md new file mode 100644 index 0000000..eebd05a --- /dev/null +++ b/uk/stack-data-uploader/inputs/data/supermarkets/vector/Readme.md @@ -0,0 +1 @@ +Place the file `supermarkets_2017_finalfinal.csv` here. diff --git a/uk/stack-manager/inputs/config/external_endpoints/blazegraph-hd4.json b/uk/stack-manager/inputs/config/external_endpoints/blazegraph-hd4.json new file mode 100644 index 0000000..013017a --- /dev/null +++ b/uk/stack-manager/inputs/config/external_endpoints/blazegraph-hd4.json @@ -0,0 +1,5 @@ +{ + "id": "blazegraph-hd4", + "name": "Blazegraph HD4", + "url": "http://hd4-blazegraph:8080/blazegraph/namespace/hd4/sparql" +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/config/external_endpoints/ontop-main.json b/uk/stack-manager/inputs/config/external_endpoints/ontop-main.json new file mode 100644 index 0000000..8b6bd4a --- /dev/null +++ b/uk/stack-manager/inputs/config/external_endpoints/ontop-main.json @@ -0,0 +1,5 @@ +{ + "id": "ontop-main", + "name": "Main ontop", + "url": "http://hd4-ontop:8080/sparql" +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/config/external_endpoints/ontop-timeseries.json b/uk/stack-manager/inputs/config/external_endpoints/ontop-timeseries.json new file mode 100644 index 0000000..a71b203 --- /dev/null +++ b/uk/stack-manager/inputs/config/external_endpoints/ontop-timeseries.json @@ -0,0 +1,5 @@ +{ + "id": "ontop-timeseries", + "name": "Time series ontop", + "url": "http://hd4-ontop-timeseries:8080/sparql" +} diff --git a/uk/stack-manager/inputs/config/hd4.json b/uk/stack-manager/inputs/config/hd4.json new file mode 100644 index 0000000..40954e2 --- /dev/null +++ b/uk/stack-manager/inputs/config/hd4.json @@ -0,0 +1,21 @@ +{ + "isolated": false, + "services": { + "includes": [ + "exposure-calculation-agent", + "visualisation", + "exposure-feature-info-agent", + "trip-agent", + "trip-layer-generator", + "fenland-trajectory-agent" + ], + "excludes": [ + "citydbimpexp", + "citytiler" + ] + }, + "volumes": { + "exposure-calculation-agent": "exposure-calculation-agent", + "geoserver_plugins": "geoserver_plugins" + } +} diff --git a/uk/stack-manager/inputs/config/services/exposure-calculation-agent.json b/uk/stack-manager/inputs/config/services/exposure-calculation-agent.json new file mode 100644 index 0000000..c76829d --- /dev/null +++ b/uk/stack-manager/inputs/config/services/exposure-calculation-agent.json @@ -0,0 +1,52 @@ +{ + "type": "basic-agent", + "ServiceSpec": { + "Name": "exposure-calculation-agent", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/exposure-calculation-agent:2.0.4", + "Env": [ + "NAMESPACE=hd4", + "DATABASE=postgres" + ], + "Mounts": [ + { + "Type": "volume", + "Source": "exposure-calculation-agent", + "Target": "/app/queries" + }, + { + "Type": "volume", + "Source": "logs", + "Target": "/root/.twa" + } + ], + "Configs": [ + { + "ConfigName": "blazegraph" + }, + { + "ConfigName": "postgis" + }, + { + "ConfigName": "ontop" + }, + { + "ConfigName": "rdf4j" + } + ], + "Secrets": [ + { + "SecretName": "postgis_password" + } + ] + } + } + }, + "endpoints": { + "rest": { + "url": "http://localhost:5000/", + "externalPath": "/exposure-calculation-agent/" + } + } +} diff --git a/uk/stack-manager/inputs/config/services/exposure-feature-info-agent.json b/uk/stack-manager/inputs/config/services/exposure-feature-info-agent.json new file mode 100644 index 0000000..ae4955b --- /dev/null +++ b/uk/stack-manager/inputs/config/services/exposure-feature-info-agent.json @@ -0,0 +1,35 @@ +{ + "ServiceSpec": { + "Name": "exposure-feature-info-agent", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/exposure-feature-info-agent:2.0.0", + "Configs": [ + { + "ConfigName": "blazegraph" + }, + { + "ConfigName": "postgis" + }, + { + "ConfigName": "ontop" + }, + { + "ConfigName": "rdf4j" + } + ], + "Secrets": [ + { + "SecretName": "postgis_password" + } + ] + } + } + }, + "endpoints": { + "rest": { + "url": "http://localhost:8080/ExposureFeatureInfoAgent/", + "externalPath": "/exposure-feature-info-agent/" + } + } +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/config/services/fenland-trajectory-agent.json b/uk/stack-manager/inputs/config/services/fenland-trajectory-agent.json new file mode 100644 index 0000000..c9172d2 --- /dev/null +++ b/uk/stack-manager/inputs/config/services/fenland-trajectory-agent.json @@ -0,0 +1,50 @@ +{ + "type": "basic-agent", + "ServiceSpec": { + "Name": "fenland-trajectory-agent", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/fenland-trajectory-agent:1.1.2", + "Env": [ + "NAMESPACE=hd4", + "DATABASE=postgres", + "LAYERNAME=gps_trajectory", + "GEOSERVER_WORKSPACE=gps_trajectory", + "ONTOP_FILE=/app/resources/ontop.obda" + ], + "Mounts": [ + { + "Type": "bind", + "Source": "fta-input", + "Target": "/app/agent/raw_data/gps_target_folder" + } + ], + "Configs": [ + { + "ConfigName": "blazegraph" + }, + { + "ConfigName": "postgis" + }, + { + "ConfigName": "geoserver" + } + ], + "Secrets": [ + { + "SecretName": "postgis_password" + }, + { + "SecretName": "geoserver_password" + } + ] + } + } + }, + "endpoints": { + "rest": { + "url": "http://localhost:5000/", + "externalPath": "/fenland-trajectory-agent/" + } + } +} diff --git a/uk/stack-manager/inputs/config/services/trip-agent.json b/uk/stack-manager/inputs/config/services/trip-agent.json new file mode 100644 index 0000000..a626d3e --- /dev/null +++ b/uk/stack-manager/inputs/config/services/trip-agent.json @@ -0,0 +1,40 @@ +{ + "type": "basic-agent", + "ServiceSpec": { + "Name": "trip-agent", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/trip-agent:2.0.1", + "Env": [ + "NAMESPACE=hd4", + "DATABASE=postgres" + ], + "Configs": [ + { + "ConfigName": "blazegraph" + }, + { + "ConfigName": "postgis" + }, + { + "ConfigName": "ontop" + }, + { + "ConfigName": "rdf4j" + } + ], + "Secrets": [ + { + "SecretName": "postgis_password" + } + ] + } + } + }, + "endpoints": { + "rest": { + "url": "http://localhost:5000/", + "externalPath": "/trip-agent/" + } + } +} diff --git a/uk/stack-manager/inputs/config/services/trip-layer-generator.json b/uk/stack-manager/inputs/config/services/trip-layer-generator.json new file mode 100644 index 0000000..51a1056 --- /dev/null +++ b/uk/stack-manager/inputs/config/services/trip-layer-generator.json @@ -0,0 +1,48 @@ +{ + "ServiceSpec": { + "Name": "trip-layer-generator", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/trip-layer-generator:1.0.1", + "Env": [ + "VIS_DATA_JSON=/vis_files/config/data.json", + "GEOSERVER_WORKSPACE=twa", + "DATABASE=postgres", + "SCHEMA=timeseries" + ], + "Mounts": [ + { + "Type": "bind", + "Source": "../data/vis-hd4/public", + "Target": "/vis_files" + } + ], + "Configs": [ + { + "ConfigName": "postgis" + }, + { + "ConfigName": "rdf4j" + }, + { + "ConfigName": "geoserver" + } + ], + "Secrets": [ + { + "SecretName": "postgis_password" + }, + { + "SecretName": "geoserver_password" + } + ] + } + } + }, + "endpoints": { + "rest": { + "url": "http://localhost:8080/TripLayerGenerator/", + "externalPath": "/trip-layer-generator/" + } + } +} diff --git a/uk/stack-manager/inputs/config/services/visualisation.json b/uk/stack-manager/inputs/config/services/visualisation.json new file mode 100644 index 0000000..be47f1a --- /dev/null +++ b/uk/stack-manager/inputs/config/services/visualisation.json @@ -0,0 +1,41 @@ +{ + "type": "visualisation", + "ServiceSpec": { + "Name": "visualisation", + "TaskTemplate": { + "ContainerSpec": { + "Image": "ghcr.io/theworldavatar/viz:5.62.3", + "Env": [ + "KEYCLOAK=false", + "PROTECTED_PAGES=/map", + "REACT_APP_USE_GEOSERVER_PROXY=false", + "REDIS_HOST=host.docker.internal", + "ASSET_PREFIX=/visualisation", + "ROLE_PROTECTED_PAGES=/role,/protected,/pages", + "ROLE=viz:protected" + ], + "Mounts": [ + { + "Type": "bind", + "Source": "../data/vis-hd4/public", + "Target": "/twa/public" + } + ], + "Secrets": [ + { + "SecretName": "mapbox_username" + }, + { + "SecretName": "mapbox_api_key" + } + ] + } + } + }, + "endpoints": { + "ui": { + "url": "http://localhost:3000", + "externalPath": "/visualisation" + } + } +} diff --git a/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_label_query.sparql b/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_label_query.sparql new file mode 100644 index 0000000..92b8794 --- /dev/null +++ b/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_label_query.sparql @@ -0,0 +1,8 @@ +PREFIX fibo-fnd-plc-loc: +PREFIX fibo-fnd-arr-id: +PREFIX fibo-fnd-plc-adr: +SELECT ?Label ?Feature +WHERE { + ?address fibo-fnd-arr-id:isIndexTo ?Feature; + fibo-fnd-plc-adr:hasPostalCode ?Label. +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_query.sparql b/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_query.sparql new file mode 100644 index 0000000..5fe4967 --- /dev/null +++ b/uk/stack-manager/inputs/data/exposure-calculation-agent/subject_query.sparql @@ -0,0 +1,6 @@ +PREFIX geo: +PREFIX fibo-fnd-plc-loc: +SELECT ?feature +WHERE { + ?feature a fibo-fnd-plc-loc:PhysicalLocation. +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/config/data-settings.json b/uk/stack-manager/inputs/data/vis-hd4/public/config/data-settings.json new file mode 100644 index 0000000..4658f0b --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/config/data-settings.json @@ -0,0 +1,5 @@ +{ + "dataSets": [ + "/config/data.json" + ] +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/config/data.json b/uk/stack-manager/inputs/data/vis-hd4/public/config/data.json new file mode 100644 index 0000000..a1651a5 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/config/data.json @@ -0,0 +1,199 @@ +{ + "name": "All Layers", + "groups": [ + { + "name": "Points of Interest", + "stack": "http://localhost:3838", + "sources": [ + { + "id": "poi-fast-food-outlets-source", + "type": "geojson", + "data": "http://localhost:3838/geoserver/the_world_avatar/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=the_world_avatar%3Afastfoodoutlets&&outputFormat=application%2Fjson", + "cluster": true, + "clusterMaxZoom": 14, + "clusterRadius": 50 + }, + { + "id": "poi-supermarkets-source", + "type": "geojson", + "data": "http://localhost:3838/geoserver/the_world_avatar/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=the_world_avatar%3Asupermarkets&&outputFormat=application%2Fjson", + "cluster": true, + "clusterMaxZoom": 14, + "clusterRadius": 50 + }, + { + "id": "poi-physical-activity-source", + "type": "geojson", + "data": "http://localhost:3838/geoserver/the_world_avatar/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=the_world_avatar%3Aphysact&&outputFormat=application%2Fjson", + "cluster": true, + "clusterMaxZoom": 14, + "clusterRadius": 50 + } + ], + "layers": [ + { + "id": "poi-fast-food-outlets", + "name": "Fast food outlets", + "source": "poi-fast-food-outlets-source", + "type": "symbol", + "filter": ["!", ["has", "point_count"]], + "order": 1801, + "layout": { + "visibility": "none", + "icon-image": "takeaway", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.375, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "poi-fast-food-outlets-cluster", + "name": "Fast food outlets", + "source": "poi-fast-food-outlets-source", + "type": "symbol", + "filter": ["has", "point_count"], + "order": 1802, + "layout": { + "visibility": "none", + "icon-image": "takeaway_circle", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.3875, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "text-field": "{point_count_abbreviated}", + "text-font": ["Arial Unicode MS Regular"], + "text-size": 9, + "text-anchor": "center", + "text-offset": [0, 0] + } + }, + { + "id": "poi-supermarkets", + "name": "Supermarkets", + "source": "poi-supermarkets-source", + "type": "symbol", + "filter": ["!", ["has", "point_count"]], + "order": 1811, + "layout": { + "visibility": "none", + "icon-image": "supermarket", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.375, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "poi-supermarkets-cluster", + "name": "Supermarkets", + "source": "poi-supermarkets-source", + "type": "symbol", + "filter": ["has", "point_count"], + "order": 1812, + "layout": { + "visibility": "none", + "icon-image": "supermarket_circle", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.3875, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "text-field": "{point_count_abbreviated}", + "text-font": ["Arial Unicode MS Regular"], + "text-size": 9, + "text-anchor": "center", + "text-offset": [0, 0] + } + }, + { + "id": "poi-physical-activity", + "name": "Physical activity venues", + "source": "poi-physical-activity-source", + "type": "symbol", + "filter": ["!", ["has", "point_count"]], + "order": 1821, + "layout": { + "visibility": "none", + "icon-image": "sports", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.375, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + }, + { + "id": "poi-physical-activity-cluster", + "name": "Physical activity venues", + "source": "poi-physical-activity-source", + "type": "symbol", + "filter": ["has", "point_count"], + "order": 1822, + "layout": { + "visibility": "none", + "icon-image": "sports_circle", + "icon-size": ["interpolate", ["linear"], ["zoom"], 12, 0.3875, 20, 0.4875], + "icon-allow-overlap": true, + "icon-ignore-placement": true, + "text-field": "{point_count_abbreviated}", + "text-font": ["Arial Unicode MS Regular"], + "text-size": 9, + "text-anchor": "center", + "text-offset": [0, 0] + } + } + ] + }, + { + "name": "Greenspace", + "groups": [ + { + "name": "Ordnance Survey", + "stack": "http://localhost:3838", + "sources": [ + { + "id": "greenspace-site-source", + "type": "raster", + "tiles": [ + "http://localhost:3838/geoserver/the_world_avatar/wms?service=WMS&version=1.1.0&request=GetMap&layers=the_world_avatar:greenspace_sites&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&transparent=true&format=image/png" + ] + }, + { + "id": "greenspace-accesspoint-source", + "type": "vector", + "cluster": true, + "clusterMaxZoom": 14, + "clusterRadius": 100, + "tiles": [ + "http://localhost:3838/geoserver/ows?service=WMS&version=1.1.0&request=GetMap&layers=the_world_avatar:greenspace_accesspoints&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&format=application/vnd.mapbox-vector-tile" + ] + } + ], + "layers": [ + { + "id": "greenspace-site-layer", + "name": "Sites", + "source": "greenspace-site-source", + "type": "raster", + "minzoom": 4, + "order": 1901, + "layout": { + "visibility": "none" + } + }, + { + "id": "greenspace-accesspoint-layer", + "name": "Access points", + "source": "greenspace-accesspoint-source", + "source-layer": "greenspace_accesspoints", + "type": "symbol", + "minzoom": 6, + "order": 1001, + "layout": { + "visibility": "none", + "icon-image": "greenspaceaccesspoint", + "icon-size": 0.2, + "icon-allow-overlap": true, + "icon-ignore-placement": true + } + } + ] + } + ] + } + ] +} diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/config/map-settings.json b/uk/stack-manager/inputs/data/vis-hd4/public/config/map-settings.json new file mode 100644 index 0000000..1daae85 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/config/map-settings.json @@ -0,0 +1,135 @@ +{ + "type": "mapbox", + "camera": { + "default": "Cambridge", + "positions": [ + { + "name": "Kings Lynn", + "center": [ + 0.4023, + 52.7517 + ], + "zoom": 13, + "bearing": 0, + "pitch": 45 + }, + { + "name": "Cambridge", + "center": [ + 0.11926, + 52.20472 + ], + "zoom": 14, + "bearing": 0, + "pitch": 45 + }, + { + "name": "Ely", + "center": [ + 0.26196, + 52.39964 + ], + "zoom": 16, + "bearing": 0, + "pitch": 45 + }, + { + "name": "Wisbech", + "center": [ + 0.1593800, + 52.666220 + ], + "zoom": 16, + "bearing": 0, + "pitch": 45 + }, + { + "name": "London", + "center": [ + -0.12794, + 51.50774 + ], + "zoom": 18, + "bearing": 0, + "pitch": 45 + } + ] + }, + "imagery": { + "default": "3D (Night)", + "options": [ + { + "name": "Light", + "url": "mapbox://styles/mapbox/light-v11?optimize=true" + }, + { + "name": "Dark", + "url": "mapbox://styles/mapbox/dark-v11?optimize=true" + }, + { + "name": "Outdoors", + "url": "mapbox://styles/mapbox/outdoors-v12?optimize=true" + }, + { + "name": "Satellite", + "url": "mapbox://styles/mapbox/satellite-streets-v12?optimize=true" + }, + { + "name": "3D (Day)", + "url": "mapbox://styles/mapbox/standard", + "time": "dawn" + }, + { + "name": "3D (Night)", + "url": "mapbox://styles/mapbox/standard", + "time": "dusk" + } + ] + }, + "icons": { + "metoffice": "/images/Fenland/icons/metoffice.png", + "floodmonitoring": "/images/Fenland/icons/floodmonitoring.png", + "ukair": "/images/Fenland/icons/ukair.png", + "weather": "/images/Fenland/icons/weather.png", + "weather-for": "/images/Fenland/icons/weather-for.png", + "weather-obs": "/images/Fenland/icons/weather-obs.png", + "airquality": "/images/Fenland/icons/airquality.png", + "flow": "/images/Fenland/icons/flow.png", + "rainfall": "/images/Fenland/icons/rainfall.png", + "temperature": "/images/Fenland/icons/temperature.png", + "water-level": "/images/Fenland/icons/water-level.png", + "wind": "/images/Fenland/icons/wind.png", + "met_weather": "/images/Fenland/icons/met_weather.png", + "met_weather-for": "/images/Fenland/icons/met_weather-for.png", + "met_weather-obs": "/images/Fenland/icons/met_weather-obs.png", + "ea_flow": "/images/Fenland/icons/ea_flow.png", + "ea_rainfall": "/images/Fenland/icons/ea_rainfall.png", + "ea_temperature": "/images/Fenland/icons/ea_temperature.png", + "ea_water-level": "/images/Fenland/icons/ea_water-level.png", + "ea_wind": "/images/Fenland/icons/ea_wind.png", + "air_airquality": "/images/Fenland/icons/air_airquality.png", + "FoodHygieneRating": "/images/Fenland/icons/FoodHygieneRating.png", + "gpslocation": "/images/Fenland/icons/gpslocation.png", + "gpslocation2": "/images/Fenland/icons/gpslocation2.png", + "greenspaceaccesspoint": "/images/Fenland/icons/greenspaceaccesspoint.png", + "takeaway": "/images/Fenland/icons/takeaway.png", + "takeaway_circle": "/images/Fenland/icons/takeaway_circle.png", + "supermarket": "/images/Fenland/icons/supermarket.png", + "supermarket_circle": "/images/Fenland/icons/supermarket_circle.png", + "sports": "/images/Fenland/icons/sports.png", + "sports_circle": "/images/Fenland/icons/sports_circle.png", + "edu": "/images/Fenland/icons/edu_and_health.png", + "edu_circle": "/images/Fenland/icons/edu_and_health_circle.png", + "public": "/images/Fenland/icons/public_infras.png", + "public_circle": "/images/Fenland/icons/public_infras_circle.png", + "power-primary": "/images/Fenland/icons/power-primary.png", + "power-secondary": "/images/Fenland/icons/power-secondary.png", + "water-clean": "/images/Fenland/icons/water-clean.png", + "water-sewage": "/images/Fenland/icons/water-sewage.png", + "water-sludge": "/images/Fenland/icons/water-sludge.png", + "circle": "/images/Fenland/icons/circle-sdf.png", + "octagon": "/images/Fenland/icons/octagon-sdf.png", + "square": "/images/Fenland/icons/square-sdf.png", + "arrow": "/images/Fenland/icons/arrow-sdf.png" + } +} diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/config/ui-settings.json b/uk/stack-manager/inputs/data/vis-hd4/public/config/ui-settings.json new file mode 100644 index 0000000..6603bf6 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/config/ui-settings.json @@ -0,0 +1,15 @@ +{ + "branding": { + "navbar": ["/images/defaults/navbar-logo.svg"], + "landing": ["/images/defaults/icons/twa.svg"], + "landingDark": ["/images/defaults/icons/twa.svg"] + }, + "modules": { + "landing": true, + "help": true, + "map": true, + "dashboard": false, + "registry": false, + "scheduler": false + } +} \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/FoodHygieneRating.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/FoodHygieneRating.png new file mode 100644 index 0000000..35249cc Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/FoodHygieneRating.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/air_airquality.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/air_airquality.png new file mode 100644 index 0000000..939cb17 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/air_airquality.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/airquality.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/airquality.png new file mode 100644 index 0000000..6bbc47c Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/airquality.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/arrow-sdf.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/arrow-sdf.png new file mode 100644 index 0000000..6da86e1 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/arrow-sdf.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/circle-sdf.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/circle-sdf.png new file mode 100644 index 0000000..84c8d30 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/circle-sdf.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/connection-failed.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/connection-failed.png new file mode 100644 index 0000000..a0be62f Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/connection-failed.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_flow.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_flow.png new file mode 100644 index 0000000..21a5293 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_flow.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_rainfall.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_rainfall.png new file mode 100644 index 0000000..2e57274 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_rainfall.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_temperature.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_temperature.png new file mode 100644 index 0000000..fce8131 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_temperature.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_water-level.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_water-level.png new file mode 100644 index 0000000..6bbd349 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_water-level.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_wind.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_wind.png new file mode 100644 index 0000000..65f5b10 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ea_wind.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health.png new file mode 100644 index 0000000..cf12dc1 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health_circle.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health_circle.png new file mode 100644 index 0000000..b8f26ca Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/edu_and_health_circle.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/floodmonitoring.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/floodmonitoring.png new file mode 100644 index 0000000..0c89fe2 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/floodmonitoring.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/flow.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/flow.png new file mode 100644 index 0000000..84b6995 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/flow.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation.png new file mode 100644 index 0000000..9c7b8af Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation2.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation2.png new file mode 100644 index 0000000..eac9bb6 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/gpslocation2.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/greenspaceaccesspoint.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/greenspaceaccesspoint.png new file mode 100644 index 0000000..5ecfdef Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/greenspaceaccesspoint.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-primary-failure.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-primary-failure.png new file mode 100644 index 0000000..a4a2469 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-primary-failure.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-secondary-failure.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-secondary-failure.png new file mode 100644 index 0000000..1b777ba Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-secondary-failure.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-tertiary-failure.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-tertiary-failure.png new file mode 100644 index 0000000..0cf9e12 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/low-tertiary-failure.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-for.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-for.png new file mode 100644 index 0000000..9489e4e Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-for.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-obs.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-obs.png new file mode 100644 index 0000000..5081933 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather-obs.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather.png new file mode 100644 index 0000000..91a4746 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/met_weather.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/metoffice.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/metoffice.png new file mode 100644 index 0000000..ff58b5a Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/metoffice.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/octagon-sdf.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/octagon-sdf.png new file mode 100644 index 0000000..7534f69 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/octagon-sdf.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary-legend.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary-legend.png new file mode 100644 index 0000000..43ce880 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary-legend.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary.png new file mode 100644 index 0000000..fc9ef63 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-primary.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary-legend.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary-legend.png new file mode 100644 index 0000000..76ed995 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary-legend.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary.png new file mode 100644 index 0000000..918a441 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/power-secondary.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras.png new file mode 100644 index 0000000..045fd8c Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras_circle.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras_circle.png new file mode 100644 index 0000000..8395f4c Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/public_infras_circle.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/rainfall.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/rainfall.png new file mode 100644 index 0000000..6bbfa94 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/rainfall.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports.png new file mode 100644 index 0000000..51e27d1 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports_circle.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports_circle.png new file mode 100644 index 0000000..5ca86e1 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/sports_circle.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/square-sdf.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/square-sdf.png new file mode 100644 index 0000000..4f2eedb Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/square-sdf.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket.png new file mode 100644 index 0000000..3958739 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket_circle.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket_circle.png new file mode 100644 index 0000000..7b0dc02 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/supermarket_circle.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway.png new file mode 100644 index 0000000..093b847 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway_circle.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway_circle.png new file mode 100644 index 0000000..39b16ec Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/takeaway_circle.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/temperature.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/temperature.png new file mode 100644 index 0000000..59c98c1 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/temperature.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ukair.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ukair.png new file mode 100644 index 0000000..2718cbb Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/ukair.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean-legend.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean-legend.png new file mode 100644 index 0000000..74a3eca Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean-legend.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean.png new file mode 100644 index 0000000..167f875 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-clean.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-level.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-level.png new file mode 100644 index 0000000..a25f743 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-level.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage-legend.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage-legend.png new file mode 100644 index 0000000..b004702 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage-legend.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage.png new file mode 100644 index 0000000..58fd97d Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sewage.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge-legend.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge-legend.png new file mode 100644 index 0000000..42cca57 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge-legend.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge.png new file mode 100644 index 0000000..3a4c116 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/water-sludge.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-for.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-for.png new file mode 100644 index 0000000..7597d7b Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-for.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-obs.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-obs.png new file mode 100644 index 0000000..fb57259 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather-obs.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather.png new file mode 100644 index 0000000..78deaa5 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/weather.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/wind.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/wind.png new file mode 100644 index 0000000..4804a5e Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/Fenland/icons/wind.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-dark.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-dark.svg new file mode 100644 index 0000000..9ac8de5 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-dark.svg @@ -0,0 +1,1279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-light.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-light.svg new file mode 100644 index 0000000..ae0b56d --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/background-light.svg @@ -0,0 +1,1271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/navbar.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/navbar.svg new file mode 100644 index 0000000..4ebce05 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/navbar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/pan.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/pan.svg new file mode 100644 index 0000000..1bafe40 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/pan.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + Pan + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/return.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/return.svg new file mode 100644 index 0000000..c1e9969 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/return.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/rotate.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/rotate.svg new file mode 100644 index 0000000..4fbe838 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/rotate.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + Rotate + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/zoom.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/zoom.svg new file mode 100644 index 0000000..ffcd11b --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/help/zoom.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + Zoom + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/about.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/about.svg new file mode 100644 index 0000000..683e567 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/about.svg @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/acknowledgement.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/acknowledgement.svg new file mode 100644 index 0000000..c280b5a --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/acknowledgement.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/camera.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/camera.svg new file mode 100644 index 0000000..89ba506 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/camera.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/cmcl-logo.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/cmcl-logo.svg new file mode 100644 index 0000000..696ad47 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/cmcl-logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + CMCL + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/dashboard.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/dashboard.svg new file mode 100644 index 0000000..c4b0aa7 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/dashboard.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/fia-logo.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/fia-logo.svg new file mode 100644 index 0000000..66c1356 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/fia-logo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/glossary.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/glossary.svg new file mode 100644 index 0000000..7472cdd --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/glossary.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/help.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/help.svg new file mode 100644 index 0000000..49101bb --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/help.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/imagery.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/imagery.svg new file mode 100644 index 0000000..7d6e2dc --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/imagery.svg @@ -0,0 +1,36 @@ + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/info.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/info.svg new file mode 100644 index 0000000..00e7fcb --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/info.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/map.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/map.svg new file mode 100644 index 0000000..c25f87c --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/map.svg @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/maximise.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/maximise.svg new file mode 100644 index 0000000..9c7ce38 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/maximise.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/minimise.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/minimise.svg new file mode 100644 index 0000000..53ddc40 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/minimise.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/schedule.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/schedule.svg new file mode 100644 index 0000000..cc23fcf --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/schedule.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/sparkle.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/sparkle.svg new file mode 100644 index 0000000..e9c11f7 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/sparkle.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/terrain.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/terrain.svg new file mode 100644 index 0000000..fcee0e5 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/terrain.svg @@ -0,0 +1,17 @@ + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/twa.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/twa.svg new file mode 100644 index 0000000..b603dad --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/icons/twa.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/loading.gif b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/loading.gif new file mode 100644 index 0000000..9048845 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/loading.gif differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/navbar-logo.svg b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/navbar-logo.svg new file mode 100644 index 0000000..f893bac --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/images/defaults/navbar-logo.svg @@ -0,0 +1,11 @@ + + + + + diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/greenspace_colour.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/greenspace_colour.png new file mode 100644 index 0000000..eb8cfca Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/greenspace_colour.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.png b/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.png new file mode 100644 index 0000000..312b6bc Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.png differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.wav b/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.wav new file mode 100644 index 0000000..9619515 Binary files /dev/null and b/uk/stack-manager/inputs/data/vis-hd4/public/images/utils/trex.wav differ diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/01.about.md b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/01.about.md new file mode 100644 index 0000000..1ad0e27 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/01.about.md @@ -0,0 +1,10 @@ +--- +title: About Us +slug: aboutus +description: Learn more about the team behind viz. +thumbnail: groups +--- + +## About Us + +viz is part of TheWorldAvatar project. Headed by the team at CMCL, we are inspired to build a suite of tools to allow cross domain operability and data insight leveraging the power of Ontology and Connected Digital Twins. diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/02.attributions.md b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/02.attributions.md new file mode 100644 index 0000000..8a43b0e --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/02.attributions.md @@ -0,0 +1,12 @@ +--- +title: About the project +slug: aboutviz +description: Details on the libraries, data, and technical dependencies used within the project. +thumbnail: developer_board +--- + +## Technology + +Viz is built using React typescript and Nodejs. + +It is designed to integrate well with data hosted in a TWA stack. diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/help-page.md b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/help-page.md new file mode 100644 index 0000000..c316910 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/help-page.md @@ -0,0 +1,58 @@ +--- +title: Help Page +slug: help +--- + + + +

 Help

+ +## Getting Started + +The platform offers a web map and dashboard tool for data exploration and trend analysis, provided the user has access. + +### Navigation + +Users can navigate the platform by clicking on buttons or the navigation bar at the top of the screen. + +
+ +
Fig 1a: Button to return to previous page
+
+ +
+ +
Fig 1b: Navigation bar at top of the screen
+
+ +### Map exploration + +Interaction is enabled for mouse or pointing device, but keyboard shortcuts are not supported at the time of writing. The user can pan by holding the left mouse button, rotate by holding the right mouse button, and zoom using the scroll wheel. + +
+
+ + + +
+
Fig 2: Mouse controls
+
+ +Additionally, an information panel containing the map layers, legend, and feature information is available at the left hand side of the screen. The visibility of map layers can be toggled. Users can also switch between the metadata and time series data for each feature if available. + +### Map options + +1. **View** + - _Imagery_: Users can change their current imagery design to the list of included options. These may include vector-style outlines of streets/terrain, raw satellite images, or a mix. + - _Reset Camera_: Users can reset their current view or move to the selected view. + - _Hide Labels_: Hides all the icons and labels on the base map. + - _3D Terrain_: Enables 3D terrain. + - _Full Screen_: Toggles full screen mode. +2. **Search** + - _Current Location_: Show your current location. + +## Need further assistance? + +Contact the CMCL technical team today! + +//TODO failure states diff --git a/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/landing-page.md b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/landing-page.md new file mode 100644 index 0000000..111f7b7 --- /dev/null +++ b/uk/stack-manager/inputs/data/vis-hd4/public/optional-pages/landing-page.md @@ -0,0 +1,42 @@ +--- +title: Sample Visualisation +slug: landing +--- + + + +
+ The World Avatar +
+ +## TheWorldAvatar viz + +This project has been designed to make it easier for users not experienced with Typescript (or the mapping libraries) to quickly & easily put together a new TWA visualisation. It is intended for developers to use this example visualisation to gain an understanding of the TWA-VF before attempting to create their own visualisation; to do that, this example can be copied and used as a starting point. Edit the markdown content in markdown syntax to suit your needs. + +## Navigation + +Use the toolbar or the thumbnails on this landing page. + +For more information, please see the associated README file within the [TWA repository](https://github.com/TheWorldAvatar/viz) or contact the [CMCL technical team](mailto:support@cmcl.io) .