Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Encrypted heightmap

Featured Replies

  • Author
  • Localization

praetorian1980, posted Thu Apr 23, 2020 1:21 pm (56224)


I would like to ask for help extracting and reimporting map files. I know that the map format inside the encrypted file is in (jp2) as can be seen from the header or metadata inside the file but other than that I have no idea where to start.

Thanks
  • Author
  • Localization

aluigi, posted Thu Apr 23, 2020 5:25 pm (56231)


Better to upload the original file.
  • Author
  • Localization

praetorian1980, posted Thu Apr 23, 2020 7:04 pm (56238)


Attached.
  • Author
  • Localization

aluigi, posted Fri Apr 24, 2020 9:34 am (56250)


Just for dumping the jp2:
Code:
findloc OFFSET binary "jP  "
math OFFSET - 8
goto OFFSET
get SIZE long
savepos OFFSET
get NAME basename
string NAME ".jp2"
log NAME OFFSET SIZE

I don't know if other hgt files have more files inside, if you have a bigger hgt I can check it.
  • Author
  • Localization

aluigi, posted Sat Apr 25, 2020 11:32 am (56270)


Same format so it's ok to use the script.
  • Author
  • Localization

praetorian1980, posted Sat Apr 25, 2020 12:18 pm (56273)


aluigi wrote:
Same format so it's ok to use the script.


Do you mean this code that you posted earlier?

Quote:
findloc OFFSET binary "jP "
math OFFSET - 8
goto OFFSET
get SIZE long
savepos OFFSET
get NAME basename
string NAME ".jp2"
log NAME OFFSET SIZE


Is it possible to reimport back into the hgt?
  • Author
  • Localization

praetorian1980, posted Sun Apr 26, 2020 5:59 am (56287)


In the zip there is also a ter file. Are you able to extract its contents?
  • Author
  • Localization

aluigi, posted Sun Apr 26, 2020 8:38 am (56290)


I don't know what type of file is that.
It starts with "version" and I guess it's related to "terrain"
  • Author
  • Localization

praetorian1980, posted Sun Apr 26, 2020 4:41 pm (56300)


I think that the hgt are imported using a codec called jasper, but I don't know how to build it from github.
  • Author
  • Localization

praetorian1980, posted Tue Apr 28, 2020 3:48 pm (56345)


I have one question:

I tried comparing a file generated from xnconvert which uses jasper jp2 codecs, with the that hgt file, but I can't decypher what's written in the header. I think, from what I saw, that the hgt file is just a regular jp2 image exported from a jasper codec app in a particular export setting and has a header added to it with information that appears to be, among other things, georeference for the map. If only I could understand what's written in there, I could manually edit the header of new images exported with this codec. Please help.
  • Author
  • Localization

aluigi, posted Wed Apr 29, 2020 5:54 pm (56383)


There are various 32bit fields in the header and I'm not sure what they mean.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.