Giter VIP home page Giter VIP logo

terriajs's Introduction

TerriaJS

Build Status Docs

Terria logo

TerriaJS is a library for building rich, web-based geospatial data explorers, used to drive National Map, Digital Earth Australia Map, NSW Spatial Digital Twin and NEII Viewer (and many others). It uses Cesium and WebGL for a full 3D globe in the browser with no plugins. It gracefully falls back to 2D with Leaflet on systems that can't run Cesium. It can handle catalogs of tens of thousands of layers, with dozens of geospatial file and web service types supported. It is almost entirely JavaScript in the browser, meaning it can even be deployed as a static website, making it simple and cheap to host.


We have just released a brand new version of Terria — verson 8!

We've put together a list of things we've removed from version 8 and some steps to help you migrate to the new version in our migration guide

Not ready to move to version 8 yet? You can find terriajs version 7 here: https://github.com/TerriaJS/terriajs/tree/terriajs7


Features

  • Nested catalog of layers which can be independently enabled to create mashups of many layers.
  • Supports GeoJSON, KML, CSV (point and region-mapped), GPX, GeoRSS, CZML and zipped shapefile file types natively.
  • Supports WMS, WFS, WMTS, Esri MapServer, Esri FeatureServer, Bing Maps, Carto Maps, Cesium Ion Imagery, OpenStreetMap-style raster tiles, Mapbox, SDMX, 3D Tiles and GTFS and Sensor Observation Service item types.
  • Supports querying WMS, WFS, Esri MapServer, CSW, CKAN, Socrata, OpenDataSoft and SDMX services for groups of items.
  • 3D globe (Cesium) or 2D mode (Leaflet). 3D objects supported in CZML format.
  • Time dimensions supported for CSV, CZML, WMS. Automatically animate layers, or slide the time control forward and backward.
  • Drag-and-drop files from your desktop to the browser, for instant visualisation (no file upload to server required).
  • All ASGS (Australian Statistical Geographic Standard) region types (LGA, SA2, commonwealth electoral district etc) supported for CSV region mapping, plus several others: Primary Health Networks, Statistical Local Areas, ISO 3 letter country codes, etc.
  • Users can generate a reusable URL link of their current map view, to quickly share mashups of web-hosted data.
  • The interface is internationalised and translations are available for French, Italian and Japanese. Partial translations have also been contributed for other languages (see TerriaJS weblate)

Terria screenshot

Who's using TerriaJS?

Sites developed by Data61

Not Data61

Sites we're aware of that are using TerriaJS. These are not endorsements or testimonials.

Technical

  • NodeJS v16, v18 and v20 are supported
  • Built in TypeScript & ES2020+ JavaScript, compiled with Babel to ES5.
  • Supports modern browsers (recent versions of Microsoft Edge, Mozilla Firefox & Google Chrome).
  • TerriaJS Server component runs in NodeJS and provides proxying for web services that don't support CORS or require authentication. Instead of using TerriaJS-Sever proxy service, an alternative proxying service URL can be specified. See Specify an alternative proxy server URL
  • Dependencies are managed in NPM and assembled using WebPack.

Getting Started

The easiest way to build your own Terria-based map is using the TerriaMap starting point. This gives you the HTML structure, server and build processes you need to get a site up and running immediately.

See Getting Started in the Documentation for all the details.

Components and naming

  • Terria™ is the overall name for the spatial data platform and the team that built TerriaJS.
  • TerriaJS is this TypeScript/JavaScript library consisting of the 2D/3D map, catalog management and many spatial data connectors.
  • Cesium is the 3D WebGL rendering library used by TerriaJS, which provides many low-level functions for loading and displaying imagery and spatial formats such as GeoJSON and KML.
  • TerriaMap is a complete website starting point, using TerriaJS.
  • TerriaJS-Server is a NodeJS-based server that provides proxying and support services for TerriaJS.
  • NationalMap is the flagship Terria deployment, and the origin of the TerriaJS library.

Related components

  • TerriaMapStatic, a pre-built version of TerriaMap, which can be deployed as a static HTML website, such as on Github Pages.

Big Thanks

Hosting and contribution framework for community translations of TerriaJS provided by Weblate under the Libre plan for open source software. See our translation progress for different languages:

Translation status

Join the community

Get in touch!

Publishing TerriaJS

From main using GitHub Actions (preferred method):

  • Checkout and pull main branch of terriajs, run yarn install if necessary.
  • Bump the version number in package.json.
  • Review and edit CHANGES.md.
    • Ensure that entries for new changes are written in the right section by diffing against the last version. Make sure the section name matches the version you set in package.json above.
    • e.g. git diff 8.2.25 HEAD -- CHANGES.md (where 8.2.25 is the previous published version)
    • Or using GitHub web interface https://github.com/TerriaJS/terriajs/compare/8.2.25...main (change the version and master/next to match the previous release and branch)
    • Finalise the heading of the version to be released with version number and date.
    • Add a heading above for upcoming changes to be documented under.
  • Commit and push your changes on a branch and make a PR to main branch.
  • Get someone to review and merge the PR.
  • Wait for slack notification of successful/failed publish.
  • 😄

