Skip to content

Commit 4ec69da

Browse files
committed
add live deployments generator, GeoJSON, map
1 parent 7d7fae5 commit 4ec69da

17 files changed

Lines changed: 611 additions & 1 deletion
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Update live deployments GeoJSON ⚙️
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- docs/community/live-deployments.geojson
9+
schedule:
10+
#- cron: '* * * * *' # runs minutely (for testing)
11+
- cron: '0 * * * *' # runs hourly at minute 0
12+
13+
jobs:
14+
build:
15+
name: Update live deployments GeoJSON
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- uses: actions/checkout@v6.0.2
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
- name: Generate live deployments GeoJSON 📦
23+
run: |
24+
python3 gen_live_deployments_geojson.py
25+
mv -f live-deployments.geojson docs/community
26+
- name: Commit and push update 📦
27+
run: |
28+
if [[ `git status --porcelain` ]]; then
29+
git config --global user.email "tomkralidis@gmail.com"
30+
git config --global user.name "Tom Kralidis"
31+
git commit -m 'update live deployments GeoJSON' docs/community/live-deployments.geojson
32+
git push
33+
else
34+
echo "No changes to push"
35+
fi

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ git commit -m 'update page' content/page.md
5757
git push origin master
5858
```
5959

60+
### Updating live deployments
61+
62+
```bash
63+
python3 gen_live_deployments_geojson.py
64+
mv live-deployments.geojson docs/community
65+
git commit -m 'update live deployments GeoJSON' docs/community/live-deployments.geojson
66+
git push origin master
67+
```
68+
6069
## Publishing updates to the live site
6170

6271
Website updates are automatically published via GitHub Actions.

docs/community/index.md

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,82 @@
22
title: Community
33
---
44

5+
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css"/>
6+
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
7+
<style>
8+
#map {
9+
width: 650px;
10+
height: 300px;
11+
}
12+
.leaflet-marker-icon {
13+
background: transparent !important;
14+
box-shadow: none;
15+
}
16+
</style>
17+
518
# Community
619

20+
## Live deployments map
21+
<div id="map"></div>
22+
23+
Want to add your deployment? Add it to the [Live deployment wiki page](https://github.com/geopython/pygeoapi/wiki/LiveDeployments) (map is updated hourly).
24+
25+
<script>
26+
const map = L.map('map', {
27+
attributionControl: false
28+
}).setView([20, 0], 1);
29+
30+
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
31+
attribution: '&copy; OpenStreetMap contributors'
32+
}).addTo(map);
33+
34+
const icon = L.icon({
35+
iconUrl: 'marker.png',
36+
iconSize: [25, 41],
37+
iconAnchor: [12, 41],
38+
shadowUrl: null
39+
});
40+
41+
fetch('https://raw.githubusercontent.com/geopython/pygeoapi.io/gh-pages/community/live-deployments.geojson')
42+
.then(r => r.json())
43+
.then(data => {
44+
const layer = L.geoJSON(data, {
45+
pointToLayer: (feature, latlng) => {
46+
return L.marker(latlng);
47+
},
48+
onEachFeature: (feature, layer) => {
49+
layer.bindPopup(
50+
feature.properties.url
51+
);
52+
}
53+
}).addTo(map);
54+
55+
map.fitBounds(layer.getBounds());
56+
});
57+
</script>
58+
59+
60+
<div class="pygeoapi-powered">
61+
<a href="https://www.ga.gov.au"><img alt="Geoscience Australia" src="/img/org-logos/aus-ga.png"/></a>
62+
<a href="https://ec.gc.ca"><img alt="Environment and Climate Change Canada" src="/img/org-logos/can-eccc.jpg"/></a>
63+
<a href="https://idee.es"><img alt="National Cartographic System of Spain" src="/img/org-logos/esp-idee.png"/></a>
64+
<a href="https://ign.es"><img alt="National Geographic Institute of Spain" src="/img/org-logos/esp-ign.png"/></a>
65+
<a href="https://www.bgs.ac.uk"><img alt="British Geological Survery" src="/img/org-logos/gbr-bgs.png" style="vertical-align: top";/></a>
66+
<a href="https://wmo.int/site/knowledge-hub/programmes-and-initiatives/global-atmosphere-watch-programme-gaw"><img alt="World Meteorological Organization, Global Atmospheric Watch" src="/img/org-logos/int-wmo-gaw.jpg" style="vertical-align: top;"/></a>
67+
<a href="https://wmo.int"><img alt="World Meteorological Organization" src="/img/org-logos/int-wmo.jpg" style="vertical-align: top;"/></a>
68+
<a href="https://www.dgterritorio.gov.pt"><img alt="Direção-Geral do Território (DGT)" src="/img/org-logos/prt-dgt.png" style="vertical-align: middle;"/></a>
69+
<a href="https://www.geoplatform.gov"><img alt="US Geoplatform.gov" src="/img/org-logos/usa-geoplatform.jpg" style="vertical-align: top;"/></a>
70+
<a href="https://internetofwater.org"><img alt="The Internet of Water Coalition" src="/img/org-logos/usa-iow.png" style="vertical-align: top;"/></a>
71+
<a href="https://usgs.gov"><img alt="United States Geological Survey" src="/img/org-logos/usa-usgs.jpg" style="vertical-align: top;"/></a>
72+
</div>
73+
774
## Code of Conduct
875

976
In support of an inclusive and welcoming community, the pygeoapi code of conduct can always be found at [https://github.com/geopython/pygeoapi/blob/master/CODE_OF_CONDUCT.md](https://github.com/geopython/pygeoapi/blob/master/CODE_OF_CONDUCT.md).
1077

1178
There are numerous ways to interact with the pygeoapi community.
1279

13-
## Mailing List
80+
## Mailing list
1481

1582
The pygeoapi mailing list enables users and developers to exchange ideas, discuss improvements / issues, and ask questions. To subscribe, visit [https://lists.osgeo.org/mailman/listinfo/pygeoapi](https://lists.osgeo.org/mailman/listinfo/pygeoapi).
1683

@@ -86,3 +153,33 @@ Users, developers and others are more than welcome! There are plenty of ways to
86153
- Core development (bug fixing, feature implementation, etc.)
87154

88155
See [https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md](https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md) for more information on contributing.
156+
157+
158+
<script src="//code.jquery.com/jquery-4.0.0.min.js"></script>
159+
<script type="text/javascript">
160+
function makeSimpleSlideshow(container) {
161+
container.addClass('slideshow').hide().slideDown('slow');
162+
$('a', container).each(function() {
163+
$(this).attr('title', $('img', this).attr('alt'));
164+
}).clone().appendTo(container);
165+
var links = $('a', container).wrapAll('<div class=items></div>');
166+
var items = $('div.items', container);
167+
var firstLink = $(links[0]);
168+
var lastLink = $(links[links.length / 2 - 1]);
169+
var pixels = lastLink.offset().left - firstLink.offset().left + lastLink.width();
170+
171+
function scroll() {
172+
items.animate({left: -pixels + 'px'}, pixels * 20, 'linear', function() {
173+
items.css('left', '0px');
174+
scroll();
175+
});
176+
}
177+
scroll();
178+
}
179+
180+
$(document).ready(function() {
181+
var powered = $('div.pygeoapi-powered');
182+
if (powered.length > 0)
183+
makeSimpleSlideshow(powered);
184+
});
185+
</script>

0 commit comments

Comments
 (0)