Notices


Reply
Thread Tools
Posts: 18 | Thanked: 4 times | Joined on Jan 2010
#11
Originally Posted by tekojo View Post
Hi all,

I'm trying to find someone inside Nokia to tell me how the Topomaps deal and system worked. The actual map material is owned by Karttakeskus (Finnish National Survey).

So I'll find out what has happened and can we do something about it, and get back here.
It might take a while though, I have a clue on where to start, but nothing concrete yet.
Don't bother. I allready did this some time ago and exchanged a few e-mails both with the NLS (Maanmittauslaitos) and with Nokia. The deal is off and that's it, nothing to be done. But let's see if this awesome service will return some day in some form.
 
Posts: 18 | Thanked: 4 times | Joined on Jan 2010
#12
Originally Posted by ossipena View Post
so licence expiration about 2 years after the release seems pretty logical to me.
I agree. That was what I came to think as well.
 
extechop's Avatar
Posts: 51 | Thanked: 10 times | Joined on Feb 2010 @ Helsinki, Finland
#13
Originally Posted by ossipena View Post
well keeping in mind that topomaps at N900's mappero is a hack, the topomaps were officially for OS2008 (N800&N810).

so licence expiration about 2 years after the release seems pretty logical to me.
For some reason I think that two years is a slightly short lifetime for devices which cost around 500€, but maybe it's just me...
 
Posts: 6 | Thanked: 2 times | Joined on Dec 2009
#14
Originally Posted by orava View Post
1) Install required packages proj-bin, libgdal1-1.7.0, python-gdal and python-imaging ("apt-get install proj-bin libgdal1-1.7.0 python-gdal python-imaging").
2) Download fetch_map(http://olammi.iki.fi/sw/fetch_map/download.php) and attached "map.py.gz". Gunzip and copy map.py to some dir on your web server and extract all files from fetch_map dir in fetch_map zip to same directory.
3) If needed modify MAP_CACHE_DIR(default is "./map_cache") and allow writing to that directory.
4) Now it should work. You can try to fetch a tile for example with "map.py?kkp2/7/72/36.png". Because of the transformations text in farther zoom levels is not very well readable but closer zoom levels are fine.
I tried to play around with my Ubuntu 9.10 installation, and I got the apache2 with mod_python installed. The map.py seems to work from command line just OK as does fetch_map.py, but for some reason I get errors when I'm trying to invoke map.py via browser (http://localhost/py/map.py?kkp2/7/72/36.png).

Here's the output:
Code:
MOD_PYTHON ERROR

ProcessId:      15433
Interpreter:    '127.0.1.1'

ServerName:     '127.0.1.1'
DocumentRoot:   '/var/www'

URI:            '/py/map.py'
Location:       None
Directory:      '/var/www/py/'
Filename:       '/var/www/py/map.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mod_python.publisher'

Traceback (most recent call last):

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 425, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.6/dist-packages/mod_python/util.py", line 554, in apply_fs_data
    return object(**args)

  File "/var/www/py/map.py", line 513, in index
    im = getTile(z,x,y, service)

  File "/var/www/py/map.py", line 91, in getTile
    (im, ozi_map_data) = Fetch_And_Return_Map(fmservice, COORDTYPE, C_N, C_E, size, size, parameters)

  File "/var/www/py/map.py", line 215, in Fetch_And_Return_Map
    fetch_map.DoFetch(0, im, fmservice, LL_N, LL_E, UR_N, UR_E, MAPSIZE_X, MAPSIZE_Y, parameters)

  File "/var/www/py/fetch_map.py", line 770, in DoFetch
    sys.exit(1)

SystemExit: 1
Entering e.g. "python map.py -z 7 -x 72 -y 36 -s kkp2" from command line works OK, so it's likely something in my apache setup? Or does that ending up to sys.exit(1) in line 770 in fetch_map.py indicate that the map_cache directory cannot be accessed?

-sami
 

The Following User Says Thank You to samivee For This Useful Post:
Posts: 223 | Thanked: 323 times | Joined on Dec 2010
#15
Originally Posted by samivee View Post
I tried to play around with my Ubuntu 9.10 installation, and I got the apache2 with mod_python installed. The map.py seems to work from command line just OK as does fetch_map.py, but for some reason I get errors when I'm trying to invoke map.py via browser (http://localhost/py/map.py?kkp2/7/72/36.png).

