Skip to content

Commit 68ef691

Browse files
authored
#8488 3D Measurement tools (#8489)
* #8488 3D Measurement tools * fixes from review
1 parent c380f49 commit 68ef691

59 files changed

Lines changed: 5156 additions & 2439 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/developer-guide/local-config.md

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -216,49 +216,6 @@ CSW service
216216

217217
<br>
218218

219-
### Measure Tool configuration
220-
221-
Inside defaultState you can set lengthFormula, showLabel, uom:
222-
223-
- you can customize the formula used for length calculation from "haversine" or "vincenty" (default haversine)
224-
- show or not the measurement label on the map after drawing a measurement (default true)
225-
- set the default uom used for measure tool (default m and sqm)
226-
<br>For the label you can choose whatever value you want.
227-
<br>For the unit you can choose between:
228-
- unit length values : ft, m, km, mi, nm standing for feets, meters, kilometers, miles, nautical miles
229-
- unit area values : sqft, sqm, sqkm, sqmi, sqnm standing for square feets, square meters, square kilometers, square miles, square nautical miles
230-
- Customize the style for the start/endPoint for the measure features. You can set *startEndPoint* to:
231-
- false if you want to disable it
232-
- true (defaults will be used)
233-
- object for customizing styles by placing *startPointOptions* and/or *endPointOptions*<br>
234-
- You can either change the radius or set the fillColor or decide to apply this customization to the first and second-last point for polygons<br>
235-
For lineString endPointOptions refers to the last point of the polyline
236-
237-
Example:<br>
238-
239-
```javascript
240-
"measurement": {
241-
"lengthFormula": "vincenty",
242-
"showLabel": true,
243-
"uom": {
244-
"length": {"unit": "m", "label": "m"},
245-
"area": {"unit": "sqm", "label": ""}
246-
},
247-
"startEndPoint": {
248-
"startPointOptions": {
249-
"radius": 3,
250-
"fillColor": "green",
251-
"applyToPolygon": false
252-
},
253-
"endPointOptions": {
254-
"radius": 3,
255-
"fillColor": "red",
256-
"applyToPolygon": false
257-
}
258-
}
259-
}
260-
```
261-
262219
#### Annotations Editor configuration
263220

264221
Annotations editor can be configured by setting it's defaultState. It looks like this:

docs/developer-guide/maps-configuration.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,18 +1154,15 @@ In order to create a `wms` based mesh there are some requirements that need to b
11541154
- A WMS layer configured with **BIL 16 bit** output in **big endian mode** and **-9999 nodata value**
11551155
- BILTerrainProvider is used to parse `wms` based mesh. Supports three ways in parsing the metadata of the layer
11561156
1. Layer configuration with **sufficient metadata** of the layer. This prevents a call to `getCapabilities` eventually improving performance of the parsing of the layer.
1157-
Mandatory fields are `url`, `name`, `version`, `crs`.
1157+
Mandatory fields are `url`, `name`, `crs`.
11581158
```json
11591159
{
11601160
"type": "terrain",
11611161
"provider": "wms",
11621162
"url": "http://hot-sample/geoserver/wms",
11631163
"name": "workspace:layername",
1164-
"littleendian": false,
1164+
"littleEndian": false,
11651165
"visibility": true,
1166-
"version": "1.3.0",
1167-
"fixedHeight": null, // Map height. Max value is < 65
1168-
"fixedWidth": null, // Map width. Max value is < 65
11691166
"crs": "CRS:84" // Supports only CRS:84 | EPSG:4326 | EPSG:3857 | OSGEO:41001
11701167
}
11711168
```
@@ -1176,7 +1173,7 @@ In order to create a `wms` based mesh there are some requirements that need to b
11761173
"provider": "wms",
11771174
"url": "https://host-sample/geoserver/wms", // 'geoserver' url
11781175
"name": "workspace:layername", // name of the geoserver resource with workspace prefixed
1179-
"littleendian": false
1176+
"littleEndian": false
11801177
}
11811178
```
11821179
3. Layer configuration of geoserver layer with layer name _not prefixed with workspace_ then `getCapabilities` is requested in global scope.
@@ -1186,21 +1183,33 @@ In order to create a `wms` based mesh there are some requirements that need to b
11861183
"provider": "wms",
11871184
"url": "https://host-sample/geoserver/wms",
11881185
"name": "layername",
1189-
"littleendian": false
1186+
"littleEndian": false
11901187
}
11911188
```
11921189
!!! note
11931190
With `wms` as provider, the format option is not needed, as Mapstore supports only `image/bil` format and is used by default
11941191
1195-
Generic layer configuration of type `terrain` and provide `wms` is as follows.
1196-
The layer configuration needs to point to the geoserver resource and define the type of layer and the type of provider:
1192+
Generic layer configuration of type `terrain` and provide `wms` as follows.
1193+
The layer configuration needs to point to the geoserver resource and define the type of layer and the type of provider, here all available properties:
11971194
```json
11981195
{
11991196
"type": "terrain",
12001197
"provider": "wms",
12011198
"url": "https://host-sample/geoserver/wms",
12021199
"name": "workspace:layername", // name of the geoserver resource
1203-
"littleendian": false
1200+
"littleEndian": false, // defines whether buffer is in little or big endian
1201+
"visibility": true,
1202+
// optional properties
1203+
"crs": "CRS:84", // projection of the layer, support only CRS:84 | EPSG:4326 | EPSG:3857 | OSGEO:41001
1204+
"version": "1.3.0", // version used for the WMS request
1205+
"heightMapWidth": 65, // width of a tile in pixels, default value 65
1206+
"heightMapHeight": 65, // height of a tile in pixels, default value 65
1207+
"waterMask": false,
1208+
"offset": 0, // offset of the tiles (in meters)
1209+
"highest": 12000, // highest altitude in the tiles (in meters)
1210+
"lowest": -500, // lowest altitude in the tiles
1211+
"sampleTerrainZoomLevel": 18 // zoom level used to perform sampleTerrain and get the height value given a point, used by measure components
1212+
12041213
}
12051214
```
12061215
@@ -1229,9 +1238,9 @@ In order to use these layers they need to be added to the `additionalLayers` in
12291238
"provider": "wms",
12301239
"url": "https://host-sample/geoserver/wms",
12311240
"name": "workspace:layername", // name of the geoserver resource
1232-
"format": "application/bil16",
1233-
"littleendian": false,
1234-
"visibility": true
1241+
"littleEndian": false,
1242+
"visibility": true,
1243+
"crs": "CRS:84"
12351244
}]
12361245
}
12371246
}

0 commit comments

Comments
 (0)