Hike Bike Map (Hills Underlay) - Offline?

834 views
Skip to first unread message

Hardy

unread,
Dec 2, 2012, 5:25:54 AM12/2/12
to osm...@googlegroups.com
Many users tell me they just love the map appearance we create in OsmAnd when using Vector offline maps together with the "Hike Bike Map (Hills Underlay)". A good effect is created by using the online HBM(Hills Underlay) as an OVERlay with our standard overlay transparency of 200. I enclose a screenshot Christof already published elsewhere (using the new Touring View rendering style).

Question: Has anybody investigated creating the  HBM(Hills Underlay) as an offline-sqlite? Maybe we should think about offering this in our download section in some fashion? (We would need to investigate useful areas, zooms, and manageable file sizes, though).


hillshade+touring-view.png

andre van atten

unread,
Dec 2, 2012, 8:12:31 AM12/2/12
to osm...@googlegroups.com

I use the SRTM hillshade layers in a sqlitedb file as an overlay.  Levels 4-11 are stored in one file of only 184 MB, which spans the most of Western Europe. These data is available for the whole world, which is about 30 Gb totally worldwide .
The problem was (of course), that the levels 12 and above were not there and thus not visible anymore when zooming in. However,  there was a developer version 0.7x in April 2012 (version 1298), that was able to 'stretch' these images up to level 17. Actually this was a kind of smart resampling and worked rather well! Of course,  by resampling the size of the file used to store the hillshade layers could be reduced by a factor 50_100! with nearly no visible loss of quality. There we're sometimes some refresh issues on the edges of the tiles,  but easely solved by a manual refresh,  and no other big issues. Well, that is one of the reasons I still use this version on a old phone;- )
Would be nice if that was implemented again in version 1.0! But it would also need a distribution process and server to store the sqlitedb files, per country or per latlon degree. A lot of work,  indeed.

Andre

Op 2 dec. 2012 11:25 schreef "Hardy" <hm.gg...@gmail.com> het volgende:

Victor Shcherb

unread,
Dec 2, 2012, 9:27:55 AM12/2/12
to osmand
I like that idea and I think we will make it part of SRTM-plugin where ele lines  will be available for download. 
Actually I'm working on it now.
Hardy if you can prepare hill-shade tiles it will be awesome. The download process could be cumulative, so you select region/zooms and data will be downloaded directly in existing hill-shade sqlite file.

Thanks,
Victor

2012/12/2 andre van atten <andrev...@gmail.com>
ve were n

Jindřich Makovička

unread,
Dec 2, 2012, 9:56:41 AM12/2/12
to Osmand ML
Just curious, can current Osmand scale hill shade bitmaps if the
higher zoom level is not available? I remember Yves was working on a
patch that does that, but there were issues with out of memory errors
at that time.
--
Jindřich Makovička

yvecai

unread,
Dec 2, 2012, 12:33:02 PM12/2/12
to osm...@googlegroups.com
I think all the memory issue were solved: http://code.google.com/p/osmand/issues/detail?id=858
But there was something I wasn't able to fix at that time : https://github.com/osmandapp/Osmand/pull/191, I think the 'exists' method should be separated in case of resampling vs normal sqlite action, and changed accordingly in the ressource manager.
I still have the branch hillshade-resample in my github (https://github.com/yvecai/Osmand/tree/hillshade-resample), I'm pretty sure it can't be merged right away so long after. Maybe you can have a look at it, Jindrich?

I'm building right now (in fact since 2-3 month with a lot of wasted time) a big hillshade sqlite from the same data as the new contours, and I still expect a few weeks of efforts before going there.
Then I'll be able to convert it to Osmand-friendly sqlite, and split it in the same 1x1° tiles as contours so they can be distributed easily with the same plugin.

Victor Shcherb

unread,
Dec 2, 2012, 12:57:43 PM12/2/12
to osmand
Hi Yvecai,

I think that for hillshade we probably don't need many files per sqlite. There is a different mechanism to download tiles. I will think just to copy all hillshade files to the hosting and according to our region table download specific tile from device.
 Remember,  it is already possible today (Download tile data...). We just need to add "Names" for Regions. So if user selects "Germany" we calculate on device (offline) how many tiles is needed and what exactly, user selects zoom level and we run existing dialog to download tiles. It is even better because this part is multi threaded in the application.

Best Regards,
Victor


2012/12/2 yvecai <yve...@gmail.com>

andre van atten

unread,
Dec 2, 2012, 1:05:14 PM12/2/12
to osm...@googlegroups.com

That's amazing! I am sure it will make Osmand an even more killing app. 
Would be nice to add some beautiful  pictures on the market when everything is ready and running.  But that sure is still a lot of work to be done (..and a lot of work that has been done yet,  thanks Yves! ) Are you regenerating all the hillshade tiles to a better resolution ?

Andre

Op 2 dec. 2012 18:33 schreef "yvecai" <yve...@gmail.com> het volgende:

Jindřich Makovička

unread,
Dec 3, 2012, 2:34:21 PM12/3/12
to Osmand ML
On Sun, Dec 2, 2012 at 6:33 PM, yvecai <yve...@gmail.com> wrote:
> I think all the memory issue were solved:
> http://code.google.com/p/osmand/issues/detail?id=858
> But there was something I wasn't able to fix at that time :
> https://github.com/osmandapp/Osmand/pull/191, I think the 'exists' method
> should be separated in case of resampling vs normal sqlite action, and
> changed accordingly in the resource manager.

Do you have some (reasonably small) sqlite tile file this bug can be
reproduced with?

--
Jindřich Makovička

yvecai

unread,
Dec 3, 2012, 2:46:15 PM12/3/12
to osm...@googlegroups.com
Viktor, good idea.
Nevertheless you will probably a big sqlite to store the tiles on the server, 'cause rm -rf runs for hours on such a tile set.

Jindřich Makovička

unread,
Dec 3, 2012, 5:27:08 PM12/3/12
to Osmand ML
Just pushed https://github.com/jmakovicka/Osmand/tree/hillshade-resample-2
, with the exists() issue hopefully fixed.

On Sun, Dec 2, 2012 at 6:33 PM, yvecai <yve...@gmail.com> wrote:
--
Jindřich Makovička

Jindřich Makovička

unread,
Dec 5, 2012, 12:49:18 PM12/5/12
to Osmand ML
A sneak peek is here... http://goo.gl/lW13v

The hill shading code has been merged last night (thanks Victor!) so
we "only" need to deal with the data :)

