Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into refactor-zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
nf-s committed Sep 7, 2023
2 parents 6b38a5f + b19ebd4 commit bdb0b60
Show file tree
Hide file tree
Showing 71 changed files with 4,383 additions and 4,567 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Expand Up @@ -11,5 +11,9 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

[doc/**.md]
# mkdocs requires 4 spaces. With 2 space indents, nested lists do not work
indent_size = 4

[*.scss]
indent_size = 2
16 changes: 14 additions & 2 deletions CHANGES.md
@@ -1,11 +1,23 @@
# Change Log

#### next release (8.3.2)
#### next release (8.3.4)

- Refactor 3D & 2D zoom code path.
- Improve zooming to clamped items in 3D.
- [The next improvement]

#### next release (8.3.3)

- Fixed broken point dragging interaction for user drawing in 3D mode.
- Fixed rectangle drawing in 2D mode.
- Added EPSG:7855 to `Proj4Definitions`.

#### 8.3.2 - 2023-08-11

- Fixed a bug when restoring timefilter from a share link having more than one imagery item with the same base URL (but different layer names).
- Fix WPS duplicate display of analysis results when loaded through a share URL
- Upgraded babel packages.

#### 8.3.1 - 2023-06-29

- **Breaking changes:**
Expand Down Expand Up @@ -427,7 +439,7 @@
- Multiple changes to `GtfsCatalogItem`:
- Removed `apiKey` in favour of more general `headers`
- Removed unused `bearingDirectionProperty` & `compassDirectionProperty`
- `image` is no longer resolved relative to the TerriaJS asset folder. This will allow using relative URLs for assets that aren't inside the TerriaJS asset folder. Any relative `image` urls should now have "build/TerriaJS/" prepended (the value of `terria.baseUrl`).
- `image` is no longer resolved relative to the TerriaJS asset folder. This will allow using relative URLs for assets that aren't inside the TerriaJS asset folder. Prepend "build/TerriaJS/" (the value of `terria.baseUrl`) to any existing relative `image` urls.
- Added `colorModelsByProperty` to `GtfsCatalogItem` which will colour 1 model differently for different vehichles based on properties matched by regular expression. E.g. colour a vehicle model by which train line the vehicle is travelling on.
- Fixed a bug where cross-origin billboard images threw errors in Leaflet mode when trying to recolour the image.
- Changed rounding of the numbers of the countdown timer in the workbench UI for items that use polling. The timer wil now show 00:00 for at most 500ms (instead of a full second). This means that for timers that are a multiple of 1000ms the timer will now show 00:01 for the last second before polling, instead of 00:00.
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Expand Up @@ -62,3 +62,4 @@ The following people have contributed to TerriaJS:
- [Zoran Kokeza](https://github.com/zoran995)
- [J. Garcia](https://github.com/ctwhome)
- [Yusuke Kiuchi](https://github.com/ykiu)
- [Tomoyuki Hisada](https://github.com/hisayan)
30 changes: 9 additions & 21 deletions doc/README.md
@@ -1,30 +1,18 @@
[TerriaJS](http://terria.io) is an open-source framework for web-based geospatial catalog explorers.

The documentation on this site is for applications using TerriaJS version 8. If you are still maintaining an application using TerriaJS version 7 or lower go to [docs-v7.terria.io](https://docs-v7.terria.io).
- [Getting Started](getting-started.md): Quick start guide to building your first TerriaJS application.
- [Customizing](customizing/README.md): Configure and tweak a TerriaJS application, including skinning and setting up the catalog.
- [Connecting to Data](connecting-to-data/README.md): Connect TerriaJS to your servers and data.
- [Deploying](deploying/README.md): Deploy a TerriaJS application in simple and advanced scenarios.
- [Contributing](contributing/README.md): Add new features to TerriaJS, be part of the TerriaJS development team, set up a development environment, write tests, and perform code reviews.

**Most of these docs were written for TerriaJS version <= 7. We're working on updating these docs, however it will take us some time. For the time being these parts are probably the most useful:**
!!! note

- [Migration Guide](contributing/migration-guide.md): A migration guide for map builders who maintain a version 7 map and wish to upgrade.
- [v8 Catalog Items](connecting-to-data/catalog-items.md): Generated documentation on all version 8 Catalog Items.
- [v8 Catalog Groups](connecting-to-data/catalog-groups.md): Generated documentation on all version 8 Catalog Groups.
- [v8 Catalog Functions](connecting-to-data/catalog-functions.md): Generated documentation on all version 8 Catalog Function.
- [Getting Started](getting-started.md): Quick start guide to building your first TerriaJS application. Updated for version 8.
- [Deploying](deploying/README.md): Deploy a TerriaJS application in simple and advanced scenarios. Updated for version 8.
- [Frontend Style Guide](contributing/frontend-style-guide.md): A style guide for writing/updating .jsx/.tsx React views for TerriaJS. Some React components have been updated in accordance to this style guide but many have not yet.
Looking for help using a TerriaJS-based site? Try the [Terria Platforms User Guide](https://userguide.terria.io/).

Partially updated docs:
_The documentation on this site is for applications using TerriaJS version 8. If you are still maintaining an application using TerriaJS version 7 or lower go to [docs-v7.terria.io](https://docs-v7.terria.io)._

- [Getting Started](getting-started.md): Quick start guide to building your first TerriaJS application.
- [Customizing](customizing/README.md): Configure and tweak a TerriaJS application, including skinning and setting up the catalog.
- [Connecting to Data](connecting-to-data/README.md): Connect TerriaJS to your servers and data.
- [Deploying](deploying/README.md): Deploy a TerriaJS application in simple and advanced scenarios.
- [Contributing](contributing/README.md): Add new features to TerriaJS, be part of the TerriaJS development team, set up a development environment, write tests, and perform code reviews.

Looking for help using a TerriaJS-based site? Try the [Terria Platforms User Guide](https://userguide.terria.io/).

This documentation is maintained at [github.com/TerriaJS/TerriaJS/tree/main/doc](https://github.com/TerriaJS/TerriaJS/tree/main/doc).

It can be viewed at [docs.terria.io](https://docs.terria.io).
_This documentation is maintained at [github.com/TerriaJS/TerriaJS/tree/main/doc](https://github.com/TerriaJS/TerriaJS/tree/main/doc). It can be viewed at [docs.terria.io](https://docs.terria.io)._

<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
Expand Down
3,020 changes: 484 additions & 2,536 deletions doc/acknowledgements/attributions.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions doc/connecting-to-data/README.md
Expand Up @@ -4,8 +4,8 @@ Before beginning, it is very important to understand [Cross-Origin Resource Shar

TerriaJS can interface with three broad types if data:

- [Catalog Group](../connecting-to-data/catalog-groups.md): A group (folder) of items. Different group types allow the contents to be manually specified or to be automatically determined by querying various types of server. TerriaJS can use many different types of servers to populate a group, including CKAN, CSW, WMS, and more. For example, if you define a catalog group that points at a Web Map Service (WMS) server, TerriaJS will query the WMS `GetCapabilities` when the group is opened and fill the group with all of the layers advertised by the WMS server.
- [Catalog Item](../connecting-to-data/catalog-items.md): Actual geospatial or chart data from a file or service, in various formats. TerriaJS supports WMS, KML, GeoJSON, ArcGIS MapServer, and many more files and services as catalog items.
- [Catalog Function](../connecting-to-data/catalog-functions.md): A parameterized service, such as a Web Processing Service (WPS). The user supplies the parameters and gets back some result.
- [Catalog Reference](../connecting-to-data/catalog-references.md): Resolves to a Catalog Group, Item or Function.
- [Catalog item search](item-search.md): A mechanism for searching inside catalog items.
- [Catalog Group](../connecting-to-data/catalog-groups.md): A group (folder) of items. Different group types allow the contents to be manually specified or to be automatically determined by querying various types of server. TerriaJS can use many different types of servers to populate a group, including CKAN, CSW, WMS, and more. For example, if you define a catalog group that points at a Web Map Service (WMS) server, TerriaJS will query the WMS `GetCapabilities` when the group is opened and fill the group with all of the layers advertised by the WMS server.
- [Catalog Item](../connecting-to-data/catalog-items.md): Actual geospatial or chart data from a file or service, in various formats. TerriaJS supports WMS, KML, GeoJSON, ArcGIS MapServer, and many more files and services as catalog items.
- [Catalog Function](../connecting-to-data/catalog-functions.md): A parameterized service, such as a Web Processing Service (WPS). The user supplies the parameters and gets back some result.
- [Catalog Reference](../connecting-to-data/catalog-references.md): Resolves to a Catalog Group, Item or Function.
- [Catalog item search](item-search.md): A mechanism for searching inside catalog items.
2 changes: 1 addition & 1 deletion doc/connecting-to-data/cross-origin-resource-sharing.md
Expand Up @@ -6,7 +6,7 @@ Failing to do this may result in an error like this:

Next, you should add servers that _do_ support Cross-Origin Resource Sharing (CORS) to the `corsDomains` list in your [initialization file](../customizing/initialization-files.md). Servers in this list are contacted directly instead of going through the proxy... except:

- if an HTTPS web page is accessing an HTTP server (this way we avoid a mixed content warning from the browser).
- if an HTTPS web page is accessing an HTTP server (this way we avoid a mixed content warning from the browser).

If your server does _not_ support CORS, then you still need to add it to the `allowProxyFor` whitelist, but do not add it to the `corsDomains` list. It will then be proxied.

Expand Down
Expand Up @@ -88,10 +88,10 @@ The preferred way to format numbers is using the `formats` option, eg:

The supported format options are:

- `"maximumFractionDigits": X`: To reduce the number of decimal places to a maximum of X digits.
- `"minimumFractionDigits": X`: To increase the number of decimal places to a minimum of X digits.
- `"useGrouping": true`: To show thousands separators.
- `"style": "percent"`: To show 0.15 as 15%.
- `"maximumFractionDigits": X`: To reduce the number of decimal places to a maximum of X digits.
- `"minimumFractionDigits": X`: To increase the number of decimal places to a minimum of X digits.
- `"useGrouping": true`: To show thousands separators.
- `"style": "percent"`: To show 0.15 as 15%.

A second method is to use `terria.formatNumber` directly in the template. This accepts an initial JSON string describing the same options as above. To simplify the notation, the quotes around the keys are optional here.

Expand Down Expand Up @@ -128,9 +128,9 @@ As with number you can also use `terria.dateTimeformat` directly in the template

You can replace text by directly using `terria.partialByName` in the template and providing partials for matching and replacement. For example, with the following template and partials,

- If the value of `feature.data.layerId` matches a property name in the `partials`, it will be replaced by corresponding value.
- If there is no matching in the `partials`, the original value will be used.
- Any unsafe values in the `partials` will be stripped off when being rendered.
- If the value of `feature.data.layerId` matches a property name in the `partials`, it will be replaced by corresponding value.
- If there is no matching in the `partials`, the original value will be used.
- Any unsafe values in the `partials` will be stripped off when being rendered.

```json
"featureInfoTemplate": {
Expand All @@ -154,17 +154,17 @@ For features with time-varying table-based data structures (eg. CSV, SOS2, SDMX-

You can place this chart in your template using `{{terria.timeSeries.chart}}`. Alternatively, you can access the following component information:

- `{{terria.timeSeries.xName}}` - the x-column name
- `{{terria.timeSeries.yName}}` - the y-column name
- `{{terria.timeSeries.title}}`
- `{{terria.timeSeries.id}}`
- `{{terria.timeSeries.units}}` - the column units as a comma-separated string.
- `{{terria.timeSeries.data}}` - the data as a comma-separated string.
- `{{terria.timeSeries.xName}}` - the x-column name
- `{{terria.timeSeries.yName}}` - the y-column name
- `{{terria.timeSeries.title}}`
- `{{terria.timeSeries.id}}`
- `{{terria.timeSeries.units}}` - the column units as a comma-separated string.
- `{{terria.timeSeries.data}}` - the data as a comma-separated string.

Please note:

- If any of the component information above contains double-quotes, double quotes will be removed before TerriaJS processes the template further.
- If any of the component information above is used as part of tag attributes, it must be surrounded by double-quotes. e.g. `<chart y-column="{{terria.timeSeries.yName}}"></chart>`
- If any of the component information above contains double-quotes, double quotes will be removed before TerriaJS processes the template further.
- If any of the component information above is used as part of tag attributes, it must be surrounded by double-quotes. e.g. `<chart y-column="{{terria.timeSeries.yName}}"></chart>`

So you could reconstruct the chart manually as:

Expand Down
62 changes: 31 additions & 31 deletions doc/connecting-to-data/customizing-data-appearance/imagery-data.md
Expand Up @@ -8,39 +8,39 @@ Here's an example json file which places some sample WMS items in an open group

```json
{
"catalog": [
{
"name": "WMS example",
"type": "group",
"isPromoted": true,
"isOpen": true,
"items": [
"catalog": [
{
"name": "Solar Satellite DNI & GHI with datetime picker",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"showDatetimePicker": true,
"useOwnClock": true,
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
},
{
"name": "Solar Satellite DNI & GHI with initialTimeSource",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"initialTimeSource": "2014-06-30T22:00:00Z",
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
"name": "WMS example",
"type": "group",
"isPromoted": true,
"isOpen": true,
"items": [
{
"name": "Solar Satellite DNI & GHI with datetime picker",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"showDatetimePicker": true,
"useOwnClock": true,
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
},
{
"name": "Solar Satellite DNI & GHI with initialTimeSource",
"layers": "Solar_Satellite_DNI_2014",
"url": "http://gis.aremi.nationalmap.gov.au/bom/wms",
"type": "wms",
"maxRefreshIntervals": 9000,
"initialTimeSource": "2014-06-30T22:00:00Z",
"featureInfoTemplate": {
"name": "{{GRAY_INDEX}} W/m2"
}
}
]
}
]
}
]
]
}
```

Expand Down
Expand Up @@ -12,6 +12,6 @@ and can be included there too.

This section explains how you can use such a file to improve the look of your data:

- [Customizing the Appearance of Tabular Data](./tabular-data.md)
- [Customizing the Appearance of Imagery Data](./imagery-data.md)
- [Customizing the Feature Info Template](./feature-info-template.md)
- [Customizing the Appearance of Tabular Data](./tabular-data.md)
- [Customizing the Appearance of Imagery Data](./imagery-data.md)
- [Customizing the Feature Info Template](./feature-info-template.md)
Expand Up @@ -49,8 +49,8 @@ Please note this documentation is still being developed, and does not cover ever
that is possible.
The definitive source of what you can do with `tableStyle` is this pair:

- [TableStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableStyle.js)
- [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js)
- [TableStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableStyle.js)
- [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js)

## Referencing your data

Expand Down Expand Up @@ -132,9 +132,9 @@ If you want to change the appearance of individual columns, use `tableStyle`'s `

This example shows a few possibilities:

- A column called "original name" is displayed with the name "better name".
- The legend for that column is shown without any decimal places (`maximumFractionDigits` 0).
- A column in the original data called "bad" is hidden from the workbench.
- A column called "original name" is displayed with the name "better name".
- The legend for that column is shown without any decimal places (`maximumFractionDigits` 0).
- A column in the original data called "bad" is hidden from the workbench.

The full list of options is in [TableColumnStyle](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/TableColumnStyle.js).

Expand Down
6 changes: 3 additions & 3 deletions doc/connecting-to-data/item-search.md
Expand Up @@ -6,7 +6,7 @@ TerriaJS provides an `ItemSearchProvider` API for defining custom search provide

## Available search providers

- [Indexed item search provider](item-search/indexed-item-search.md)
- [Indexed item search provider](item-search/indexed-item-search.md)

## Configuring the catalog item for searching

Expand Down Expand Up @@ -50,8 +50,8 @@ The search tool can be opened from the expand menu for the catalog item in the w

## Future implementations

- GeoJSON search provider, for searching inside a geojson catalog item using its properties.
- WPS search provider, for searching any item using a remote server.
- GeoJSON search provider, for searching inside a geojson catalog item using its properties.
- WPS search provider, for searching any item using a remote server.

## Implementing your own search provider

Expand Down

0 comments on commit bdb0b60

Please sign in to comment.