Skip to content

Commit dc72b9f

Browse files
Merge pull request #12 from EOEPCA/radiantearth-main
chore: update STAC Browser
2 parents 712b5ca + d6834a5 commit dc72b9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+6169
-3088
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
* @m-mohr
22
docker/ @waystilos @geospatial-jeff @constantinius
33
Dockerfile @waystilos @geospatial-jeff @constantinius
4-
src/locales/de-CH @p1d1d1
5-
src/locales/es @rnanclares
6-
src/locales/fr @jfbourgon
7-
src/locales/fr-CA @jfbourgon
8-
src/locales/fr-CH @p1d1d1
9-
src/locales/it @p1d1d1
10-
src/locales/it-CH @p1d1d1
11-
src/locales/ro @mneagul
12-
src/locales/pt @psacra
13-
src/locales/pt-BR @uba

README.md

Lines changed: 52 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,39 @@ implemented as a single page application (SPA) for ease of development and to
88
limit the overall number of catalog reads necessary when browsing (as catalogs
99
may be nested and do not necessarily contain references to their parents).
1010

11-
Version: **3.2.0** (supports all STAC versions between 0.6.0 and 1.1.0)
11+
Version: **3.3.4** (supports all STAC versions between 0.6.0 and 1.1.0)
1212

1313
This package has also been published to npm as [`@radiantearth/stac-browser`](https://www.npmjs.com/package/@radiantearth/stac-browser).
1414

1515
It's not officially supported, but you may also be able to use it for
1616
certain _OGC API - Records_ and _OGC API - Features_ compliant servers.
1717

18-
**Please note that STAC Browser is currently without funding for both maintenance, bug fixes and improvements. This means issues and PRs may be addressed very slowly.
18+
**Please note that STAC Browser is currently with limited funding for both maintenance, bug fixes and improvements. This means issues and PRs may be addressed very slowly.
1919
If you care about STAC Browser and have some funds to support the future of STAC Browser, please contact [email protected]**
2020

2121
**Table of Contents:**
2222

23-
- [Examples](#examples)
24-
- [Get Started](#get-started)
25-
- [Private query parameters](#private-query-parameters)
26-
- [Migrate from old versions](#migrate-from-old-versions)
27-
- [Customize](#customize)
28-
- [Options](#options)
29-
- [Languages](#languages)
30-
- [Themes](#themes)
31-
- [Basemaps](#basemaps)
32-
- [Actions](#actions)
33-
- [Additional metadata fields](#additional-metadata-fields)
34-
- [Customize through root catalog](#customize-through-root-catalog)
35-
- [Custom extensions](#custom-extensions)
36-
- [Docker](#docker)
37-
- [Contributing](#contributing)
38-
- [Adding a new language](#adding-a-new-language)
39-
- [Sponsors](#sponsors)
23+
- [STAC Browser](#stac-browser)
24+
- [Examples](#examples)
25+
- [Get Started](#get-started)
26+
- [Private query parameters](#private-query-parameters)
27+
- [Migrate from old versions](#migrate-from-old-versions)
28+
- [Customize](#customize)
29+
- [Options](#options)
30+
- [Languages](#languages)
31+
- [Custom phrases](#custom-phrases)
32+
- [Themes](#themes)
33+
- [Basemaps](#basemaps)
34+
- [Actions](#actions)
35+
- [Additional metadata fields](#additional-metadata-fields)
36+
- [Example](#example)
37+
- [Translation](#translation)
38+
- [Customize through root catalog](#customize-through-root-catalog)
39+
- [Custom extensions](#custom-extensions)
40+
- [Docker](#docker)
41+
- [Contributing](#contributing)
42+
- [Adding a new language](#adding-a-new-language)
43+
- [Sponsors](#sponsors)
4044

4145
## Examples
4246

@@ -74,6 +78,9 @@ npm run build -- --catalogUrl="https://earth-search.aws.element84.com/v1/"
7478
This will only work on the root path of your domain though. If you'd like to publish in a sub-folder,
7579
you can use the [`pathPrefix`](docs/options.md#pathprefix) option.
7680

81+
> [!NOTE]
82+
> If you are using a recent version of node/npm on Windows, you may need to use `npm run build -- -- ...` instead of `npm run build -- ...`, see <https://github.com/npm/cli/issues/7375> for details.
83+
7784
After building, `dist/` will contain all assets necessary
7885
host the browser. These can be manually copied to your web host of choice.
7986
**Important:** If `historyMode` is set to `history` (which is the default value), you'll need to add
@@ -116,19 +123,31 @@ You need to change the [`locale`](docs/options.md#locale) and [`supportedLocales
116123

117124
The following languages are currently supported:
118125

119-
- German (Germany, Switzerland)
120-
- Spanish
121-
- English (International, US, UK)
122-
- French (Canada, France, Switzerland)
123-
- Italian (Italy, Switzerland)
124-
- Romanian
125-
- Japanese
126-
- Portuguese (Brazil, Portugal)
126+
- Arabic `ar`
127+
- German `de` (Germany `de`, Switzerland `de-CH`)
128+
- Spanish `es`
129+
- English `en` (International `en`, US `en-US`, UK `en-GB`)
130+
- French `fr` (Canada `fr-CA`, France `fr`, Switzerland `fr-CH`)
131+
- Italian `it` (Italy `it`, Switzerland `it-CH`)
132+
- Romanian `ro`
133+
- Japanese `ja`
134+
- Portuguese `pt` (Brazil `pt-BR`, Portugal `pt`)
127135

128136
We manage the translations in Crowdin, please see <https://crowdin.com/project/stac-browser/> for details.
129137

130138
To add your own language, please follow the guide below: [Adding a new language](#adding-a-new-language)
131139

140+
The following contributors kindly provide the translations:
141+
142+
- [@jfbourgon](https://github.com/jfbourgon): `fr`, `fr-CA`
143+
- [@mneagul](https://github.com/mneagul): `ro`
144+
- [@m-mohr](https://github.com/m-mohr): `de`, `en`, `en-GB`, `en-US`
145+
- [@p1d1d1](https://github.com/p1d1d1): `de-CH`, `fr-CH`, `it`, `it-CH`
146+
- [@psacra](https://github.com/psacra): `pt`
147+
- [@randa-11295](https://github.com/randa-11295): `ar`
148+
- [@rnanclares](https://github.com/rnanclares): `es`
149+
- [@uba](https://github.com/uba): `pt-BR`
150+
132151
#### Custom phrases
133152

134153
You can define custom phrases in the `custom.json`.
@@ -252,64 +271,7 @@ STAC Browser supports some non-standardized extensions to the STAC specification
252271

253272
## Docker
254273

255-
### Create a custom image
256-
257-
Building the Dockerfile without changing any build options:
258-
259-
```bash
260-
docker build -t stac-browser:v1 .
261-
```
262-
263-
Run the container for a specific URL:
264-
265-
```bash
266-
docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" stac-browser:v1
267-
```
268-
269-
STAC Browser is now available at `http://localhost:8080`
270-
271-
---
272-
273-
You can pass further options to STAC Browser to customize it to your needs.
274-
275-
The build-only options
276-
[`pathPrefix`](docs/options.md#pathprefix) and [`historyMode`](docs/options.md#historymode)
277-
can be provided as a
278-
[build argument](https://docs.docker.com/engine/reference/commandline/build#set-build-time-variables---build-arg)
279-
when building the Dockerfile.
280-
281-
For example:
282-
283-
```bash
284-
docker build -t stac-browser:v1 --build-arg pathPrefix="/browser/" --build-arg historyMode=hash .
285-
```
286-
287-
All other options, except the ones that are explicitly excluded from CLI/ENV usage,
288-
can be passed as environment variables when running the container.
289-
For example, to run the container with a pre-defined
290-
[`catalogUrl`](docs/options.md#catalogurl) and [`catalogTitle`](docs/options.md#catalogtitle):
291-
292-
```bash
293-
docker run -p 8080:8080 -e SB_catalogUrl="https://earth-search.aws.element84.com/v1/" -e SB_catalogTitle="Earth Search" stac-browser:v1
294-
```
295-
296-
If you want to pass all the other arguments to `npm run build` directly, you can modify to the Dockerfile as needed.
297-
298-
STAC browser is now available at `http://localhost:8080/browser`
299-
300-
### Use an existing image
301-
302-
Since version 3.1.1, you can add an existing image from [Packages](https://github.com/radiantearth/stac-browser/pkgs/container/stac-browser) to your docker-compose.yml:
303-
304-
```
305-
services:
306-
stac-browser:
307-
image: ghcr.io/radiantearth/stac-browser:latest
308-
ports:
309-
- 8080:8080
310-
environment:
311-
SB_catalogUrl: "https://localhost:7188"
312-
```
274+
You can use the Docker to work with STAC Browser. Please read [Docker documentation](docs/docker.md) for more details.
313275

314276
## Contributing
315277

@@ -356,8 +318,10 @@ You can also use one of the existing languages and provide an alternate version
356318
The following sponsors have provided a substantial amount of funding for STAC Browser in the past:
357319

358320
- [Radiant Earth](https://radiant.earth) (base funding for versions 1, 2 and 3)
321+
- [swisstopo](https://www.swisstopo.admin.ch/) (maintenance, base funding for version 3 and 4)
359322
- [National Resources Canada](https://natural-resources.canada.ca/home) (multi-language support, maintenance)
360323
- [Matthias Mohr - Softwareentwicklung](https://mohr.ws) (maintenance)
361-
- [Spacebel](https://spacebel.com) (collection search)
362-
- [Planet](https://planet.com) (OpenID Connect authentication, other features, maintenance)
363-
- [CloudFerro](https://cloudferro.com) (authentication, Alternate Asset and Storage extensions)
324+
- [Spacebel](https://spacebel.com) (collection search, mapping)
325+
- [Planet](https://planet.com) (authentication, maintenance)
326+
- [CloudFerro](https://cloudferro.com) (authentication, alternate asset and storage extension)
327+
- [Geobeyond](http://www.geobeyond.it/) (mapping)

assetActions.config.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1+
//import Felt from './src/actions/assets/Felt.js';
2+
import Cesium from './src/actions/assets/Cesium.js';
13
import CopcViewer from './src/actions/assets/CopcViewer.js';
4+
import F3D from './src/actions/assets/F3D.js';
25
import GeoJsonIo from './src/actions/assets/GeoJsonIo.js';
3-
//import Felt from './src/actions/assets/Felt.js';
6+
// import Geofox from './src/actions/assets/Geofox.js';
7+
// import Potree from './src/actions/assets/Potree.js';
8+
import Protomaps from './src/actions/assets/Protomaps.js';
49

510
export default {
11+
//Felt
12+
Cesium,
613
CopcViewer,
14+
F3D,
715
GeoJsonIo,
8-
//Felt
9-
};
16+
// Potree,
17+
Protomaps,
18+
};

config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
fallbackLocale: "en",
1010
supportedLocales: [
1111
"de",
12+
"ar",
1213
// "de-CH",
1314
"es",
1415
"en",
@@ -27,7 +28,7 @@ module.exports = {
2728
apiCatalogPriority: null,
2829
useTileLayerAsFallback: true,
2930
displayGeoTiffByDefault: false,
30-
buildTileUrlTemplate: ({href, asset}) => "https://tiles.rdnt.io/tiles/{z}/{x}/{y}@2x?url=" + encodeURIComponent(asset.href.startsWith("/vsi") ? asset.href : href),
31+
buildTileUrlTemplate: ({href, asset}) => "https://tiles.rdnt.io/tiles/{z}/{x}/{y}@2x?url=" + encodeURIComponent(href),
3132
stacProxyUrl: null,
3233
pathPrefix: "/stac-browser/",
3334
historyMode: "hash",
@@ -39,11 +40,13 @@ module.exports = {
3940
geoTiffResolution: 128,
4041
redirectLegacyUrls: false,
4142
itemsPerPage: 12,
43+
maxItemsPerPage: 1000,
4244
defaultThumbnailSize: null,
4345
maxPreviewsOnMap: 50,
4446
crossOriginMedia: null,
4547
requestHeaders: {},
4648
requestQueryParameters: {},
49+
socialSharing: ['email', 'bsky', 'mastodon', 'x'],
4750
preprocessSTAC: null,
4851
authConfig: null
4952
};

config.schema.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@
169169
],
170170
"minimum": 1
171171
},
172+
"maxItemsPerPage": {
173+
"type": [
174+
"integer"
175+
],
176+
"minimum": 1
177+
},
172178
"defaultThumbnailSize": {
173179
"type": [
174180
"array",
@@ -203,16 +209,22 @@
203209
"requestHeaders": {
204210
"type": [
205211
"object"
206-
],
207-
"noCLI": true,
208-
"noEnv": false
212+
]
209213
},
210214
"requestQueryParameters": {
211215
"type": [
212216
"object"
217+
]
218+
},
219+
"socialSharing": {
220+
"type": [
221+
"array"
213222
],
214-
"noCLI": true,
215-
"noEnv": true
223+
"items": {
224+
"type": [
225+
"string"
226+
]
227+
}
216228
},
217229
"preprocessSTAC": {
218230
"type": [
@@ -230,9 +242,7 @@
230242
{
231243
"$ref": "https://stac-extensions.github.io/authentication/v1.1.0/schema.json"
232244
}
233-
],
234-
"noCLI": true,
235-
"noEnv": true
245+
]
236246
}
237247
}
238248
}

docker/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ env -0 | cut -f1 -d= | tr '\0' '\n' | grep "^SB_" | {
7676
boolean)
7777
bool "$value"
7878
;;
79-
integer | number)
79+
integer | number | object)
8080
object "$value"
8181
;;
8282
array)

0 commit comments

Comments
 (0)