For curious folks, I can eventually share the sample sqlite db for a
large part of Western+Central Europe kindly provided by Yves for
testing if he confirms he is ok with that.
--
Jindřich Makovička

yvecai

unread,
Dec 6, 2012, 12:46:33 PM12/6/12
to osm...@googlegroups.com
Sure, go on if you want, and thanks Andre too to put those tiles in a sqlite.
Yves

Jindřich Makovička

unread,
Dec 6, 2012, 1:53:21 PM12/6/12
to Osmand ML
Ok, the tilebase is available at

http://geraldine.fjfi.cvut.cz/~makovicka/SRTM_W-europe_level_4-11.sqlitedb

enjoy :)

On Thu, Dec 6, 2012 at 6:46 PM, yvecai <yve...@gmail.com> wrote:
> Sure, go on if you want, and thanks Andre too to put those tiles in a sqlite.
> Yves



--
Jindřich Makovička

andre van atten

unread,
Dec 6, 2012, 2:26:57 PM12/6/12
to osm...@googlegroups.com

No thanks, these are the 'old' tiles from November 2011.  I use latest dev build 287M, but I see hillshade only on level 12 and below, while I expected them to be resampled up to level 16 or 17, that is on the fly, like the 1298 build .  Do I have the right build?  Strange thing is that the offline manager tells me that level 2-10 is present in the sqlitedb, while there should be level 4-11??. Hmm, let's sort this out..

Andre

Jindřich Makovička

unread,
Dec 6, 2012, 2:39:13 PM12/6/12
to Osmand ML
On Thu, Dec 6, 2012 at 8:26 PM, andre van atten <andrev...@gmail.com> wrote:
> No thanks, these are the 'old' tiles from November 2011. I use latest dev
> build 287M, but I see hillshade only on level 12 and below, while I expected
> them to be resampled up to level 16 or 17, that is on the fly, like the 1298
> build . Do I have the right build?

Probably not, I see the shading up to the level 17, but I am using my
own build. I am not even sure if the scaling is already in the nightly
- there was a build breakage due to errors in translation resources.

> Strange thing is that the offline
> manager tells me that level 2-10 is present in the sqlitedb, while there
> should be level 4-11??. Hmm, let's sort this out..

--
Jindřich Makovička

Hardy

unread,
Dec 6, 2012, 6:17:05 PM12/6/12
to osm...@googlegroups.com
build fixed again.

andre van atten

unread,
Dec 7, 2012, 10:17:30 AM12/7/12
to osm...@googlegroups.com

Works like a charm!

Andre

yvecai

unread,
Dec 8, 2012, 5:33:57 AM12/8/12
to osm...@googlegroups.com
Very good job Jindrich ! Many thanks for completing this !

Only 30% of the new hillshade tiles are generated in one week on my server, not sure we get this for Christmas.
Yves

On Friday, December 7, 2012 4:17:30 PM UTC+1, Andre.oid wrote:

Works like a charm!

Andre

Victor Shcherb

unread,
Dec 22, 2012, 9:34:59 AM12/22/12
to osmand
Hi All,

Would like to let you know that file accessible on http://new.osmand.net/srtm/SRTM_W-europe_level_4-11.sqlitedb.

We hope to create different files and make them available in OsmAnd downloads in future as part of SRTM plugin.

Victor


2012/12/8 yvecai <yve...@gmail.com>

Manfred

unread,
Jan 6, 2013, 9:55:28 PM1/6/13
to osm...@googlegroups.com
Hi Victor!

Shading worked until now.
In #580G this file in /sdcard/osmand/tiles is ignored (not shown as underlay / overlay map any more)

Regards
Manfred
Reply all
Reply to author
Forward
0 new messages