ObjectVision / GeoDMS

Source code for the GeoDMS software
https://www.geodms.nl/
Other
7 stars 1 forks source link

Gridlayer with domain not in geometries: projection is recognized, but no background layer shown #667

Open mtbeek32 opened 6 months ago

mtbeek32 commented 6 months ago

A background layer is configured for WebMercator coordinates, this works fine for vector data.

For grid data, the projection is recognized (could also be combined with vector data), but no background layer is visible

image

steps to reproduce:

repository: geoDMS project: tst/wmts/cfg/wm.dms request item: /SourceData/read/GridData in map view.

eoudejans commented 6 months ago

The current behavior is that the background layer is searched in context of the unit describing the coordinates.

parameter<geometries/WebMercator> test_point := point_xy(665307.894194, 6927029.251316, geometries/WebMercator);

That being said, the DialogData property of Geometries/WebMercator describing the background layer is given as: DialogData = "tms_layer_osm_webmercator". This treeitem can be found in context of geometries. However it cannot be found in context of SourceData/read.

Changing the definition of geometries/webmercator to at least makes the background layer findable:

unit<dpoint> WebMercator : SpatialReference = "EPSG:3857",   DialogData = "Geometries/tms_layer_osm_webmercator";

Resulting in a proper background layer: image

eoudejans commented 6 months ago

See line 150 of GraphDataView.cpp and function GetNextDialogDataRef itself:

const TreeItem* topographicItem = GetNextDialogDataRef(geoCrdUnitContext, i, e);

Possible improvements:

@MaartenHilferink any ideas?