Closed venci01 closed 7 years ago
The terrain feature is under severe refactoring those days, but you can use easily the class ElevationDataProvider. You have an Android example here (on the iOS demo you'll have the same example): https://github.com/glob3mobile/g3m/blob/purgatory/Android/G3MAndroidDemo/src/org/glob3/mobile/demo/ScenarioTerrainActivity.java
You only have to:
final float verticalExaggeration = 2f;
final double deltaHeight = -700.905; // this delta is used for the camera, if your terrain is close to the sea or is the whole world 0 is a good number.
// This is the sector where you have terrain final Geodetic2D lower = new Geodetic2D( // Angle.fromDegrees(40.1665739916489), // Angle.fromDegrees(-5.85449532145337)); final Geodetic2D upper = new Geodetic2D( // Angle.fromDegrees(40.3320215899527), // Angle.fromDegrees(-5.5116079822178570));
final Sector demSector = new Sector(lower, upper);
// NROWS 1335
// NCOLS 2516
// You have to put the bil file under assets folder and you have to put the number of rows and //columns for your dataset
final ElevationDataProvider elevationDataProvider = new SingleBilElevationDataProvider(new URL("file:///0576.bil", false),
demSector, new Vector2I(2516, 1335), deltaHeight);
builder.getPlanetRendererBuilder().setElevationDataProvider(elevationDataProvider);
builder.getPlanetRendererBuilder().setVerticalExaggeration(verticalExaggeration);
Thanks for using it.
Best regards
hi,@DiegoGomezDeck i am studying glob3mobile,but i don not know how to load online terrain
http://worldwind26.arc.nasa.gov/wms
<?xml version="1.0" encoding="UTF-8"?>