initial commit
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
Julien Fastré 2022-08-03 23:22:51 +02:00
commit 9824082af3
2 changed files with 44 additions and 0 deletions

40
.drone.yml Normal file
View File

@ -0,0 +1,40 @@
---
kind: pipeline
type: docker
name: v1
steps:
- name: download-and-unzip
image: curlimages/curl:latest
commands:
- curl --silent --show-error -o ./bestaddresses.zip https://ac.ngi.be/remoteclient-open/GeoBePartners-open/BOSA/ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.zip
- unzip bestaddresses.zip
- name: convert
image: osgeo/gdal:alpine-small-latest
commands:
- ogr2ogr -sql "SELECT DISTINCT COALESCE(municipality_fr, municipality_nl, municipality_de) AS municipality_name, postal_info_objectid, municipality_objectid FROM addresses_complete" postals.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete" addresses.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '1%'" addresses-1xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '2%'" addresses-2xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '3%'" addresses-3xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '4%'" addresses-4xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '5%'" addresses-5xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '6%'" addresses-6xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '7%'" addresses-7xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '8%'" addresses-8xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '9%'" addresses-9xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '1%'" addresses-1xxx.csv ca0fd5c0-8146-11e9-9012-482ae30f98d9_geopackage+sqlite3_3812.gpkg
- ogr2ogr -sql "SELECT * FROM addresses_complete WHERE postal_info_objectid LIKE '1%'" addresses-1xxx.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:
- "*.csv.gz"
base_url: https://gitea.champs-libres.be

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# Convertisseur best addresses
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.