Here's the output:
Code:
MOD_PYTHON ERROR

ProcessId:      15433
Interpreter:    '127.0.1.1'

ServerName:     '127.0.1.1'
DocumentRoot:   '/var/www'

URI:            '/py/map.py'
Location:       None
Directory:      '/var/www/py/'
Filename:       '/var/www/py/map.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mod_python.publisher'

Traceback (most recent call last):

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 425, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.6/dist-packages/mod_python/util.py", line 554, in apply_fs_data
    return object(**args)

  File "/var/www/py/map.py", line 513, in index
    im = getTile(z,x,y, service)

  File "/var/www/py/map.py", line 91, in getTile
    (im, ozi_map_data) = Fetch_And_Return_Map(fmservice, COORDTYPE, C_N, C_E, size, size, parameters)

  File "/var/www/py/map.py", line 215, in Fetch_And_Return_Map
    fetch_map.DoFetch(0, im, fmservice, LL_N, LL_E, UR_N, UR_E, MAPSIZE_X, MAPSIZE_Y, parameters)

  File "/var/www/py/fetch_map.py", line 770, in DoFetch
    sys.exit(1)

SystemExit: 1
Entering e.g. "python map.py -z 7 -x 72 -y 36 -s kkp2" from command line works OK, so it's likely something in my apache setup? Or does that ending up to sys.exit(1) in line 770 in fetch_map.py indicate that the map_cache directory cannot be accessed?

-sami
It seems that relative path names shouldn't be used when script is executed with mod_python. So if you're using default MAP_CACHE_DIR="./map_cache" try to change it to "/var/www/py/map_cache/".
 

The Following 2 Users Say Thank You to orava For This Useful Post:
Posts: 6 | Thanked: 2 times | Joined on Dec 2009
#16
Thanks for the help, that was one part of the solution.

In addition to that, the kkp-directory under map_cache was created apparently with such access rights after my command line testing that the apache "www-data" user did not have rights to write to that directory. I gave www-data the rights to map_cache using chown, then deleted the contents of map_cache and then it started to work. Which was nice.

So, thanks a thousand for this. Now it's time to backup my precious Finnish TopoMaps cache and start playing with Mappero....
 
Posts: 6 | Thanked: 2 times | Joined on Dec 2009
#17
I declare victory! Had to fight a bit with crashing Mappero (it did not want to add new repositories) and then had to figure out how to actually connect to my server through firewall.

But what a reward, Kansalaisen Karttapaikka at least works like a charm. And it's actually pretty fast too.

Once more, a BIG thank you for this gem of a script!
 
Posts: 18 | Thanked: 4 times | Joined on Jan 2010
#18
Originally Posted by samivee View Post
I declare victory! Had to fight a bit with crashing Mappero (it did not want to add new repositories) and then had to figure out how to actually connect to my server through firewall.

But what a reward, Kansalaisen Karttapaikka at least works like a charm. And it's actually pretty fast too.

Once more, a BIG thank you for this gem of a script!
Yes!!!!! It works.... And is suprisingly fast!! What a great start for the weekend!! Thanks orava
 
Posts: 4 | Thanked: 0 times | Joined on Dec 2010
#19
Hi

I tried to get it work but no luck.
It seems it downloads one png file to map_cache.

Code:
MOD_PYTHON ERROR

ProcessId:      14029
Interpreter:    'localhost.localdomain'

ServerName:     'localhost.localdomain'
DocumentRoot:   '/var/www'

URI:            '/py/map.py'
Location:       None
Directory:      '/var/www/'
Filename:       '/var/www/py/map.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mod_python.publisher'

Traceback (most recent call last):

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 213, in handler
    published = publish_object(req, object)

  File "/usr/lib/python2.6/dist-packages/mod_python/publisher.py", line 425, in publish_object
    return publish_object(req,util.apply_fs_data(object, req.form, req=req))

  File "/usr/lib/python2.6/dist-packages/mod_python/util.py", line 554, in apply_fs_data
    return object(**args)

  File "/var/www/py/map.py", line 513, in index
    im = getTile(z,x,y, service)

  File "/var/www/py/map.py", line 97, in getTile
    gdal.FileFromMemBuffer('/vsimem/pnginmem', png_buf.getvalue())

