Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
Rugged
Commits
0589a3ec
Commit
0589a3ec
authored
11 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error loading elevation from Aster files.
parent
43bb8fd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
+5
-4
5 additions, 4 deletions
...main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
with
5 additions
and
4 deletions
geotiff/src/main/java/org/orekit/rugged/geotiff/AsterTileUpdater.java
+
5
−
4
View file @
0589a3ec
...
...
@@ -216,15 +216,16 @@ public class AsterTileUpdater implements TileUpdater {
latitudeRows
,
longitudeColumns
);
// read the raster data
final
int
msb
=
reader
.
getByteOrder
()
==
ByteOrder
.
BIG_ENDIAN
?
0
:
1
;
final
int
lsb
=
reader
.
getByteOrder
()
==
ByteOrder
.
BIG_ENDIAN
?
1
:
0
;
final
int
msb
Offset
=
reader
.
getByteOrder
()
==
ByteOrder
.
BIG_ENDIAN
?
0
:
1
;
final
int
lsb
Offset
=
reader
.
getByteOrder
()
==
ByteOrder
.
BIG_ENDIAN
?
1
:
0
;
int
i
=
0
;
for
(
final
TiffDirectory
tiffDirectory
:
contents
.
directories
)
{
for
(
final
TiffDirectory
.
ImageDataElement
element
:
tiffDirectory
.
getTiffRawImageDataElements
())
{
final
byte
[]
bytes
=
source
.
getBlock
(
element
.
offset
,
element
.
length
);
for
(
int
longitudeIndex
=
0
;
longitudeIndex
<
longitudeColumns
;
++
longitudeIndex
)
{
final
int
elevation
=
(
bytes
[
2
*
longitudeIndex
+
msb
]
<<
8
)
|
bytes
[
2
*
longitudeIndex
+
1
+
lsb
];
final
int
msb
=
bytes
[
2
*
longitudeIndex
+
msbOffset
];
final
int
lsb
=
0xff
&
bytes
[
2
*
longitudeIndex
+
lsbOffset
];
final
int
elevation
=
(
msb
<<
8
)
|
lsb
;
tile
.
setElevation
(
latitudeRows
-
1
-
i
,
longitudeIndex
,
elevation
);
}
i
++;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment