This object is in archive! 
Locus Action extract doesnt support large files
Solved
Please see http://forum.locusmap.eu/index.php?topic=4036.msg51709#msg51709
I have enough free space, enough RAM (6 gb), but Locus cannot execute action locus-actions://https/s3.eu-central-1.amazonaws.com/gh-routing-data/2018-06-18/de-at-ch.locus.xml (see list https://graphhopper.develar.org) to install routing data.
Manual downloading and extract works for me, so it isn’t a server issue.
Good day develar,
I have quite a hot moments with this issue today.
Problem is that Android library that handles zip files, has some issues with it. The result of open of such huge file is: ZipException: error in opening zip file (simple during call new ZipFile(...)). Unfortunately, I'm unable to find out any method how to bypass this issue. As I try it with "Solid explorer" app and it has no problem with this file. Most probably different zip library.
Is option for you to split files to most probably smaller than 2 GB (expect problems of this size)?
Jiří M. aka Menion
Good day develar,
I have quite a hot moments with this issue today.
Problem is that Android library that handles zip files, has some issues with it. The result of open of such huge file is: ZipException: error in opening zip file (simple during call new ZipFile(...)). Unfortunately, I'm unable to find out any method how to bypass this issue. As I try it with "Solid explorer" app and it has no problem with this file. Most probably different zip library.
Is option for you to split files to most probably smaller than 2 GB (expect problems of this size)?
Jiří M. aka Menion
> Is option for you to split files to most probably smaller than 2 GB (expect problems of this size)?
It is not an option for users because GraphHopper doesn't support graph merge. https://github.com/graphhopper/graphhopper/issues/293
Well, personally, I live in Bayern, that's why I have prepared special graph "Bayern (Germany), Austria, Czech Republic" (1.15 GB). But for users it will be configuration hell — need to clearly understand what to download and so on.
Maybe Locus can support `tar.gz` files? Or, and it will be awesome, `tar.zstd`? Or maybe 7z (quick google search https://github.com/hzy3774/AndroidUn7zip)?
For me ideally will be support `tar.zstd` because ZSTD decompression speed is very high.
> Is option for you to split files to most probably smaller than 2 GB (expect problems of this size)?
It is not an option for users because GraphHopper doesn't support graph merge. https://github.com/graphhopper/graphhopper/issues/293
Well, personally, I live in Bayern, that's why I have prepared special graph "Bayern (Germany), Austria, Czech Republic" (1.15 GB). But for users it will be configuration hell — need to clearly understand what to download and so on.
Maybe Locus can support `tar.gz` files? Or, and it will be awesome, `tar.zstd`? Or maybe 7z (quick google search https://github.com/hzy3774/AndroidUn7zip)?
For me ideally will be support `tar.zstd` because ZSTD decompression speed is very high.
ZSTD for Android — https://github.com/luben/zstd-jni (tar is required for zstd because zstd supports only one file, so, need to tar and then zstd).
ZSTD for Android — https://github.com/luben/zstd-jni (tar is required for zstd because zstd supports only one file, so, need to tar and then zstd).
Hmm, not a solution I would like to see. Link C++ library just because of this rare case when we need to download a huge data file, hmm.
I wanted to write Peter Karich if there is any news about this "problem". Seems that your topic is almost a year without an answer and because I know that Peter already uses Locus for a field testing, maybe we may push it a little bit ...
Jiří M. aka Menion
Hmm, not a solution I would like to see. Link C++ library just because of this rare case when we need to download a huge data file, hmm.
I wanted to write Peter Karich if there is any news about this "problem". Seems that your topic is almost a year without an answer and because I know that Peter already uses Locus for a field testing, maybe we may push it a little bit ...
Jiří M. aka Menion
Thanks. Actually, proper implementation — do not create temp file, but extract on the fly. But ZIP format doesn't support pipes...
On page http://docs.locusmap.eu/doku.php?id=manual:advanced:customization:actions I see mention of "tar". So, tar supported? Only tar or tar.gz?
Thanks. Actually, proper implementation — do not create temp file, but extract on the fly. But ZIP format doesn't support pipes...
On page http://docs.locusmap.eu/doku.php?id=manual:advanced:customization:actions I see mention of "tar". So, tar supported? Only tar or tar.gz?
Answer from Peter is negative > still no time to do something with this limitation (more routing data sources handled at once).
Extract of ZIP during download is really not possible, yes extraction from InputStream does not work on Android. And even if, problem is not download of huge file, but open of this file by ZipFile object. Solution should really be only some kind of external library, like you mentioned Un7Zip.
And TAR: it is my really really old own implementation, that is currently usable only for a special old TAR map format.
Complicated task. I see possible alternative in Apacha Compress library ( http://commons.apache.org/proper/commons-compress/ ). Apache is anyway usually quite a big bug when it comes to size of APK.
I see one more alternative: locus-actions may have defined more files in a pack. What if you split your huge files into more smaller zip files and Locus extract them all into same directory? Should work.
Jiří M. aka Menion
Answer from Peter is negative > still no time to do something with this limitation (more routing data sources handled at once).
Extract of ZIP during download is really not possible, yes extraction from InputStream does not work on Android. And even if, problem is not download of huge file, but open of this file by ZipFile object. Solution should really be only some kind of external library, like you mentioned Un7Zip.
And TAR: it is my really really old own implementation, that is currently usable only for a special old TAR map format.
Complicated task. I see possible alternative in Apacha Compress library ( http://commons.apache.org/proper/commons-compress/ ). Apache is anyway usually quite a big bug when it comes to size of APK.
I see one more alternative: locus-actions may have defined more files in a pack. What if you split your huge files into more smaller zip files and Locus extract them all into same directory? Should work.
Jiří M. aka Menion
> What if you split your huge files into more smaller zip files and Locus extract them all into same directory?
In this case we need actions: "empty dir". e.g. in the XML will be sequence of download actions, but we need action to prepare dir where files will be extracted. If user already have dir downloaded, we need to empty it to ensure that no old files. Is it possible to implement such action (for security, limit it to be under some dir, e.g `/mapsVector/`)?
> What if you split your huge files into more smaller zip files and Locus extract them all into same directory?
In this case we need actions: "empty dir". e.g. in the XML will be sequence of download actions, but we need action to prepare dir where files will be extracted. If user already have dir downloaded, we need to empty it to ensure that no old files. Is it possible to implement such action (for security, limit it to be under some dir, e.g `/mapsVector/`)?
There is also problem downloading and install maps from openandromaps. I had to use Solid Explorer to extract the Germany map to a Samsung Galaxy S8+ and an Ulefone Power 3s, but Locus Map was able to extract this map on a Samsung S7.
There is also problem downloading and install maps from openandromaps. I had to use Solid Explorer to extract the Germany map to a Samsung Galaxy S8+ and an Ulefone Power 3s, but Locus Map was able to extract this map on a Samsung S7.
Hi,
I kindly wrote two weeks ago to Solid explorer developers if they will be willing to share their knowledge about this problem, but no response so far, probably company secret.
Were you able to bypass this issue by splitting content into more zip files?
Hi,
I kindly wrote two weeks ago to Solid explorer developers if they will be willing to share their knowledge about this problem, but no response so far, probably company secret.
Were you able to bypass this issue by splitting content into more zip files?
Replies have been locked on this page!