AttributeError: 'module' object has no attribute 'FileFromMemBuffer'


MODULE CACHE DETAILS

Accessed:       Sun Dec 12 02:25:33 2010
Generation:     10

_mp_fd12b95901119bc5973f096a3acd7cf2 {
  FileName:     '/var/www/py/coordinates.py'
  Instance:     1
  Generation:   1
  Modified:     Fri Aug  6 16:36:29 2010
  Imported:     Sun Dec 12 02:07:22 2010
}

_mp_67ddd361d50674d6ee9af4d957be66c6 {
  FileName:     '/var/www/py/fetch_map.py'
  Instance:     3
  Generation:   9
  Modified:     Sun Dec 12 02:13:59 2010
  Imported:     Sun Dec 12 02:14:02 2010
  Children:     '/var/www/py/coordinates.py',
                '/var/www/py/fms.py',
                '/var/www/py/fms_kkp.py',
                '/var/www/py/fms_rka.py'
}

_mp_c5e1beab0460b294bbab446b8d633cf6 {
  FileName:     '/var/www/py/fms.py'
  Instance:     1
  Generation:   2
  Modified:     Thu Feb 11 22:01:48 2010
  Imported:     Sun Dec 12 02:07:22 2010
}

_mp_f5f3091beb3a9fcdc266bb60b0f0d9f2 {
  FileName:     '/var/www/py/fms_kkp.py'
  Instance:     1
  Generation:   3
  Modified:     Sat Dec 11 22:42:48 2010
  Imported:     Sun Dec 12 02:07:22 2010
  Children:     '/var/www/py/coordinates.py',
                '/var/www/py/fms.py'
}

_mp_3b50c43383e854a21433025c31deeaff {
  FileName:     '/var/www/py/fms_rka.py'
  Instance:     1
  Generation:   4
  Modified:     Wed Nov  3 13:50:13 2010
  Imported:     Sun Dec 12 02:07:22 2010
  Children:     '/var/www/py/coordinates.py',
                '/var/www/py/fms.py'
}

_mp_9c79b27f7f602d61fc4d48f3a5f2dbac {
  FileName:     '/var/www/py/map.py'
  Instance:     3
  Generation:   10
  Modified:     Sun Dec 12 02:12:56 2010
  Imported:     Sun Dec 12 02:14:02 2010
  Children:     '/var/www/py/coordinates.py',
                '/var/www/py/fetch_map.py'
}
running map.py from console loads more maps but then fails.


Code:
python map.py -z 7 -x 72 -y 36 -s kkp2
Progress: 0.0 %, images left 4 (cached, fetched, blank: 0, 4, 0)
Fetched map image (N,E)=(6540000.00, 0.00)
Progress: 25.0 %, images left 3 (cached, fetched, blank: 0, 3, 0)
Fetched map image (N,E)=(6540000.00, 300000.00)
Progress: 50.0 %, images left 2 (cached, fetched, blank: 0, 2, 0)
Fetched map image (N,E)=(6812500.00, 0.00)
Progress: 75.0 %, images left 1 (cached, fetched, blank: 0, 1, 0)
Fetched map image (N,E)=(6812500.00, 300000.00)
Traceback (most recent call last):
  File "map.py", line 499, in <module>
    main()
  File "map.py", line 489, in main
    im = getTile(z,x,y,service)
  File "map.py", line 97, in getTile
    gdal.FileFromMemBuffer('/vsimem/pnginmem', png_buf.getvalue())
AttributeError: 'module' object has no attribute 'FileFromMemBuffer'
I was just wondering what could be wrong...
 
Posts: 11 | Thanked: 4 times | Joined on Dec 2009 @ Finland
#20
Tanheis
You might have older vesion of libgdal installed.


I seem to have found a bug in the script.

Name:  Screenshot-20101212-101456.jpg
Views: 1457
Size:  25.8 KB
map.py?kpp/15/18606/9313.png
 

The Following User Says Thank You to purgiaali For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 11:23.