Giter VIP home page Giter VIP logo

Comments (12)

kaktus40 avatar kaktus40 commented on July 25, 2024

Hello

from what I see, it seems you don't use a good configuration of the bil/dds plugin. Did you try different configurations? What is your process to generate your tiff files?

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

I am not using the bil/dds plugin. I just loaded 90m terrain files from http://srtm.csi.cgiar.org/download into an ImageMosaic in GeoServer then I simply configured my layer to use the mySLD.xml style from this project's github.

What is the best way? Is it the bil/dds plugin or maybe the GeotiffTranslate script?

var terrainProvider = new Cesium.GeoserverTerrainProvider({
	service : "WMTS",
	url : "http://localhost:8080/geoserver/gwc/service/wmts",
    layerName: "cite:srtm90",
    styleName: "mySLD",
    waterMask: true
});

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on July 25, 2024

You should check the README.md. There is a comparison for each type and some hints for processing your data.

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

Ok I got it to work for WMS in GeoServer 2.17 and Cesium 1.70.1 by doing the following:

Thank you!

What is the way to get the best performance? Use service:"WMS" providing a gwc wms endpoint?

var terrainProvider = new Cesium.GeoserverTerrainProvider({
	service: "WMS",
	url : "http://localhost:8080/geoserver/cite/wms",
	layerName: "srtm90",
	heightMapWidth: 64,
	heightMapHeight: 64,
	offset: 0,
	highest: 12000,
	lowest: -500,
	styleName: "mySLD",
	hasStyledImage: true,
	waterMask: true,
	maxLevel: 11,
	formatImage: {format : "image/png",extension: "png"},
	formatArray: {
		format : "image/bil",
		postProcessArray : function(bufferIn, size,highest,lowest,offset) {
			var resultat;
			var viewerIn = new DataView(bufferIn);
			var littleEndianBuffer = new ArrayBuffer(size.height * size.width * 2);
			var viewerOut = new DataView(littleEndianBuffer);
			if (littleEndianBuffer.byteLength === bufferIn.byteLength) {
				// time to switch bytes!!
				var temp, goodCell = 0, somme = 0;
				for (var i = 0; i < littleEndianBuffer.byteLength; i += 2) {
					temp = viewerIn.getInt16(i, false)-offset;
					if (temp > lowest && temp < highest) {
						viewerOut.setInt16(i, temp, true);
						somme += temp;
						goodCell++;
					} else {
						var val = (goodCell == 0 ? 1 : somme / goodCell);
						viewerOut.setInt16(i, val, true);
					}
				}
				resultat = new Int16Array(littleEndianBuffer);
			}
			return resultat;
		}
	}
});

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on July 25, 2024

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

Does GeoServer/GeoWebCache WMTS support .bil?
Whenever I try to use WMTS I get either blocky or spiky terrain using GeoserverTerrainProvider.js as it's just using .png or .jpeg and doesn't seem to go through the more accurate .bil pipeline.

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on July 25, 2024

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

I ran the GeotiffTranslate on the srtm4.1 dataset (90m). It looks decent but the .bil solution seems to have more accurate terrain especially when viewing near street level. By this I mean, visually the .bil solution looks better. Has this been your experience?

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on July 25, 2024

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

Do you believe the best solution could be this?

gdalbuildvrt mosaic.vrt c:\srtm90\*.tif

gdal_retile -ps 2048 2048 -overlap 0 -levels 6 -s_srs EPSG:4326 -r cubicspline -ot Int16 -co TILED=YES -co COMPRESS=DEFLATE -targetDir srtm90pyramid mosaic.vrt

The deploy srtm90pyramid as an ImagePyramid in GeoServer and use image/bil method?

from cesium-geoserverterrainprovider.

kaktus40 avatar kaktus40 commented on July 25, 2024

from cesium-geoserverterrainprovider.

mortac8 avatar mortac8 commented on July 25, 2024

I'm good with closing this Issue. Thanks for your advice!

from cesium-geoserverterrainprovider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.