Replies: 4 comments 5 replies
-
It seems to be normal to see spaces between different tiles in certain situations (look at 3D mesh gap video). |
Beta Was this translation helpful? Give feedback.
-
@Sgambe33, I can assume that you are using WMS with tiles mode. That's why Geoserver only applies your style within one tile and it doesn't know anything about the height of the adjacent tile. Try using singleTile mode. |
Beta Was this translation helpful? Give feedback.
-
Ok, I fixed the elevation problem but the map is still buggy. There are repeated tiles in wrong positions: |
Beta Was this translation helpful? Give feedback.
-
@vladimir-rybalko Here: <body>
<div id="viewerDiv" class="viewer"></div>
<script>
var extent = new itowns.Extent('EPSG:3857', 1119229.1867, 1133637.5665, 5474878.5880,5489822.0270);
var viewerDiv = document.getElementById('viewerDiv');
// Instanciate PlanarView
// By default itowns' tiles geometry have a "skirt" (ie they have a height),
// but in case of orthographic we don't need this feature, so disable it
var view = new itowns.PlanarView(viewerDiv, extent, {
disableSkirt: false, maxSubdivisionLevel: 18,
placement: new itowns.Extent('EPSG:3857', 1119229.1867, 1133637.5665, 5474878.5880,5489822.0270),
controls: {
// Faster zoom in/out speed
zoomFactor: 3,
// prevent from zooming in too much
maxResolution: 0.005 // a pixel shall not represent a metric size smaller than 5 mm
},
});
// Add a TMS imagery source
var opensmSource = new itowns.TMSSource({
isInverted: false,
// eslint-disable-next-line no-template-curly-in-string
url: 'https://tile.openstreetmap.de/${z}/${x}/${y}.png',
networkOptions: {crossOrigin: 'anonymous'},
extent,
crs: 'EPSG:3857',
attribution: {
name: 'OpenStreetMap',
url: 'http://www.openstreetmap.org/',
},
});
// Add a TMS imagery layer
var opensmLayer = new itowns.ColorLayer('OPENSM', {
updateStrategy: {
type: itowns.STRATEGY_DICHOTOMY,
},
source: opensmSource,
});
view.addLayer(opensmLayer);
// Request redraw
const wmsSource = new itowns.WMSSource({
url: 'http://localhost:8080/geoserver/ows?',
version: '1.3.0',
name: 'italia:dsm_4326',
crs: 'EPSG:3857',
transparent: true,
width: 256,
format: 'image/png',
extent: extent,
vendorSpecific: {
'tiled': false
}
});
const elevation_layer = new itowns.ElevationLayer('elevation', {
source: wmsSource,
useColorTextureElevation: true,
colorTextureElevationMinZ: 203,
colorTextureElevationMaxZ: 1187,
});
view.addLayer(elevation_layer);
view.notifyChange();
</script>
</body> |
Beta Was this translation helpful? Give feedback.
-
Hello, I was wondering if it is possible to use a GeoTiff as an elevation source. Obviously not directly but with maybe a GIS server. I tried using Geoserver with WMS service but the results were not good:
As you can see there are a lot of empty spaces and inconsistencies between the different tiles. Is there anything else I can try?
Beta Was this translation helpful? Give feedback.
All reactions