Skip to content

Commit

Permalink
nieuwe URL BRK download
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Oct 30, 2017
1 parent 8032039 commit 235d299
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions brk/etl/download-brk.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
#!/bin/bash
#
# Download BRK GML van PDOK.
#
# Auteurs: Just van den Broecke, Frank Steggink
#
# Aanroep: ./download-brk.sh [doel_directory]
# doel_directory is optioneel, anders wordt 'leveringen/latest' gebruikt in huidige dir
# (tbv automatische BRK verwerking op data.nlextract.nl
#

# ID's van 32x32 km gebieden om de BRK te downloaden. Let op, de ID's mogen geen voorloopnullen bevatten.
blocks="39 44 45 47 48 50 51 54 55 56 57 58 59 60 61 62 63 74 75 96 97 98 99 104 105 106 107 110 111 144 145 147 148 149 150 151 153 155 156 157 158 159 180 181 183 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 224 225 226 227 228 229 230"
#blocks="39 45 48 50 51 54 55 56 57 58 59 60 61 62 63 74 75 96 97 98 99 104 105 106 107 110 111 145 148 149 150 151 156 157 158 159 180 181 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 224 225 228 229 230"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

[ -z "$1" ] && pushd leveringen/latest || pushd $1
for block in ${blocks}
do
echo "Downloading BRK-blok ${block} ..."
block_url="https://www.pdok.nl/download/service/extract.zip?extractname=kadastralekaartv3&extractset=gml&excludedtypes=undefined&history=false&tiles=%7B%22layers%22%3A%5B%7B%22aggregateLevel%22%3A4%2C%22codes%22%3A%5B${block}%5D%7D%5D%7D"
# [ -z "$1" ] && pushd leveringen/latest || pushd $1
#for block in ${blocks}
#do
# echo "Downloading BRK-blok ${block} ..."
# block_url="https://www.pdok.nl/download/service/extract.zip?extractname=kadastralekaartv3&extractset=gml&excludedtypes=undefined&history=false&tiles=%7B%22layers%22%3A%5B%7B%22aggregateLevel%22%3A4%2C%22codes%22%3A%5B${block}%5D%7D%5D%7D"

${DIR}/robust-download.sh ${block_url} brk_${block}.zip
done
# ${DIR}/robust-download.sh ${block_url} brk_${block}.zip
#done

${DIR}/robust-download.sh https://www.pdok.nl/download/service/cache/kadastralekaartv3-gml-nl-nohist.zip kadastralekaartv3-gml-nl-nohist.zip

# popd

popd

2 comments on commit 235d299

@fsteggink
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je zou nu ook https://www.pdok.nl/download/service/cache/kadastralekaartv3-gml-nl-nohist.zip kunnen proberen. Voor de BGT heb ik een vergelijkbare gecacht zip-bestand gebruikt.

@justb4
Copy link
Contributor Author

@justb4 justb4 commented on 235d299 Nov 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja die wordt ook gebruikt op data.nlextract.nl, begreep eerst niet goed waar cached-download over ging...

Please sign in to comment.