|
|
|
# Create a 3dCityDB on the server:
|
|
|
|
- ssh into server from HFT network: `ssh user@111.222.333.444` (fake IP address)
|
|
|
|
- switch to postgres user to create a new database (if required): `sudo su postgres`
|
|
|
|
- run `psql`
|
|
|
|
- create the database via SQL query: `create database "my_testdb";`;
|
|
|
|
- create postgis and postgis_raster extensions to work with 3dcitydb: `create extension postgis;` and `create postgis_raster;`
|
|
|
|
- change standard user from postgres to what you need, e.g. demouser: `ALTER DATABASE my_testdb OWNER TO demouser;`
|
|
|
|
- exit psql: `\q` and return to your user account `exit`
|
|
|
|
|
|
|
|
# Run 3dcityDB scripts to create the `citydb` schema (example using Unix):
|
|
|
|
- Download or clone the git repository: e.g. ` git clone -b release-v4.1 --single-branch https://github.com/3dcitydb/3dcitydb.git` where `release-v4.1` is the single branch that is cloned from the repo.
|
|
|
|
- navigate to `/your cloned dir/postgresql/ShellScripts/Unix` or use `Windows` instead of `Unix` if you use Windows.
|
|
|
|
- open CONNECTION_SETTIGS.sh: `nano CONNECTION_SETTIGS.sh` and adapt parameters:
|
|
|
|
|
|
|
|
![image](/uploads/6139d8929a2dc17795c7cb9a10038c93/image.png)
|
|
|
|
|
|
|
|
- make the `CREATE_DB.sh` executabel: `chmod u+x CREATE_DB.sh`
|
|
|
|
- run the script: `./CREATE_DB.sh` and follow the prompts:
|
|
|
|
|
|
|
|
![image](/uploads/66c64cb1c7663a7b732003c54f741956/image.png)
|
|
|
|
|
|
|
|
- adapt the values here with your coordinate reference system (CRS) names and values.
|
|
|
|
- script will do its job and you should receive a message that the 3dcitydb schema was successfully created.
|
|
|
|
|
|
|
|
# connect to DB with 3D importer / exporter:
|
|
|
|
- download the software from https://www.3dcitydb.org/3dcitydb/ and install it on any client pc
|
|
|
|
- start software and go to `database` tab and fill in the required fields and click on the `connect` button:
|
|
|
|
|
|
|
|
![image](/uploads/c07ed9f03b544ea161e3a95b133bf1c4/image.png)
|
|
|
|
|
|
|
|
- you should be greeted with the following message from the server:
|
|
|
|
|
|
|
|
![image](/uploads/0dd68555d540d72f3d8c5877dd25db09/image.png)
|
|
|
|
|
|
|
|
# upload citygml file to DB:
|
|
|
|
- go to `import` tab and select a file to import into the database.
|
|
|
|
- you can specify some filter operation if you want to exclude certain objects
|
|
|
|
- then click `import` and wait for import to finish
|
|
|
|
|
|
|
|
![image](/uploads/a0e4fb2e0e2e27df326bc34dac17e236/image.png)
|
|
|
|
|
|
|
|
- view the log-window for a success message:
|
|
|
|
|
|
|
|
![image](/uploads/e2e95e7b82e7fcfce4a8e2ce508cce49/image.png)
|
|
|
|
|
|
|
|
- you can go back yo `database` tab and click on `Generate database report`. This should give you a list of objects within the database.
|
|
|
|
- `disconnect` from the database. |
|
|
|
\ No newline at end of file |