Active Topics

 



Notices


Reply
Thread Tools
Posts: 235 | Thanked: 163 times | Joined on Dec 2008 @ Costa Rica
#811
Originally Posted by JonWW View Post
You had a file of 4740 bytes and not a directory, that is why you couldn't cd into it. If it was a directory you sould have had a read out something like:
Code:
drw-r--rw-    1 root     root         4096 Jul 25 11:46 .modrana
I'm ashamed that I have not seen it was a file
 

The Following User Says Thank You to lsolano For This Useful Post:
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#812
Originally Posted by lsolano View Post
I'm ashamed that I have not seen it was a file
We've all done it, nothing to be ashamed of.

More to the point, what was in the file and how did it get there?
 

The Following User Says Thank You to JonWW For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#813
Originally Posted by JonWW View Post
We've all done it, nothing to be ashamed of.

More to the point, what was in the file and how did it get there?
Now I think I know how it got there:
Code:
# migrate options.bin
if [ -w  /opt/modrana/data/options.bin ];then
  echo "migrating options.bin"
  mv /opt/modrana/data/options.bin /home/user/.modrana
fi
(excerpt from the postinst script)

Notice how there is no / after .modrana ?

Well, still better than the bumblebee disaster.

I'll release a version with updated postinst shortly (and add a fix that fixes all those .modrana files).
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2011-08-03 at 12:29.
 

The Following 5 Users Say Thank You to MartinK For This Useful Post:
Posts: 650 | Thanked: 497 times | Joined on Oct 2008 @ Ghent, Belgium
#814
Originally Posted by MartinK View Post
Well, still better than the bumblebee disaster.
Wow... that must have hurt a lot....
__________________
Affordable mobile internet in Belgium: Try Mobile Vikings
2 GB, 1000 SMS and 15 euro of talk time for.... 15 euro
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#815
Originally Posted by MartinK View Post
Well, still better than the bumblebee disaster.
Woah... Epic!

Bleeding edge really bleeding for someone right now :O)
 
Posts: 21 | Thanked: 7 times | Joined on Jul 2010 @ Ipswich, England
#816
Originally Posted by MartinK View Post
Well, I'm not really a database architect - I basically just thought quite a long time about how to make an universal schema and asked a friend who works with databases a bit. Well, like this, the lookup and store databases are independent - so when the lookup one is corrupted, it should be possible to regenerate it just form the stores.

Yeah - say we have x=1 y=2 and z=17 -> 1217, also x=1,y=21,z=7 -> 1217 ...
A hash with separators might work though: 1,2,17 vs 1,21,7 - would something like this be usable ?

Also, would it be possible to maintain backward compatibility by adding this new indexes and still storing the old info ? Converting all the existing database files users might already have would be quite a headache and also some developers might be already working on supporting the format in its current form (IIRC the CloudGPS developer, maybe also some others).

There is a version filed in the schema, so it would be possible to do something like this:
  • 1 = current version
  • 2 = old info + new indexes
  • 3 = just new indexes
I think your proposed versioning makes sense. As long as we add any new columns after the existing columns so that if anybody's already using the schema and doing "select(*)" we won't break their code.

Your idea of a hash-like index using separators seems a good idea. My only other thought was to force each of the x,y,z elements to a fixed length (perhaps by adding 1000000 to each, depending on what the biggest number each one could possibly be). But your method makes it more compact.

Then for version 2, your lookup table could be:
Code:
CREATE TABLE tiles (z INTEGER, x INTEGER, y INTEGER, store_filename STRING, extension varchar(10), unix_epoch_timestamp INTEGER, store_tilenumber INTEGER, lookup STRING, PRIMARY KEY(lookup));
CREATE TABLE version (v integer);
CREATE INDEX oldindex on tiles (z,x,y);
For version 3, drop the z,x,y and extension columns as well as the oldindex index.

Version 2 of the tile store could be:
Code:
CREATE TABLE tiles (z INTEGER, x INTEGER, y INTEGER, tile BLOB, extension VARCHAR(10), unix_epoch_timestamp INTEGER, id INTEGER AUTO INCREMENT, PRIMARY KEY(id));
CREATE TABLE version (v integer);
CREATE INDEX oldindex on tiles (z,x,y);
For version 3, drop the oldindex index. You could keep the x,y,z columns in this table for regenerating the lookup table as you mentioned. You could shrink the lookup table a bit more for version 3 by also dropping the epoch_timestamp from it. That would introduce a slight overhead when checking for updated tiles as it would need to be retrieved from the store rather than the lookup. I'm not sure which way would give the best balance of benefits.

So you'd insert the tile in the store first, then retrieve the value of the id column to populate the store_tilenumber column in the lookup table.
 
Posts: 1,523 | Thanked: 1,997 times | Joined on Jul 2011 @ not your mom's FOSS basement
#817
Originally Posted by MartinK View Post
This was for legacy reasons - Rana, the modRana predecessor was developed for the Neo FreeRunner, where everything run under root. So it didn't matter where they were stored.


Well, I've just sent V0.27-2 to the autobuilder, that does just this
check out the updated data storage article for details about the new paths.
In short:
  • map data - nothing changes, still MyDocs/.maps
  • POI- nothing changes, still MyDocs/.maps
  • tracklogs are now stored in MyDocs/tracklogs, old tracklogs should be migrated there automatically
  • configuration files are now in ~/.modrana


OK, I'll change it to reload the directory once it is listed from the GUI.


I'm looking at this right now.
May i strongly suggest not using MyDocs and using dirs located directly under $HOME instead? MyDocs is exportable / mountable, so for example if you have connected your N900 via USB to a laptop maybe for copying some files over, you would not be able to use modRana (or any other SW that does this) at the same time and would have to choose between using the SW or copying files.
 

The Following 2 Users Say Thank You to don_falcone For This Useful Post:
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#818
Had error message when tried to upgrade modrana install. Look attachment.
Attached Files
File Type: txt modrananaerror.txt (3.3 KB, 85 views)
__________________
TMO links: [iSpy] - [Power search] - [Most thanked] - [Cordia - Maemo5 UI on top MeeGo Core] - [CommunitySSU]

Last edited by slender; 2011-08-03 at 21:31.
 
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#819
Hi, I really like this app very much and most of it I like the downloading function. But what I'm currently missing is a layer for public transport. I guess for most countrys these data exist but I don't know whether there is one map that covers all i.e. globe. But if it was possible in any way to add a layer for public transport this would be amazing. Travelling to foreign countries is made much easier if one can use a map with highlighted transportation. Maybe you can have a look at maep which offers this layer but sadly lacks downloading ability.

Another question (I guess this is already answered but I didn't find): Is there an easy way to download all needed tiles for an area externally and afterwards just throw them into correct folder on N900? downloading a bunch of some 20k tiles at once is quite hard. My N900 gets quite hot when using 3G-connection that intense.
 
Posts: 650 | Thanked: 497 times | Joined on Oct 2008 @ Ghent, Belgium
#820
There are other interesting layers too: rain radar, traffic jams,...
__________________
Affordable mobile internet in Belgium: Try Mobile Vikings
2 GB, 1000 SMS and 15 euro of talk time for.... 15 euro
 
Reply

Tags
bada rox, martin_rocks, modrana, navigation, openstreetmap, the best, wehasgps


 
Forum Jump


All times are GMT. The time now is 16:06.