Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c87872380a | ||
|
|
6c1076abc8
|
No files matched your search
-47
@@ -1,47 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: v1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: download
|
|
||||||
image: plugins/download
|
|
||||||
settings:
|
|
||||||
source: https://ac.ngi.be/remoteclient-open/GeoBePartners-open/BOSA/ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.zip
|
|
||||||
destination: bestaddresses.zip
|
|
||||||
|
|
||||||
- name: convert
|
|
||||||
image: osgeo/gdal:alpine-normal-3.6.3
|
|
||||||
environment:
|
|
||||||
SELECT: SELECT shape AS geom, id, best_id, coalesce(streetname_fr, streetname_nl, streetname_de) AS streetname, postal_info_objectid, municipality_objectid, COALESCE(municipality_fr, municipality_nl, municipality_de) AS municipality, housenumber, boxnumber
|
|
||||||
commands:
|
|
||||||
- unzip -o bestaddresses.zip
|
|
||||||
- ogrinfo ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg -sql "CREATE INDEX idx_postal_code ON addresses_complete (postal_info_objectid) WHERE status NOT LIKE 'retired'"
|
|
||||||
- ogr2ogr -sql "select St_Centroid(St_Envelope(St_Collect(shape))) AS center, COALESCE(municipality_fr, municipality_nl, municipality_de) AS municipality_name, postal_info_objectid, municipality_objectid FROM addresses_complete where fid % 10 = 1 AND status NOT LIKE 'retired' GROUP BY COALESCE(municipality_fr, municipality_nl, municipality_de), postal_info_objectid, municipality_objectid" -lco GEOMETRY=AS_XY postals.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE status NOT LIKE 'retired' LIMIT 10000" -lco GEOMETRY=AS_XY addresses-extract.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-full.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '1%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-1xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '2%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-2xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '3%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-3xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '4%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-4xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '5%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-5xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '6%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-6xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '7%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-7xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '8%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-8xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- ogr2ogr -sql "$${SELECT} FROM addresses_complete WHERE postal_info_objectid LIKE '9%' AND status NOT LIKE 'retired'" -lco GEOMETRY=AS_XY addresses-9xxx.fr.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
|
||||||
- gzip -9 *.csv
|
|
||||||
|
|
||||||
- name: gitea_release
|
|
||||||
image: plugins/gitea-release
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: gitea_key
|
|
||||||
title: "v1.0.0"
|
|
||||||
files:
|
|
||||||
- "*.fr.csv.gz"
|
|
||||||
base_url: https://gitea.champs-libres.be
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
include:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
@@ -2,13 +2,14 @@ name: Convert BeST addresses
|
|||||||
run-name: Convert BeST addresses to csv (${{ gitea.ref_name }})
|
run-name: Convert BeST addresses to csv (${{ gitea.ref_name }})
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
schedule:
|
||||||
branches:
|
# every monday at 03:00 UTC
|
||||||
- '**'
|
- cron: '0 3 * * 1'
|
||||||
tags:
|
|
||||||
- '**'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GPKG: ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
GPKG: ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
|
||||||
SOURCE_URL: https://ac.ngi.be/remoteclient-open/GeoBePartners-open/BOSA/ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.zip
|
SOURCE_URL: https://ac.ngi.be/remoteclient-open/GeoBePartners-open/BOSA/ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.zip
|
||||||
@@ -43,27 +44,12 @@ jobs:
|
|||||||
gzip -9 *.csv
|
gzip -9 *.csv
|
||||||
ls -lh *.fr.csv.gz
|
ls -lh *.fr.csv.gz
|
||||||
|
|
||||||
- name: upload to generic package registry
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
PACKAGE_URL: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/addresses/v1.1.1
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
for f in *.fr.csv.gz; do
|
|
||||||
# gitea refuses to overwrite an existing file (409): delete it first, ignore 404
|
|
||||||
status=$(curl --silent --output /dev/null --write-out '%{http_code}' -X DELETE -H "Authorization: token $TOKEN" "$PACKAGE_URL/$f")
|
|
||||||
echo "DELETE $f: $status"
|
|
||||||
curl --fail-with-body --silent --show-error -H "Authorization: token $TOKEN" --upload-file "$f" "$PACKAGE_URL/$f"
|
|
||||||
echo "PUT $f: ok"
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: gitea release
|
- name: gitea release
|
||||||
if: gitea.ref_type == 'tag'
|
|
||||||
uses: https://github.com/akkuman/gitea-release-action@v1
|
uses: https://github.com/akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
server_url: https://gitea.champs-libres.be
|
server_url: https://gitea.champs-libres.be
|
||||||
token: ${{ secrets.GITEA_TOKEN }}
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
name: ${{ gitea.ref_name }}
|
name: v1.1.1
|
||||||
tag_name: ${{ gitea.ref_name }}
|
tag_name: v1.1.1
|
||||||
files: |-
|
files: |-
|
||||||
*.fr.csv.gz
|
*.fr.csv.gz
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Ce dépôt convertit les données d'adresses mises à disposition dans le cadre de [Best Address](https://www.geo.be/catalog/details/ca0fd5c0-8146-11e9-9012-482ae30f98d9?l=fr) en un format csv, utilisable par le logiciel Chill.
|
Ce dépôt convertit les données d'adresses mises à disposition dans le cadre de [Best Address](https://www.geo.be/catalog/details/ca0fd5c0-8146-11e9-9012-482ae30f98d9?l=fr) en un format csv, utilisable par le logiciel Chill.
|
||||||
|
|
||||||
Ce dépôt compile mensuellement les adresses.
|
Ce dépôt compile chaque semaine les adresses (le lundi), et remplace les fichiers de la release [v1.1.1](https://gitea.champs-libres.be/Chill-project/belgian-bestaddresses-transform/releases/tag/v1.1.1).
|
||||||
|
|
||||||
## Liste des codes postaux
|
## Liste des codes postaux
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user