PDA

View Full Version : PyMapper (a maemo-mapper knock-off)


rtaranu
2007-10-02, 23:41
Edit: I took care of the GPL license (I think) and I moved the code to google code hosting.

Hello, I wanted to show-off some code I wrote in the last two weeks. It's a maemo-mapper knock-off since I *ahem* borrowed some code to get me started and it is very early preview software, but it does have two cool features:


tiles are saved in a sqlite database
you can scroll around smoothly using the stylus


You can go visit the web-page I set up for this at

http://rtaranu.googlepages.com/pymapper

and I'd like to hear any comments or questions you have to offer.

zanglang
2007-10-03, 03:44
Very impressive! :) Some comments and quick features I think will be helpful to complete the experience though:
- The red dot is a great idea! I used to find it hard when trying to zoom for the farthest zoom level (globe view) to just a single town in a country.
- Would be nice if it could remember the current position until next launch
- Double-tapping with stylus to zoom
- Searching and POIs would be helpful, but I suppose may still be too early. :P

I've been playing around with the python-gpsbt bindings, it should be rather trivial to add GPS support. Let me see if I can write a patch for it.

gnuite
2007-10-03, 03:47
Not to be a license nazi, but if you are "borrowing" Maemo Mapper code, please remember that Maemo Mapper is GPL...

dchen
2007-10-03, 04:32
Very impressive! :) Some comments and quick features I think will be helpful to complete the experience though:
- The red dot is a great idea! I used to find it hard when trying to zoom for the farthest zoom level (globe view) to just a single town in a country.
- Would be nice if it could remember the current position until next launch
- Double-tapping with stylus to zoom
- Searching and POIs would be helpful, but I suppose may still be too early. :P

I've been playing around with the python-gpsbt bindings, it should be rather trivial to add GPS support. Let me see if I can write a patch for it.

Haven't tried it yet. How about the performance? May first focus on no-gps usage since the MM already has pretty good GPS features.

rtaranu
2007-10-03, 11:05
Not to be a license nazi, but if you are "borrowing" Maemo Mapper code, please remember that Maemo Mapper is GPL...

Well since the code is in python, it's already "open-source". And I was planing on licensing it as such, but right now I was more interested in making it work properly than to figure out how to work these licenses.

I'll take a look one of these days, and probably host the code on code.google.com and take care of the license also.

rtaranu
2007-10-03, 11:08
Haven't tried it yet. How about the performance? May first focus on no-gps usage since the MM already has pretty good GPS features.

Well, on my N800 the performance is pretty good. The whole thing is multi-threaded and as such, tiles will *pop* as they are loaded, but the scrolling is pretty smooth. Reading, writing & decoding of tiles from the database is what takes the most CPU time as of now.

aflegg
2007-10-03, 12:30
Well since the code is in python, it's already "open-source". And I was planing on licensing it as such, but right now I was more interested in making it work properly than to figure out how to work these licenses.

I'll take a look one of these days, and probably host the code on code.google.com and take care of the license also.

That kind of attitude's all too prevalent, I'm afraid. If you're not complying with the wording of the GPL - under which gnuite has given you permission to copy his code - you're guilty of copyright infringement.

If you're only interested in making it work properly, don't release it: then you've no obligations under the GPL. If you release it, you've got obligations in exchange for getting the headstart of gnuite's code.

Sorting it out "one of these days" isn't enough, because your unclear code could be copied and pasted into another project before you sort out the licencing on your project. Thus causing problems for both gnuite and the third project.

If a relatively close knit community can't get these things right, is it any wonder there're all the companies ripping off GPL software because they think it's free?

konttori
2007-10-03, 13:30
I recommend just adding the GPL segment to the beginning of the python files. That kind of covers your ***. It's only a matter of copy pasting it from pretty much any python app out there. Well worth the 10 seconds. ;)

Darius2006
2007-10-08, 02:37
Edit: I took care of the GPL license (I think) and I moved the code to google code hosting.

Hello, I wanted to show-off some code I wrote in the last two weeks. It's a maemo-mapper knock-off since I *ahem* borrowed some code to get me started and it is very early preview software, but it does have two cool features:


tiles are saved in a sqlite database
you can scroll around smoothly using the stylus


