gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.51k stars 780 forks source link

osgearth_conv generated TMSElevation dataset from ArcGIS not appearing properly #2390

Closed michaelgtodd closed 11 months ago

michaelgtodd commented 11 months ago

When using osgearth_conv to create a TMSElevation dataset from an ArcGISServerElevation dataset, and then loading that elevation data afterwards, strange artifacting is seen in the elevation data.

To Reproduce

  1. Create a TMSElevation dataset

    osgearth_conv --in driver arcgisserverelevation \
              --in url https://services.arcgisonline.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer \
              --out driver tmselevation \
              --out url /output_geo/tms.xml \
              --out format jpg \
              --min-level 0 \
              --max-level 3 \
              --extents -90 -180 90 180 \
              --profile global-geodetic \
              --no-overwrite \
              --threads 8
  2. Create an earth file earthfile.txt

    
    <map name="ArcGIS Map">
    
    <ArcGISServerImage name="SAT">
        <url>http://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/</url>
    </ArcGISServerImage>
    
    <TMSElevation name="ELEV">
        <url>/output_geo/tms.xml</url>
    </TMSElevation>



**Expected behavior**
The same elevation data from the online source is now available in the TMSElevation dataset

**Screenshots**
![image](https://github.com/gwaldron/osgearth/assets/794838/6350346e-3c72-4542-81ef-e676a6de0812)

**Environment**
 - OS: RHEL 8
 - OSGEarth Version 3.5
TMwhuhan commented 11 months ago

--out format tif ? save tms tile to tif image

jasonbeverage commented 11 months ago

@TMwhuhan is correct, you can't save elevation to jpg format as it will be quantized and scaled incorrectly. Try using --out format tif.