Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate the ArgGisImageServerTerrainProvider? #4955

Closed
hpinkos opened this issue Feb 6, 2017 · 7 comments
Closed

Deprecate the ArgGisImageServerTerrainProvider? #4955

hpinkos opened this issue Feb 6, 2017 · 7 comments
Labels
cleanup good first issue An opportunity for first time contributors

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Feb 6, 2017

We occasionally get questions about how to use the ArgGisImageServerTerrainProvider, and I always refer them to this forum post from @kring: https://groups.google.com/forum/#!msg/cesium-dev/zhJgvO4U3Vk/A3yvKnQRMA8J

We probably should have removed ArcGisImageServerTerrainProvider prior to the 1.0 release, because it is unfortunately nearly impossible to actually use. The problem is that ArcGIS image servers can return height data in a number of ways, but none of them really work for our purposes. If the heightmap is returned as a floating point TIFF, web browsers (and therefore Cesium) are unable to decode it. If the heightmap is returned as a PNG or JPG, the heights are discretized to a value from 0-255, creating a lousy terrain representation.

The workaround that ArcGisImageServerTerrainProvider expects (and this is not well documented) is the use of a special proxy. The proxy requests heightmap images from ArcGIS as TIFF files, and then re-encodes them as PNG files to serve to the browser and Cesium. Rather than a simple grayscale PNG like the one ArcGIS produces itself, the transcoding proxy uses the red, green, and blue channels to effectively represent a 24-bit integer. This gives us much more height precision than we get from the standard ArcGIS PNGs.

Should we deprecate this terrain provider since it's really difficult to actually use in Cesium?

@hpinkos hpinkos added the cleanup label Feb 6, 2017
@pjcozzi pjcozzi added the good first issue An opportunity for first time contributors label Feb 6, 2017
@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 6, 2017

+1.

If someone is using this, please let us know.

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 6, 2017

CC #4954

@kring
Copy link
Member

kring commented Feb 6, 2017

👍

@hanokhaloni
Copy link

any plans to interacting with ArcGIS to get terrain data?

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 18, 2017

@hanokhaloni no, but it would be great if Esri wants to contribute that.

@mortac8
Copy link

mortac8 commented Sep 21, 2017

I just saw this. We were using the ArcGisImageServerTerrainProvider to stream local (preprocessed) terrain when offline. So there is no way forward since this class has been removed?

@hpinkos
Copy link
Contributor Author

hpinkos commented Sep 21, 2017

@mortac8 we decided to end official support for this because it only worked for a very particular server configuration. However, if you include the class in your own project I believe it should still work. You can find the file here: https://github.com/AnalyticalGraphicsInc/cesium/blob/ed034dbe51a9bf1560fb5f40418c47c1d2fc479d/Source/Core/ArcGisImageServerTerrainProvider.js

You can build a custom version of Cesium by following the instructions in our Build Guide

Or if you want to use the official Cesium release, you could modify the file and include it in your project separately. You can remove the AMD define function and add Cesium. before all the Cesium function and class names
(ie new GeographicTilingScheme(...) -> new Cesium.GeographicTilingScheme(...), CesumMath.toDegrees(...) -> Cesium.Math.toDegrees(...), etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup good first issue An opportunity for first time contributors
Projects
None yet
Development

No branches or pull requests

5 participants