You can go visit the web-page I set up for this at

http://rtaranu.googlepages.com/pymapper

and I'd like to hear any comments or questions you have to offer.

Hi,
could you kindly tell me in plain words how to install your .py files on Nokia 770 to make them working ?
I copied files downloaded to PC from PC to Nokia 770 to memory card mmc1.
gained root
but xterm
chmod +x GoogleMaps.py && ./GoogleMaps.py
doesn't work as .py still sits at my mmc1.
with editors I can open file and save to user's file system
not to Unix-like root file system tree.
So I suppose I do need to cp .py to some other place.
Which place is thwe right one
to run chmod subsequently ?

Python i great.
I do hope to master running python scripts today.
But only with your help.

btw.
It's a great idea to have maemo mapper ported both to C and Python.
Thanks.
Darius

Darius2006
2007-10-09, 02:56
Hi,

I would like to work for you, developing python applications like mapper
with more nice and hot features.

Please contact me.

Darius

konttori
2007-10-09, 05:44
just write python GoogleMaps.py
That way python has to be with executable flag (and it is) and you can run python scripts from the mmc.

Darius2006
2007-10-10, 13:03
just write python GoogleMaps.py
That way python has to be with executable flag (and it is) and you can run python scripts from the mmc.

Thanks.
Directory for GoogleMaps.py while downloaded to memory card is
/mdia/mmc1/
so to run it
I write
python /media/mmc1/GoogleMaps.py
I assume to run it as
python GoogleMaps.py
I need to add some code to environment to tell p[ython where to look for py script files.
What line/s should I add ?

Running GoogleMaps.py script off-line
I get black screen and red point in the center only
no menu key is active.
The same happens while running maemo mapper off-line if no map title is available for a pre-set no gps unit lat/lon but menu keys are still active.

What I am doing wrong ?

Darius

Darius

Darius2006
2007-10-10, 13:45
Hi again,

now I run python script
python /media/mmc1/GoogleMaps.py
in wifi on mode
I got 3 seperate map tiles downloaded only
on script start up noticed
no joystick module message.

Is that script ok for OS2006 ?
It hangs on my Nokia 770
and goes back to main screen after about a minute
py script is still running - icon visible
but Nokia hangs on
I assume processor is to busy running this script.

Darius

konttori
2007-10-11, 13:27
I just downloaded the pymapper and I have to say that it's really impressive. Good work! I wish you could be able to use the same kind of download source strings as maemo mapper does. It seems legally much nicer than the direct linking to google maps.

I was very surprised how fast it was. Excellent stuff. Perhaps the cached view could be just a little bigger so that moving would not so quickly need to get the map tiles from the database, but hey. Really cool stuf.

How about gps integration?
http://pymaemo.garage.maemo.org/documentation/python_gps_examples/index.html

zeez
2007-10-11, 13:36
Very nice!

penguinbait
2007-10-11, 14:05
"I was reading the maemo-mapper 2.0 wish list a few months ago, and the most interesting proposition I heard was to use sqlite to store all the tile information instead of the file system. I haven't heard any news about maemo-mapper 2.0 since then, and because maemo-mapper crashes and corrupts my mem-card on my N800 whenever I try to download bulk maps, I made my own little version of maemo-mapper."


Just wanted to point out that maemo-mapper has absolutely nothing to do with corrupting anything, that nokia has fixed the bug in the kernel, so this is a non issue. Good luck with your project, but I am a hardcore maemo-mapper fan myself. GNUITE ROCKS!!!

Green_Star
2007-10-11, 15:08
Any way now the new version(2.0) of maemo mapper stores the maps in database, so no more space issues.

rtaranu
2007-10-11, 15:17
Hi again,

now I run python script
python /media/mmc1/GoogleMaps.py
in wifi on mode
I got 3 seperate map tiles downloaded only
on script start up noticed
no joystick module message.

Is that script ok for OS2006 ?
It hangs on my Nokia 770
and goes back to main screen after about a minute
py script is still running - icon visible
but Nokia hangs on
I assume processor is to busy running this script.

Darius

You seem to be having a lot of issues with a Nokia 770, I'll try to test PyMapper on one of those and see what kind of things I can fix; as I said, the software is very early tech demo stuff.

rtaranu
2007-10-11, 15:20
"I was reading the maemo-mapper 2.0 wish list a few months ago, and the most interesting proposition I heard was to use sqlite to store all the tile information instead of the file system. I haven't heard any news about maemo-mapper 2.0 since then, and because maemo-mapper crashes and corrupts my mem-card on my N800 whenever I try to download bulk maps, I made my own little version of maemo-mapper."


Just wanted to point out that maemo-mapper has absolutely nothing to do with corrupting anything, that nokia has fixed the bug in the kernel, so this is a non issue. Good luck with your project, but I am a hardcore maemo-mapper fan myself. GNUITE ROCKS!!!

I never said maemo-mapper was causing it, I was having issues with my particular setup, might even be caused by a flaky mem-card.

penguinbait
2007-10-11, 15:36
I never said maemo-mapper was causing it, I was having issues with my particular setup, might even be caused by a flaky mem-card.

It was implied, but either way I am sure the corruption issue was the fault of the kernel bug.

Help me understand this, stored in db or on FS, your still writing the same amount of data right? perhaps a tad more with the db because you have an index. It may however take less room on the fs because of block size, but each tile is still written.

Am I missing something on how this helps the memory card? Is it the memory in the db being used as cache, still writing the same amount to the card???

I am sure metalayer-crawler will like this much better that maemo-mapper current fs layout..

Darius2006
2007-10-11, 22:07
Any way now the new version(2.0) of maemo mapper stores the maps in database, so no more space issues.

I downloaded and installed latest version of maemo mapper for Nokia 770 OS2006 few weeks ago and its version is 1.4.7.
Is MM 2.0 already avaliable to download to OS2006 ?

Darius

rtaranu
2007-10-12, 11:57
It was implied, but either way I am sure the corruption issue was the fault of the kernel bug.

Help me understand this, stored in db or on FS, your still writing the same amount of data right? perhaps a tad more with the db because you have an index. It may however take less room on the fs because of block size, but each tile is still written.

Am I missing something on how this helps the memory card? Is it the memory in the db being used as cache, still writing the same amount to the card???

I am sure metalayer-crawler will like this much better that maemo-mapper current fs layout..

You are right about the space saving, it's the block size thing. You can see how much space you'd save if you connect the Nokia to a Windows machine using USB and go to the repository folder's properties. It shows the "size" and "size-on-disk". Also, copying files to and from the Nokia is very slow for me when you deal with many small files, one single file works much faster.

About how it is better for the mem-card: not sure, all I can tell you is that I haven't managed to corrupt the mem-card yet.

But I can give you a list of advantages for using a db + python:

This is multi-platform, I actually developed this whole thing on my windows machine, and it ported without a hitch, I just had to change the "keyboard" event listeners. Ok, maybe not that easy, because I found many bugs in my code due to the Nokia being very slow, but the code did port right over without many issues.

If it's multiplatform, you can use your PC to download all the maps you want (faster) and just copy a database file over to the Nokia. You can also use this on win / linux / mac os without any complicated work.

DB is practical, because you can make "map sets". So when you go on a road trip and you need to cache a lot of tiles, you can erase them easily when you are done.

The project was actually started to be able to make custom maps. I was looking for a GPS / mapping device for marine applications and they are all very expensive (1000$+). But normal paper maps are 30$. My plan was to scan a paper map every year (since they change) and to import them into PyMapper. I'm still working on that idea, but the boating season's mostly over where I live and I'm not in a big rush till spring.

konttori
2007-10-12, 12:34
I also love python exactly because it's so easy to make stuff on non-linux platforms for the device. It would be great if you could package your component with the pypackager. I think quite many people would like that!

Green_Star
2007-10-12, 12:37
I downloaded and installed latest version of maemo mapper for Nokia 770 OS2006 few weeks ago and its version is 1.4.7.
Is MM 2.0 already avaliable to download to OS2006 ?

Darius

Nope, version 2.0 is not out for users. It is still under testing. Once developer/gnuite feels that it is ready he will release to users, I am hoping it will be out in a week or two. Its just my guess, I am not sure whats in gnuite's mind.