3

I want to display terrain in OpenLayers.

So, I tried to use dem(.img) and convert it to dem(.jpg) on QGIS.

But, the effect is very bad.

My expected effect is (This picture is captured from google earth)

enter image description here

Which method is better for display terrain in OpenLayers?

This is my website for test:http://www.cv.nctu.edu.tw/shapefile-js-openlayers/ol_simple.html

closed as primarily opinion-based by PolyGeo Apr 29 '18 at 1:16

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Could you provide a bit more information on the input and output resolutions, sources, etc. Without knowing what you started with and expect, saying the effect is very bad doesn't mean very much. – John Powell Feb 8 '15 at 21:15
1

If you don't want/have a server side map rendering engine, I'd convert the image to a tileset with a convenient palette.

For example you can use gdal2tiles.py script but it needs as a source an image with the palette applied so your source wouldn't be a DEM but a regular RGB image (height values have to be mapped to colors). This step can be done with gdaldem tool.

Not sure, but maybe you can do all those steps also in QGIS.

1

I'd recommend looking in TileMill to create an mbtiles file, which you can then unpack into a standard tileset. You can style imagery very nicely in TileMill, and then export with your chosen number of zoom levels.

You could pull imagery into TillMill also, and get the google earth look by putting a semi-transparent hillshade on top of it. Basically, you can add vectors and rasters to TileMill, and do complex, zoomlevel specific styling to them, and get a tileset as the output.

Not the answer you're looking for? Browse other questions tagged or ask your own question.