{"id":20894299,"url":"https://github.com/atlasoflivingaustralia/spatial-hub","last_synced_at":"2025-05-12T23:30:41.790Z","repository":{"id":10653503,"uuid":"66508310","full_name":"AtlasOfLivingAustralia/spatial-hub","owner":"AtlasOfLivingAustralia","description":"New spatial portal front end using AngularJS","archived":false,"fork":false,"pushed_at":"2025-04-29T06:31:23.000Z","size":11455,"stargazers_count":7,"open_issues_count":13,"forks_count":18,"subscribers_count":19,"default_branch":"develop","last_synced_at":"2025-04-29T07:39:12.365Z","etag":null,"topics":["ala-product-spatial","ala-systems"],"latest_commit_sha":null,"homepage":"https://spatial.ala.org.au/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AtlasOfLivingAustralia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-25T00:00:22.000Z","updated_at":"2025-04-29T06:31:23.000Z","dependencies_parsed_at":"2024-01-14T12:18:25.235Z","dependency_job_id":"eec88ab2-1d42-40ed-93ef-0fdf1fa591d8","html_url":"https://github.com/AtlasOfLivingAustralia/spatial-hub","commit_stats":{"total_commits":763,"total_committers":18,"mean_commits":"42.388888888888886","dds":0.5792922673656619,"last_synced_commit":"d04ee7a06aa3030a8c7d2ec554621407943d5f87"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtlasOfLivingAustralia%2Fspatial-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtlasOfLivingAustralia%2Fspatial-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtlasOfLivingAustralia%2Fspatial-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtlasOfLivingAustralia%2Fspatial-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AtlasOfLivingAustralia","download_url":"https://codeload.github.com/AtlasOfLivingAustralia/spatial-hub/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253840064,"owners_count":21972418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ala-product-spatial","ala-systems"],"created_at":"2024-11-18T10:18:52.616Z","updated_at":"2025-05-12T23:30:36.774Z","avatar_url":"https://github.com/AtlasOfLivingAustralia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"###  spatial-hub  [![Build Status](https://travis-ci.org/AtlasOfLivingAustralia/spatial-hub.svg?branch=master)](https://travis-ci.org/AtlasOfLivingAustralia/spatial-hub)\n\n# Spatial-hub\nReplacement for spatial-portal with Grails, AngularJS and Leaflet.\n\n**_See also:_ [Integration Tests](#Tests)**\n\n## Setup production\n\nModify configurations in\n\n    /data/spatial-hub/config/spatial-hub-config.yml\n\nThe default production url is https://spatial.ala.org.au\n\nThe default develop url is http://devt.ala.org.au:8079\n\nThe dependent services point to other production servers by default\n\n### Minimum configurations in external config file:\n\n        api_key: xxxxxxxxx-d184-4276-afc2-6ece17176d7c\n        google:\n            apikey: xxxxxxxx\n\n### Check the following configurations if deployed on different servers.\n   \n####Example:\n    grails.serverURL: \"https://spatial-test.ala.org.au\"\n    grails.app.context: \"/\"\n    \n    googleAnalyticsId: \"xxxxxxxx\"\n    google:\n        apikey: \"xxxxxxxxxxxxxx\"\n    \n    api_key: xxxxxxxxxxxxxxxxx\n    \n    layersService:\n        url: \"https://spatial-test.ala.org.au/ws\"\n    \n    geoserver:\n        url: \"https://spatial-test.ala.org.au/geoserver\"\n\n\n## How to customise\n### menu-config.json\n* The main menu is overridden with `/data/spatial-hub/menu-config.json`.\n\n```$xslt\n/* Example */\n[\n  {\n    \"name\": \"Add to map\", /* Dropdown menu label */\n    \"width\": 110, /* Dropdown menu button width in pixels. The left hand panel is a fixed width. */\n    \"items\": [ /* Dropdown menu items */\n      {\n        \"name\": \"Species\", /* Button label */\n        \"open\": \"ToolAddSpeciesService\" /* Open a service based tool. Compatible services are found in grails-app/assets/javascripts/spApp/services/tool*Service.js\n      },\n      {\n        \"name\": \"Area\", /* Button label */\n        \"open\": \"addArea\" /* Open a controller based tool. Compatible controllers are found in grails-app/assets/javascripts/spApp/controller/*Ctrl.js\n      },\n      {\n        \"name\": \"Detailed Area Report (PDF)\", /* Button label */\n        \"open\": \"AreaReport\" /* Open a spatial-service based tool. Available tools are found in spatial-service /admin/capabilities. \n      },\n      {\n        \"name\": \"Getting Started\", /* Button label */\n        \"open\": \"https://www.ala.org.au/spatial-portal-help/getting-started\" /* Open a https:// or http:// url */\n      }\n    ]\n  },\n```\n\n### view-config.json\n* Templated dialog appearance can be overridden with `/data/spatial-hub/view-config.json`.\n\n```$xslt\n/* Example */\n{\n  \"Maxent\": { /* Name of tool in spatial-service capabilities */\n    \"view\": [ /* List of input sections in the order to displa */\n      {\n        \"name\": \"Area to restrict prediction\", /* Title of first input section */ \n        \"inputs\": [ /* List of inputs from tool capabilities for this section */ \n          \"area\"\n        ]\n      },\n      {\n        \"name\": \"MaxEnt options\", /* Title of the second input section */\n        \"inputs\": [ /* List of inputs from tool capabilities for this section */\n          \"testPercentage\",\n          \"resolution\"\n        ]\n      }\n    ],\n    \"input\": { /* Override input specifications */\n      \"testPercentage\": { /* Input name */\n        \"description\": \"Percentage of records used for testing model?\", /* new description */\n        \"constraints\": {\n          \"default\": 0.2 /* New default value */\n        }\n      }\n  }\n}\n``` \n\n## Header and Footer\n\n##### Configure [ala-bootstrap3](https://github.com/AtlasOfLivingAustralia/ala-bootstrap3)\n* This is recommended since it can be reused by all components that use [ala-bootstrap3](https://github.com/AtlasOfLivingAustralia/ala-bootstrap3)\n\n    1. Fork [commonui-bs3](https://github.com/AtlasOfLivingAustralia/commonui-bs3), modify and deploy\n\n    1. Configure to use the deployed [commonui-bs3](https://github.com/AtlasOfLivingAustralia/commonui-bs3)\n    ```\n    # edit /data/spatial-hub/config/spatial-hub-config.properties\n    skin.layout=generic\n    headerAndFooter.baseURL=\u003cURL to deployed commonui-bs3\u003e\n    ```\n\n##### Fork [spatial-hub](https://github.com/AtlasOfLivingAustralia/spatial-hub), modify and deploy\n* Use when development of spatial-hub is expected. It can be used with with the other methods.\n\n##### Local files\n* Adding files local to deployment can add new layouts and resources.\n    \n    1. Add a new layout gsp to the ```/data/spatial-hub/views/layouts``` directory.\n        ```\n        /data/spatial-hub/views/layouts/myLayout.gsp\n        ```\n\n    1. Additional assets can be added to the ```/data/spatial-hub/assets``` directory.\n        ```\n        /data/spatial-hub/assets/css/externalCss.css\n        /data/spatial-hub/assets/js/externalJs.js\n        /data/spatial-hub/assets/img/externalImage.png\n        ```\n\n    1. Assets can be referenced within the new layout gsp.\n        ```\n        \u003casset:stylesheet src=\"css/externalCss.css\" /\u003e\n        \u003casset:javascript src=\"js/externalJs.js\" /\u003e\n        \u003casset:image src=\"img/externalImg.png\" /\u003e\n        ```\n\n    1. Change config to use the new layout gsp.\n        ```\n        # edit /data/spatial-hub/config/spatial-hub-config.properties\n        skin.layout=myLayout\n        ```\n\n\u003e **Note:**\n\u003e\n\u003e A forked [commonui-bs3](https://github.com/AtlasOfLivingAustralia/commonui-bs3) can be deployed to ```/data/spatial-hub/assets/``` and used with the config\n\u003e ```\n\u003e # edit /data/spatial-hub/config/spatial-hub-config.properties\n\u003e skin.layout=generic\n\u003e headerAndFooter.baseURL=\u003cURL to this spatial-hub instance\u003e/assets\n\u003e ```\n\n# Adding hubs to spatial-hub\n\nAdditional map views can be created and served from urls hub/{{hub_name}}. This is done by creating additional files in the /data/spatial-hub directory.\n\nFiles required to create a new hub view. \n\nFiles required | Overrides ```/data/spatial-hub/config/``` | Overrides ```grailsApp/conf/```\n------------ | ------------- | -------------\n```/data/spatial-hub/config/{{hub_name}}/app-config.json``` | ```spatial-hub-config.yml``` | ```application.yml```\n```/data/spatial-hub/config/{{hub_name}}/view-config.json``` | ```view-config.json``` | ```view-config.json```\n```/data/spatial-hub/config/{{hub_name}}/menu-config.json``` | ```menu-config.json``` | ```menu-config.json```\n\nAn additional css can be included with ```/data/spatial-hub/assets/css/{{hub_name}}.css``` when using ```skin.layout``` ```portal``` or ```generic```. This may not be used by a [local layout gsp file](#local-files). \n\n  \n### Embedding spatial-hub\n\nExample [embedExample.html](embedExample.html) (TODO: finish implementation)\n\n\n## Tests\n\nThe build is setup to work with Firefox and Chrome.\n\nHave a look at the `build.gradle` and the `src/test/resources/GebConfig.groovy` file.\n\nFrom line 200 in build.gradle, you will find how we pass different test servers and authentication into tests.\n\n\n### Usage\n\n**Skip integration test in building process**\n\n\n    ./gradlew build -x integrationTest\n\n\n\n### Run with Firefox (default):\n\n    ./gradlew :integrationTest -Dusername=xxxx -Dpassword=xxxxx\n\nOr \n\n    ./gradlew :integrationTest\n\nwhen authentication is stored into the default file:\n\n    /data/spatial-hub/test/default.properties\n\n\n**See more: [How to pass authentication](#Authentication)**\n\n### run with Chrome:\nThis solution is not requried by M2 MBP\n\n    ./gradlew :integrationTest -Ddriver=chrome\n\nChrome driver \u003e 89 is not available for webdirver\nUse npm to set the chrome driver version and reference the lib path from node_modules.\n\nAdd `\"chromedriver\": \"89.0.0\"` to package.json\n\nRun `npm install`\n\n    In ./gebConfig.groovy\n\n    if (!System.getProperty(\"webdriver.chrome.driver\")) {\n        System.setProperty(\"webdriver.chrome.driver\", \"node_modules/chromedriver/bin/chromedriver\")\n    } \n\n### Test other servers:\n\n    ./gradlew :integrationTest -DbaseUrl=http://spatial-test.ala.org.au/\n\n\n### Authentication\n\nAuthentication info can be passed through with -Dusername and -Dpassword\n\n    /gradlew :integrationTest -Dusername=xxxx -Dpassword=xxxxx\n\nOr stored in a config file. The default config file is located in\n\n    /data/spatial-hub/test/default.properties\n    \n    username=\"xxxx@csiro.au\"\n    password=\"xxxxx\"\n\nWe can change the config file with -DconfigFile\n\n    /gradlew :integrationTest -DconfigFile=\"myconfig.properties\"\n\n\n### Prerequisite\nLayers required to be imported to Spatial Service:\n\n    Koppen Climate Classification (Major Classes) \n    Precipitation - annual (Bio12)\n    Temperature - annual mean (Bio01)\n    GEOMACS - geometric mean\n    ASGS Australian States and Territories\n    IBRA 7 Subregions\n\nWilliams 2030 best 5  - for predict and classify\n\n    el1002, el1019, el1037, el1036, el1013\n\nLibs\n\n    GDAL: gdal_translate\n\n### Samples\n\n    Koppen.kml and Koppen.zip are stored in ./test/resources\n\n\n### Module Structure\n\nCode structure of functional tests:\n\n    ./test/resources/Functional_Test_Module.png\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlasoflivingaustralia%2Fspatial-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlasoflivingaustralia%2Fspatial-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlasoflivingaustralia%2Fspatial-hub/lists"}