README.md 2.44 KB
Newer Older
Athanasios's avatar
Athanasios committed
1
# Node 3D Portrayal Service extended 
Athanasios's avatar
Athanasios committed
2

athanasios's avatar
athanasios committed
3
![](figures/home.jpg)  
Athanasios's avatar
Athanasios committed
4
This is a 3D Portrayal Service implementation that is compatible with [3D Tiles](https://github.com/CesiumGS/3d-tiles) and [i3s](https://github.com/Esri/i3s-spec) specifications. In case of i3s it performs an active node selection.
Athanasios's avatar
Athanasios committed
5
6
7
8


## Installing

Athanasios's avatar
Athanasios committed
9
The service is implemented using [Node js](https://nodejs.org/en/). Make sure you have Node js (version 10 and above) already installed. Clone or download the repository. Install the dependencies with the `npm install` command. For the moment there is no bundler. Place the contents of the repository on your server with Node.js installed and run the "start" script with npm.
Athanasios's avatar
Athanasios committed
10
11
12
13
14
15
16

`npm run start`

If your server has a process manager installed, then configure accordingly.

## Usage

Athanasios's avatar
Athanasios committed
17
You can change the port in `config.js`, default port is 9000.
Athanasios's avatar
Athanasios committed
18
You access the service with the `/service/v1` endpoint and then provide additional query parameters:
Athanasios's avatar
Athanasios committed
19

Athanasios's avatar
Athanasios committed
20
* getScene: `{host}:{port}/service/v1?`
Athanasios's avatar
Athanasios committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
* getScene query parameters:

`service=3DPS`

`&acceptversions=1.0`

`&request=getScene`

`&boundingbox=lon_1,lat_1,lon_2,lat_2`

`&cullingvolume=vec3_plane1_normal,plane1_distance` (x6)

`&camera=vec3_position,vec3_direction`

`&frustum=near_offset,top_offset,right_offset`

`&drawingbuffer=buffer_width,buffer_height`

`&time=time_of_request`

\* when vec3 is prefixed in a query parameter it should be replaced by three comma separated actual values, e.g. x,y,z

Athanasios's avatar
Athanasios committed
43
44
45
46
When the query parameters are not valid an xml exception is returned.

## Examples

Athanasios's avatar
Athanasios committed
47
* [getScene](http://81.169.187.7:9001/service/v1?service=3DPS&acceptversions=1.0&request=GetScene&layers=New_York_LoD2_3D_Buildings&boundingbox=-74.0189883681,40.7007424914,-73.9727649425,40.7318181023&cullingvolume=0.9739208992844022,0.22183197873838273,0.04763040148975446,-466686.908510136,-0.974414929031256,-0.21913033649100758,-0.04997441055529999,489653.71773500636,-0.2010488324103693,0.7002772846908004,0.6849752488466331,694036.5778396796,0.2003687953021454,-0.6979086335828746,-0.6875870017966105,-671263.22796277,-0.2094656714218098,0.7295941481510193,-0.6510119134697911,6378671.608204631,0.2094656714218098,-0.7295941481510193,0.6510119134697911,493621327.3917954&camera=1338074.3495312775,-4660674.031130781,4144304.2912002187,-0.2094656714218098,0.7295941481510193,-0.6510119134697911&frustum=1,0.5622205451542581,0.5773502691896256&drawingbuffer=954,929&time=1586730641723)
Athanasios's avatar
Athanasios committed
48
49
50
51

## Demo

[http://81.169.187.7:9001](http://81.169.187.7:9001)