Publishing to npm without the GitHub Action (not for standard releases):

This method should not be used to publish versions at the tip of main or another branch that is often used for releases. To publish a new version of TerriaJS to npm with this method, you'll need to be listed as a collaborator here. Existing collaborators can add new ones. Then:

  • Checkout and pull the branch of terriajs to be deployed, run yarn install if necessary.
  • Bump the version number in package.json. Follow semver.
  • Appropriately update CHANGES.md, ensuring that changes are listed in their correct sections.
  • Commit and push your changes and make a PR to the branch to be deployed.
  • Get someone to review and merge the PR.
  • Fetch and checkout the merge commit made by merging the PR.
  • rm -rf wwwroot/build
  • Make sure you don't have any changes in your working directory.
  • gulp lint release
  • npm publish --tag your-tag (for a release not at the tip of main a tag must be set, and it must not be latest or next. For releases on old versions you could use e.g. 6-5-x or 6-x-x as a tag, for upcoming features a short name could be used)
  • Ensure that CHANGES.md on main is also updated to list the release and clearly note the nature and reason for release.

The above will publish a new version to npm and also tag that version on GitHub.

terriajs's People

Contributors

a-stacey avatar alexgilleran avatar chloeleichen avatar feralex12131415 avatar greenkeeper[bot] avatar greenkeeperio-bot avatar imakihi avatar jason-dnetto avatar keattang avatar keyboardsounds avatar kring avatar ljowen avatar meh9 avatar mgcsls avatar mwu2018 avatar na9da avatar nf-s avatar racingtadpole avatar reginapramesti avatar rowanwins avatar rroset avatar sixlighthouses avatar soyarsauce avatar staffordsmith83 avatar stevage avatar steve9164 avatar weblate avatar wibily avatar ykiu avatar zoran995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terriajs's Issues

Terrain height bug

I know we have some inherent problems with terrain height, but I think there may also be a bug. If you roam with mouse point around the coastline you get some odd numbers. If you go to Tuross Heads, the number get smaller as you go inland and higher as you go out to sea. It's almost like the tile is being read backwards.

Share panel styling

A guide to style the share panel in keeping with current content and functionality

screen shot 2014-06-24 at 4 46 39 pm

Support 3rd party services

Provide a simple API to allow a 3rd party service to work with National Map. Change GeoSpace to work through this API and have no built-in presence in NM. Provide a sample service and documentation.

This work is mostly completed sans documentation. I just wanted to have an issue to work against.

Set up site analytics for NM

We should set up our POC NM to use Google Analytics before it's announced to track usage before, during and after govhack (to understand how people are using it and also to help plan for the production release)

Remove fake placeholder telco data

I realise this will all go away when we get the new data collection IA in but if that is more than a day away... can we remove the placeholder broadband and nbn data services. A few people are now checking/demoing the NM and I've had a couple of queries re this. It would be best to remove these and add back in if we get access the real data services.

Create compass design

We'd like to include a compass in the POC. #34 covers the code side, but we also need a compass design. Ideally it would be designed for interaction as well as display, so users could use it to rotate the camera.

Need main web page for National Map

We still don't have a web page for national map. As well as the general info, it needs to point that is still very much proof of concept software software. Also we need to think about whether the base link for nationalmap should go to the page or the viewer. Safer to go the page to set to set expectations, explain things, etc.

Write support page (including FAQ, Known Problems and how to provide feedback)

Hilary is setting up a FAQ page. We need to populate it.

Some random ones to start with:

  • What is the National Map? (for answer, just link to about page)
  • I'm a data owner in Australia. How do I get my data on to National Map?
  • I like the Australian National Map. How can I set one up for my country or for the world?
  • What data formats are supported?
  • What browsers are supported?

Look into caching for our NM servers

There are caching solutions for both NM and the GeoServers we host with data. We need to tune these before the release. Possibly get some of Damon's time?

Make sure we handle all supported data formats consistently

Make sure that all the data formats we support can be handle via drag and drop, file open, url via ?data_url=, and services returning urls. We are pretty close at this point and just need to test and cover gaps I think. If it too much of a hassle we can note it in release notes and finish it up post-poc

Info panel should make data licence clear

This relates to #82. One of the main initial targets for NM is developers finding and using open data. It is important that they understand what they can and can't do with any data accessed through the NM. We should try to ascertain any usage constraints and make those clear near the top of the info panel. This is probably not going to be tidy/easy :-(

