This object is in archive! 

On-board Map Calibrator, limit of image size

balloni55 shared this question 8 years ago
Answered

i want to calibrate a 11356x8608 pix map.jpg, this is not possible.

In manual there is no maximum size described

http://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_tools:calibrator

Question, what is maximum possible size of image for calibration inside locus?

Replies (8)

photo
1

Hello balloni,


maximum size ... hmm there should be just warning that size is too huge, but you may continue on your own risk. Or it just do not work in this way? Anyway limit is defined dynamically based on your device.


May you please share in any way such huge photo with me? I'll test it on older SGS2 device and improve it little bit if possible, thanks.

photo
1

if i continue i get an fc

attached you find the same map as "jpg" ~75 MB and as "jp2" ~7,5MB

Locus unfortunately can´t read jp2 files


EDIT: attachement failed, so :

https://www.dropbox.com/s/8d4ma3v3cgolaan/Desktop.zip?dl=0

photo
1

Ah 75 MB? :). Usually memory for app on modern devices has it's limits somewhere around 100 - 200 MB. JPG image, 75 MB big, will consume a lot more then 200 MB, so I'm worried that with this image, you will be a lot over Locus (Android) limits.


Unfortunately on-board calibrator feature has disadvantage, that whole image has to be loaded into memory. It should be improved in future, but for now, this is limiting factor.

photo
1

and to make jp2 file readable with locus?

photo
1

It makes no difference. Format of images (png, jpg, etc.) has absolutely no effect on required amount of memory. Only side depends here.

So in your case, 11356 x 8608 = 97,752,448 * 4 (4 bytes = 1 pixel) = 391,009,792 bytes = 373 MB!! , so your device (Locus) needs almost 400 MB free RAM just to hold whole image in memory at once.

photo
1

Hi menion

with running locus my device has ~240 MB free RAM

i try some different downsized maps from attached .jpg to understand your calculating description, but the result is not as expected.

image 3000x2274 size~6,5MB, calculated ~27MB, normal loaded ;-) free RAM ~210 MB

Image 5000x3790 size ~18 MB, calculated ~76MB, loaded after confirm warning ;-) free RAM ~160MB

Image 5500x4169 size ~21,5MB, calculated ~92MB, after confirm warning > FC

For me it looks that ~20 MB file size is limit on my device

photo
1

Hmm this is quite complicated question to answer. "Free RAM" is not useful parameter, because not all free RAM is available to every application that needs it. Android has own internal logic that define how much memory may be used by application and as I know, every Android has this parameter little bit different.


So sorry, but I cannot help here. Also because of this, is in Locus just a warning when you try to load too huge file.


Anyway I see possible solution for a long time. Solution should be "cut" image into smaller parts even before calibration and then work with already separated small tiles. Generally I see a solution to this problem and I also wants to do it, but you know ... not enough time because it will be a few days work. Anyway because I have one really really nice idea in my head that I want to implement, I hope that improvement here will be done next year!


More I cannot promise for now, sorry.

photo
1

Thanks for your detailed answer!

And now that i know the limit <20MB/image file, for my device i can life with it.

So i´ll wait patientely ;-)

Replies have been locked on this page!