maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   License for Finnish topo maps has expired? (https://talk.maemo.org/showthread.php?t=65922)

ofroberg 2011-04-05 12:12

Re: License for Finnish topo maps has expired?
 
Doesn't seem to be much easier in 11.04 either:

Code:

$ sudo apt-get install proj-bin libgdal1-1.7.0 python-gdal python-imaging
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgdal1-1.7.0
E: Couldn't find any package by regex 'libgdal1-1.7.0'

How did you guys install libgdal1-1.7.0?

matinvesi 2011-04-06 12:57

Re: License for Finnish topo maps has expired?
 
libgdal versio on ehkä jo jäänyt pois. Varmista saatavilla oleva versionumero, ehkä 1.8.0.

jussihoo 2011-04-06 16:02

Re: License for Finnish topo maps has expired?
 
Quote:

Originally Posted by ofroberg (Post 982344)
Doesn't seem to be much easier in 11.04 either:

Code:

$ sudo apt-get install proj-bin libgdal1-1.7.0 python-gdal python-imaging
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgdal1-1.7.0
E: Couldn't find any package by regex 'libgdal1-1.7.0'

How did you guys install libgdal1-1.7.0?

I had the same problems when installing libgdal1-1.7.0 on Ubuntu 10.10. I installed "ubuntugis-unstable" repository and then I somehow got the libgdal installed as well. I had to install proj-bin, libgdall, python-gdal and python-imaging one by one and I even revert the "ubuntugis-unstable" repo from maverick to karmic, installed and re-installed and then returned to maverick. I am not actually sure how I got it working after all.

I also had some issues with permissions and other issues but finally got it working. Big thanks to orava once again!

Right now I was able to set-up wake on lan to the topo server. So now I can start it over the internet and get maps whenever I need and whenever I don't have them allready on my N900 or on my N810. And after two hours of inactivity the server goes to sleep. Now this is purfect!!

ssillanp 2011-04-19 14:47

Re: License for Finnish topo maps has expired?
 
Quote:

Originally Posted by tanheis (Post 896944)
Got it working.
Thanks for the script!


Hi, I seem to have exactly the same problem you did. My www-browser outputs the following
Code:

MOD_PYTHON ERROR

ProcessId:      1428
Interpreter:    '127.0.1.1'

ServerName:    '127.0.1.1'
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:      Tue Apr 19 17:34:35 2011
Generation:    8

_mp_fd12b95901119bc5973f096a3acd7cf2 {
  FileName:    '/var/www/py/coordinates.py'
  Instance:    1
  Generation:  2
  Modified:    Fri Aug  6 16:36:29 2010
  Imported:    Tue Apr 19 17:03:18 2011
}

_mp_67ddd361d50674d6ee9af4d957be66c6 {
  FileName:    '/var/www/py/fetch_map.py'
  Instance:    1
  Generation:  6
  Modified:    Sun Apr 10 21:10:33 2011
  Imported:    Tue Apr 19 17:03:18 2011
  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:  3
  Modified:    Thu Feb 11 22:01:48 2010
  Imported:    Tue Apr 19 17:03:18 2011
}

_mp_f5f3091beb3a9fcdc266bb60b0f0d9f2 {
  FileName:    '/var/www/py/fms_kkp.py'
  Instance:    1
  Generation:  4
  Modified:    Sun Apr 10 21:10:33 2011
  Imported:    Tue Apr 19 17:03:18 2011
  Children:    '/var/www/py/coordinates.py',
                '/var/www/py/fms.py'
}

_mp_3b50c43383e854a21433025c31deeaff {
  FileName:    '/var/www/py/fms_rka.py'
  Instance:    1
  Generation:  5
  Modified:    Wed Nov  3 13:50:13 2010
  Imported:    Tue Apr 19 17:03:19 2011
  Children:    '/var/www/py/coordinates.py',
                '/var/www/py/fms.py'
}

_mp_9c79b27f7f602d61fc4d48f3a5f2dbac {
  FileName:    '/var/www/py/map.py'
  Instance:    2
  Generation:  8
  Modified:    Tue Apr 19 17:08:13 2011
  Imported:    Tue Apr 19 17:08:20 2011
  Children:    '/var/www/py/coordinates.py',
                '/var/www/py/fetch_map.py'
}

How did you solve this? My libgdal1 version is 1.7.0.

javali 2011-04-20 07:17

Re: License for Finnish topo maps has expired?
 
I had to do the following modifications to get it work with libgdal-1.7.2

--- map.py.ori 2011-04-08 15:59:56.000000000 +0300
+++ map.py 2011-04-08 16:01:01.000000000 +0300
@@ -125,7 +125,7 @@
in_ds.SetGCPs( gcp_list, in_ds.GetProjection() )

out_srs = osr.SpatialReference()
- out_srs.ImportFromEPSG(900913)
+ out_srs.ImportFromEPSG(3857)
out_ds = gdal.AutoCreateWarpedVRT( in_ds, in_srs.ExportToWkt(), out_srs.ExportToWkt() )

gt = out_ds.GetGeoTransform()

ssillanp 2011-04-20 13:54

Re: License for Finnish topo maps has expired?
 
Quote:

Originally Posted by javali (Post 992305)
I had to do the following modifications to get it work with libgdal-1.7.2

--- map.py.ori 2011-04-08 15:59:56.000000000 +0300
+++ map.py 2011-04-08 16:01:01.000000000 +0300
@@ -125,7 +125,7 @@
in_ds.SetGCPs( gcp_list, in_ds.GetProjection() )

out_srs = osr.SpatialReference()
- out_srs.ImportFromEPSG(900913)
+ out_srs.ImportFromEPSG(3857)
out_ds = gdal.AutoCreateWarpedVRT( in_ds, in_srs.ExportToWkt(), out_srs.ExportToWkt() )

gt = out_ds.GetGeoTransform()

Hi, Thanks a million, that did the trick, also with libgdal1-1.7.0.

orava 2011-04-29 13:22

Re: License for Finnish topo maps has expired?
 
2 Attachment(s)
I've been working on a map application called "Mapsi" that uses map tiles from Paikkatietoikkuna.

Current features are:
  • Downloading and viewing map tiles
  • Map tiles saving to database for offline use
  • GPS support
  • Support for landmarks
  • Creating maps from selected area

Version 1.0.0 will probably be released next week. Couple screenshots attached.

Update:
Version 1.0.0 is now in extras-devel in "non-free" section(http://repository.maemo.org/extras-d....0.0_armel.deb). I set application category wrong so at the moment you'll need to download and install it manually (dpkg -i mapsi_1.0.0_armel.deb). At first run cookie from Paikkatietoikkuna is downloaded so Internet connection is required.

Mandibela 2011-04-30 09:13

Re: License for Finnish topo maps has expired?
 
Missing deps, even if I have PR1.3 installed. libqtm-11 and libqtm-11-location.

orava 2011-04-30 09:51

Re: License for Finnish topo maps has expired?
 
Quote:

Originally Posted by Mandibela (Post 997743)
Missing deps, even if I have PR1.3 installed. libqtm-11 and libqtm-11-location.

Hmm.. I guess that you'll need to enable extras-devel to get those packages.

_mikey 2011-05-02 12:58

Re: License for Finnish topo maps has expired?
 
Hi, I installed prereqs using X-term and then Mapsi successfully.
Mapsi starts with blank (black) screen. So its not working properly.

When its working:
Is it possible to select needed maps from Paikkatietoikkuna like marine etc?


All times are GMT. The time now is 15:59.

vBulletin® Version 3.8.8