In some existing services (eg GA's surface geology) the licence info seems to be there but is given in "AccessConstraints" (they say the data set is CC-BY there). From a quick look at the WMS specs, it seems that this is intended for describing access constraints rather than usage constraints but there doesn't seem to be a better way of describing usage constraints in WMS (I could be wrong). So one option is to repeat the AccessConstraints property near the top of the info panel (as well as keeping it in place where it is). However if we do this, we'd need to be careful as the default value specified in the WMS spec is "none" meaning "no access constraints" which is clearly different from "no usage constraints" (most of the NM WMS services seem to have "none" even though they are intended to be CC-BY and CC-BY DOES have usage constraints - ie you have to give credit when you use it) so we wouldn't want to show "none" as the usage constraint.

For data.gov.au services, we could get the data from CKAN.

Ideally, we should work out the best approach for NM and create some guidance for the data custodians to make sure that they are putting the right info in the right places. If WMS (and I guess WFS but I haven't checked the spec) don't handle this well, this could be a bit of a hack).

I'm assuming we won't get this sorted for POC but if there is anything simple we can do to go part of the way (given that lots of developers will be using the data that access via NM and will want to know what they can and can't do with it), that would be good.

Zooming into localised WMS data sets is clunky

I'm not sure if we can do anything about this but this is really bugging me for going from a national view to a localised data sets (eg a council area) since we just moved over from some of the WFS data sets to using WMS equivalents (eg all the data.gov.au WFS services such as bike racks). When viewing the whole country and then choosing a WFS for eg bike racks in the Gold Coast, we would show the points and zoom in and all looked great. When doing it with a WMS, it gets the high level tiles and these are huge and occlude the whole area until we get to a lower tile level. It looks much more clunky with WMS than with WFS. I assume this can be addressed with styles on the WMS server but this is happening with data.gov.au data sets and we may not have much control of the tiling.

Can we do anything about this (eg finish zooming in before loading the WMS tiles)?

Improve proxy performance

The things we do proxy could also be a big problem. To improve performance I think we need to:

  • get more cores on the vm or get a new box
  • add multi-threaded support to node via cluster (e.g. like GeoSpace)
  • tune varnish to do as much caching as possible of wms tiles.
  • point at our geoserver.research.nicta.com.au service as much as possible instead of GA for wms display.
  • point to GA, BOM, data.gov.au as much as possible for data links given to user.

New look for data set info panel

I thought this was covered somewhere but can't see it so here it is (kill if I've missed it)... It's related to #37 . We need a new look "info" panel for a data set/service as discussed with the newer look styling and with URL (copyable) and some key metadata. Ideally we'd have at least data custodian, description and licence but I realise that we're probably getting different data from different services.

Determine if we should turn off open for CORS proxy

The more I think about the open proxy the more issues I see that can bring out server down. I think we need to turn this off and just let people know that the data source they're tying to get it should provide CORS support (popup?).

"Add Data" Panel contents

In Chrome OSX there is a display problem with the contents of the "Add Data" panel, running under the right edge.

See screen:
screen shot 2014-06-24 at 4 39 06 pm

Mouse pointer elevation value

What is the elevation reported in the header with respect to? I (the layperson) find it somewhat unintuitive. Does its accuracy warrant presentation to one decimal place? It might need further explanation.

Exception when removing the "NSW Incidents" data source

Uncaught TypeError: Cannot read property 'length' of undefined Cesium.js:84994
DataSourceDisplay._onDataSourceRemoved Cesium.js:84994
Event.raiseEvent Cesium.js:4338
DataSourceCollection.remove Cesium.js:59353
GeoDataCollection.remove ausglobe.js:6395
disableItem ausglobe.js:10261
(anonymous function) ausglobe.js:9753
command Cesium.js:125718
(anonymous function) ausglobe.js:3936
v.event.dispatch jquery-1.8.3.min.js:2
v.event.add.o.handle.u jquery-1.8.3.min.js:2

Add Data should support URLs for service types other than WFS

For example, users should be able to specify the URL of a WMS server, ArcGIS MapServer, or a URL of a single GeoJSON or KML file.

This requires that we either make the user specify the type of service, or we try to deduce it automatically by making several different requests.

Data Collections Panel IA

From Meena:
PDF showing the Data Panel IA within the National Map. There are two options.
Please read the notes in orange on the PDF. Should explain everything.
http://wiki.inside.nicta.com.au/download/attachments/89458324/Data_IA.pdf?api=v2

Also attached is a spreadsheet showing where all the data in the current ‘Data collections’ and ‘Maps’ should be placed.
http://wiki.inside.nicta.com.au/download/attachments/89458324/National%20Map%20Topics.xlsx?api=v2

HC: I like both options.
I think the other option of no “Data Collections” is an nice alternative.
Love “Editor’s Picks” as a category.
I also think your solution for a third level (topic 2) is well considered for scalability.
Do we need to run this by Margie Smith?

Display information for WMS features on click

We currently show metadata for WFS features when the user clicks them. This can be done for WMS features as well by doing a GetFeatureInfo request to the WMS server on click, as long as the server supports it (most do).

This is started in the wmsFeatureInfo branch.

Clicking on data items in list moves data item

I know this is happening because we add and remove items at the top, but it's very unintuitive and annoying when you're trying to explore the list. Can we just offset since we know that it will be added or removed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.