-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from 3DGI/json-fg-0.2.2
Json fg 0.2.2
- Loading branch information
Showing
8 changed files
with
135 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.run | ||
.tox | ||
*.egg-info | ||
tests/data/tmp/*.json | ||
tests/data/tmp/*.json | ||
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
====== | ||
README | ||
====== | ||
|
||
3D BAG data converted from CityJSON to JSON-FG with cityjson2jsonfg. | ||
|
||
CityJSON (v1.1): https://cityjson.org | ||
JSON-FG (v0.2.2): https://github.com/opengeospatial/ogc-feat-geo-json | ||
|
||
Date: 2024-03-08 | ||
|
||
cityjson2jsonfg | ||
--------------- | ||
|
||
A command line tool for converting CityJSON files to JSON-FG format. | ||
|
||
https://github.com/3DGI/cityjson2jsonfg | ||
|
||
Author | ||
------ | ||
|
||
The conversion was done by 3DGI (https://3dgi.nl) with the funding from Geonovum (https://www.geonovum.nl/) | ||
|
||
Contents | ||
======== | ||
|
||
jsonfg/: JSON-FG files | ||
source/: CityJSON files | ||
|
||
3D BAG (in 3dbag/source/) | ||
------------------------- | ||
|
||
The 3D BAG is an up-to-date data set containing 3D building models of the Netherlands. The 3D BAG is open data. It contains 3D models at multiple levels of detail, which are generated by combining two open data sets: the building data from the BAG and the height data from the AHN. | ||
|
||
https://3dbag.nl | ||
|
||
Download: https://3dbag.nl/en/download | ||
|
||
License: The 3D BAG by 3D geoinformation research group is licensed under CC BY 4.0, https://docs.3dbag.nl/en/copyright | ||
|
||
3D BAG (in 3dbag/jsonfg/) | ||
------------------------ | ||
|
||
3D BAG data converted from CityJSON to JSON-FG format. | ||
|
||
License: The converted 3D BAG data in JSON-FG format by 3DGI is licensed under CC BY 4.0, https://creativecommons.org/licenses/by/4.0/ | ||
|
||
3D Basisvoorziening (in 3dbasisvoorziening/source/) | ||
--------------------------------------------------- | ||
|
||
The 3D Basisvoorziening is a digital topograpic data set of 3D objects of the Netherlands. It is generated from the Dutch Large Scale Topographic Map (BGT), aerial images and the Dutch National Height Model (AHN). | ||
|
||
https://www.pdok.nl/3D%20Basisvoorziening | ||
|
||
Download: https://3d.kadaster.nl/basisvoorziening-3d/ | ||
|
||
Metadata: https://www.nationaalgeoregister.nl/geonetwork/srv/dut/catalog.search?node=geonetwork#/metadata/2fdeecd0-3d28-43f9-894e-e8444fdffeb3?tab=general | ||
|
||
License: The 3D Basisvoorziening is licensed by the Dutch Kadaster under CC BY 4.0, https://creativecommons.org/licenses/by/4.0/deed.nl | ||
|
||
|
||
3D Basisvoorziening (in 3dbasisvoorziening/jsonfg/) | ||
--------------------------------------------------- | ||
|
||
3D Basisvoorziening data converted from CityJSON to JSON-FG format. | ||
|
||
License: The converted 3D Basisvoorziening data in JSON-FG format is licensed by 3DGI under CC BY 4.0, https://creativecommons.org/licenses/by/4.0/deed.nl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
datadir := "data" | ||
|
||
prepare: | ||
mkdir -p {{datadir}}"/3dbag/source" | ||
mkdir -p {{datadir}}"/3dbag/jsonfg" | ||
mkdir -p {{datadir}}"/3dbasisvoorziening/source" | ||
mkdir -p {{datadir}}"/3dbasisvoorziening/jsonfg" | ||
|
||
# Download data from the 3DBAG | ||
download-3dbag: prepare | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
version="v20231008" | ||
tiles=("10-260-584" "10-262-584" "10-262-586" "10-260-586") | ||
download_url="https://data.3dbag.nl/"$version"/tiles" | ||
for tile_id in "${tiles[@]}" ; | ||
do | ||
tile_path=${tile_id//[-]//} | ||
tile_filename=$tile_id".city.json.gz" | ||
wget $download_url"/"$tile_path"/"$tile_filename -O {{datadir}}"/3dbag/source/"$tile_filename | ||
gunzip {{datadir}}"/3dbag/source/"$tile_filename | ||
done | ||
wget "https://data.3dbag.nl/"$version"/metadata.json" -O {{datadir}}"/3dbag/source/metadata.json" | ||
# Download data from the 3D Basivoorziening | ||
download-3dbasisvoorziening: prepare | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
version="2020" | ||
tiles=( "30gz1" ) | ||
download_url="https://download.pdok.nl/kadaster/basisvoorziening-3d/v1_0//"$version"/volledig" | ||
for tile_id in "${tiles[@]}" ; | ||
do | ||
tile_filename=$tile_id"_"$version"_volledig.zip" | ||
wget $download_url"/"$tile_filename -O {{datadir}}"/3dbasisvoorziening/source/"$tile_filename | ||
unzip {{datadir}}"/3dbasisvoorziening/source/"$tile_filename -d {{datadir}}"/3dbasisvoorziening/source" | ||
rm {{datadir}}"/3dbasisvoorziening/source/"$tile_filename | ||
done | ||
# Download sample data from the 3DBAG and 3D Basisvoorziening | ||
download: download-3dbag download-3dbasisvoorziening | ||
|
||
# Convert the downloaded CityJSON files to JSON-FG | ||
convert-3dbag: | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
parallel "cityjson2jsonfg {} {{datadir}}/3dbag/jsonfg/{/.}.fg.json" ::: {{datadir}}/3dbag/source/*.city.json | ||
convert-3dbasisvoorziening: | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
parallel --jobs 1 "cjio --suppress_msg {} upgrade save stdout | cityjson2jsonfg - {{datadir}}/3dbasisvoorziening/jsonfg/{/.}.fg.json" ::: {{datadir}}/3dbasisvoorziening/source/*.json | ||
convert: convert-3dbag convert-3dbasisvoorziening | ||
|
||
upload: | ||
rsync {{datadir}}/* 3dgi-server:/var/www/3dgi-data/jsonfg/ | ||
rsync README_DATA.txt 3dgi-server:/var/www/3dgi-data/jsonfg/README.txt | ||
|
||
# Remove all downloaded and converted files | ||
clean: | ||
rm -rf {{datadir}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters