The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

[resolved] OfflineMaps+ - Extract some caches from .dat file ..

It's all about maps...
Post Reply
Ramadnio
Posts: 46
Joined: Sat Dec 12, 2015 3:34 pm

[resolved] OfflineMaps+ - Extract some caches from .dat file ..

Post by Ramadnio »

hi

i need to find a way to extract some caches from cache file of OfflineMaps that extention .dat file

ex.

i downloaded caches of england .. and the cache stored in this path..
OfflineMaps/cache/builtin-maps/OSMMPQ.DAT

how can i extract some caches area from this file "OSMMPQ.DAT" ?

please help
thx.
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: OfflineMaps+ - Extract some caches from .dat file ..

Post by Psyberia-Support »

Hi,
This .dat format is quite complex and no specs are available now.
Why not getting the data directly from where it comes, ie here, where it's simply available as images?
Do you like AlpineQuest ? Leave a small comment on Google Play !
mzicoll
Posts: 1
Joined: Sun Jul 05, 2020 5:02 am

Re: OfflineMaps+ - Extract some caches from .dat file ..

Post by mzicoll »

Well,
not so many answers here in the last years ;)

However, as e.g. OTM does not allow to download too many files at once, the cache saves some time, when re-using the tiles somewhere else...
So, I worked on extracting the cached tiles (IDX and DAT) and hopefully it helps somebody out there.

The code is not checked very well, but for me (AQ v 2.2.5d) it perfectly extracts some PNG on UNIX (Don't worry, should run on other "OS's" as well).
So please accept that this utility and code comes with absolutely no warranty!

Attached is a zip file, containing to jars, one executable, the other just containing the source code.
Some typical calls could be:

Code: Select all

  java -jar /path-to-jar/AqCache.jar  (general help)
  
  java -jar /path-to-jar/AqCache.jar  AqDatDump (specific help)
  java -jar /path-to-jar/AqCache.jar  AqDatDump OSMOTM.DAT (just list)
  java -jar /path-to-jar/AqCache.jar  AqDatDump -e png OSMOTM.DAT (list and extract)
  
  java -jar /path-to-jar/AqCache.jar  AqIdxDump (specific help)
  java -jar /path-to-jar/AqCache.jar  AqIdxDump OSMOTM.IDX (just list)
  java -jar /path-to-jar/AqCache.jar  AqIdxDump -e png OSMOTM.IDX (list and extract)
Maybe the IDX stuff does not really help, but if you want to understand the structure and/or extract specific tiles (or on the fly by other applications), you should understand the IDX.

I did not understand all of the bits and bytes in the IDX or DAT file, so the tool might not work always ;/

Give it a try, comments welcome :)
Martin
Attachments
AqCache.zip
(21.18 KiB) Downloaded 518 times
Psyberia-Support
Site Admin
Posts: 6406
Joined: Wed Apr 14, 2010 9:41 pm

Re: OfflineMaps+ - Extract some caches from .dat file ..

Post by Psyberia-Support »

Thanks for the tool!
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply