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?

orava 2011-05-02 17:59

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

Originally Posted by _mikey (Post 998833)
Hi, I installed prereqs using X-term and then Mapsi successfully.
Mapsi starts with blank (black) screen. So its not working properly.

Could you try to run it from X-term and see whether any output is written to terminal. Also if you could check is there "/home/user/MyDocs/.mapsi" directory and in that dir is there "settings.ini" file.

Quote:

Originally Posted by _mikey (Post 998833)
When its working:
Is it possible to select needed maps from Paikkatietoikkuna like marine etc?

At the moment Mapsi only uses "background" map from Paikkatietoikkuna and layers aren't supported.

Mandibela 2011-05-03 07:01

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

Originally Posted by orava (Post 997757)
Hmm.. I guess that you'll need to enable extras-devel to get those packages.

Yes, I had it enabled. Had to install them manually. Mapsi works!

It has a drawing bug on the bottom scale/distance slider.

Looks promising..

niekko 2011-05-03 18:17

Re: License for Finnish topo maps has expired?
 
I had the black screen issue as well. I ran mapsi from the terminal (/opt/usr/bin/Mapsi) and saw this:

Code:

qrc:/qml/Main.qml:1:1: module "QtQuick" is not installed
So, I installed the required package (qtquickcompat) and mapsi is now working.

Metsämies 2011-05-03 18:55

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

Originally Posted by orava (Post 997757)
Hmm.. I guess that you'll need to enable extras-devel to get those packages.

Extras-devel is enabled, not found!

orava 2011-05-04 07:11

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

Originally Posted by Metsämies (Post 999589)
Extras-devel is enabled, not found!

Make sure you have line "deb http://repository.maemo.org/extras-devel fremantle free" in file "/etc/apt/sources.list.d/hildon-application-manager.list", and then try "apt-get update && apt-get install libqtm-11-location qtquickcompat". Or you can download and install those manually (http://repository.maemo.org/extras-d...tle8_armel.deb, http://repository.maemo.org/extras-d....1.0_armel.deb).

Metsämies 2011-05-04 16:15

Re: License for Finnish topo maps has expired?
 
Something is still wrong? I got still following messages:

Building dependency tree
Reading state information... Done
libqtm-11-location is already the newest version.
qtquickcompat is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
mapsi: Depends: libqtm-11 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
/home/user #

Actually Mapsi without icon is installed, but when I click it, only black screen is shown.

orava 2011-05-04 17:52

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

Originally Posted by Metsämies (Post 1000115)
Something is still wrong? I got still following messages:

Building dependency tree
Reading state information... Done
libqtm-11-location is already the newest version.
qtquickcompat is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
mapsi: Depends: libqtm-11 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
/home/user #

Actually Mapsi without icon is installed, but when I click it, only black screen is shown.

That libqtm-11 package is not actually needed, I will remove it from depends list when I upload next version.

You can try to run it from terminal to see if any error messages show up.

The icon probably appears after reboot.

_mikey 2011-05-04 19:02

Re: License for Finnish topo maps has expired?
 
Reboot and installing qtquickcompat fixed my blank Mapsi problem.
Looks and works great.

Is it possible to delete landmarks?

javali 2011-05-05 06:03

Re: License for Finnish topo maps has expired?
 
With the following patch and the latest fetch_map_v30l i was able to get the limit of cadastral units (kiinteistörajat) to my Maemo Mapper on N810.
The usage is like orto but word orto is replaced by ktjraja
for example URL:
http://YourServerIP/MapDir/map.py?ktjraja/%0d/%d/%d.png
or
http://YourServerIP/MapDir/map.py?kt.../%0d/%d/%d.png
Code:

--- map.py.ori        2011-04-08 15:59:56.000000000 +0300
+++ map.py        2011-04-27 09:13:11.000000000 +0300
@@ -39,6 +39,14 @@
        orto = 1
        SERVICE_CODE = 'kkp2'
 
+    ktjraja = 0
+    if SERVICE_CODE == 'ktjraja':
+      ktjraja = 1
+      SERVICE_CODE = 'kkp'
+    elif SERVICE_CODE == 'ktjraja2':
+      ktjraja = 1
+      SERVICE_CODE = 'kkp2'
+
    # Kansalaisen karttapaikka
    if SERVICE_CODE == 'kkp':
        if z < z_levels_kkp[0] or z > z_levels_kkp[1]:
@@ -87,6 +95,9 @@
    if( orto ):
        fmservice.HandleParameter("--orto")
 
+    if( ktjraja ):
+        fmservice.HandleParameter("--ktjraja")
+
    (COORDTYPE, C_E, C_N) = fmservice.TranslateToServiceCoordinatesXY(COORDTYPE, c_coords['E'], c_coords['N'])
    (im, ozi_map_data) = Fetch_And_Return_Map(fmservice, COORDTYPE, C_N, C_E, size, size, parameters)
 
@@ -125,7 +136,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()


orava 2011-05-05 09:06

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

Originally Posted by _mikey (Post 1000200)
Is it possible to delete landmarks?

If you press and hold landmarks icon you will get menu from where you can clear all landmarks. I will add support for deleting single landmarks in the next version.

tplastic 2011-05-05 12:52

Re: License for Finnish topo maps has expired?
 
Nice to have a new working option to the discontinued Finnish topomaps in Mappero. Was about to set up a map server according to the instructions in this thread but this is more convenient option. Many thanks for the effort!

Some suggestions and comments:
* Program opens fast, nice! The layout is beautiful and functionality very decent at the moment. No problems in setup. Looks promising indeed!
* When zooming in or out, it would be nice if the current map would immediately zoom in/out (as in Mappero) so that the user would not need to watch the blank screen during map downloading
* Option for continuous centering by current GPS location would be nice
* Option for automatic screen orientation would be nice. I noticed that shift+ctrl+r works. Maybe it could be default setting?
* Possible bug: when I open the landmark entry screen and tap to a Name or description field, the program closes immediately
* Possible bug: when I try to import landmarks, the program gives an error: "Failed to import landmarks from 'import.gpx'".

Couple of times when I have opened the program, it does not load map tiles even when the connection is fine (3G). May this be related to limitations of Paikkatietokanta? Do they follow the IP addresses and limit excess downloading from same address?

Metsämies 2011-05-05 15:48

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

Originally Posted by orava (Post 1000162)
That libqtm-11 package is not actually needed, I will remove it from depends list when I upload next version.

You can try to run it from terminal to see if any error messages show up.

The icon probably appears after reboot.

Well, maybe I'll wait for the next version. I uninstalled Mapsi and then tried to install again. Dpkg gave error message: Dependency problems prevent configuration of Mapsi: mapsi depends on libqtm-11...

And libqtm-11 is installed!

orava 2011-05-05 18:24

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

Originally Posted by tplastic (Post 1000595)
* When zooming in or out, it would be nice if the current map would immediately zoom in/out (as in Mappero) so that the user would not need to watch the blank screen during map downloading

I guess that this would be pretty hard to impelement but I will look into it.

Quote:

* Option for continuous centering by current GPS location would be nice
This feature actually already exists, press and hold GPS position icon in top right corner to enable it.

Quote:

* Option for automatic screen orientation would be nice. I noticed that shift+ctrl+r works. Maybe it could be default setting?
Will be added but probably not yet in the next version.

Quote:

* Possible bug: when I open the landmark entry screen and tap to a Name or description field, the program closes immediately.
Yes I have discovered this also but I couldn't fix it yet. When I compile and run Mapsi on Windows it works fine, so it might be that there's bug in Maemos Qt implementation.

Quote:

* Possible bug: when I try to import landmarks, the program gives an error: "Failed to import landmarks from 'import.gpx'"
At the moment landmarks are imported from file "/home/user/MyDocs/.mapsi/import.gpx" and exported to ".../.mapsi/export.gpx". Supported import formats are Gpx 1.1, Kml, Kmz and Lmx. I will add possibility to select import/export file maybe in the next version.

Quote:

Couple of times when I have opened the program, it does not load map tiles even when the connection is fine (3G). May this be related to limitations of Paikkatietokanta? Do they follow the IP addresses and limit excess downloading from same address?
I don't think that there are any download limitations. In the settings menu the icon with two arrows can be used to enable/disable use of WMS(Web Map Service). If you have WMS disabled map tiles won't be downloaded. You can also try to change used WMS server by pressing and holding that WMS icon. (Paikkatietoikkuna has 4 WMS servers)

tplastic 2011-05-06 07:53

Re: License for Finnish topo maps has expired?
 
Thanks for the clarifications.

Quote:

Originally Posted by orava (Post 1000754)
I guess that this would be pretty hard to impelement but I will look into it.

It seems that in Mappero the existing map is simply scaled up/down with some graphics algoritm without extra- or interpolating the data. Then new map substitutes this when downloaded.

Quote:

Originally Posted by orava (Post 1000754)
This feature actually already exists, press and hold GPS position icon in top right corner to enable it.

Very nice!

Quote:

Originally Posted by orava (Post 1000754)
At the moment landmarks are imported from file "/home/user/MyDocs/.mapsi/import.gpx" and exported to ".../.mapsi/export.gpx". Supported import formats are Gpx 1.1, Kml, Kmz and Lmx. I will add possibility to select import/export file maybe in the next version.

Tried this by copying up-to-date speedcamera .gpx file to right location and renaming it to import.gpx. The result however was the same "Failed to import landmarks from 'import.gpx'". The same file works fine with Mappero.

Quote:

Originally Posted by orava (Post 1000754)
I don't think that there are any download limitations. In the settings menu the icon with two arrows can be used to enable/disable use of WMS(Web Map Service). If you have WMS disabled map tiles won't be downloaded. You can also try to change used WMS server by pressing and holding that WMS icon. (Paikkatietoikkuna has 4 WMS servers)

This might be the case. Have to check this next time.

Anyway the package is already so good that I'll prefer this over Mappero in most cases. Thanks once again!

hyrra 2011-05-13 10:08

Re: License for Finnish topo maps has expired?
 
I have also blank screen problem. I ran Mapsi in x-term:

~ $ /opt/usr/bin/Mapsi .Mapsi
Unsupported date format character at 1 (%-d.%-m.)
qrc:/qml/Main.qml:55:5: Type MapArea unavailable
qrc:/qml/MapArea.qml:2:1: module "QtMobility.location" is not installed

What I should to do? I tried to install QtMobility.location but I'm not sure which package is right one...

orava 2011-05-13 11:25

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

Originally Posted by hyrra (Post 1005401)
I have also blank screen problem. I ran Mapsi in x-term:

~ $ /opt/usr/bin/Mapsi .Mapsi
Unsupported date format character at 1 (%-d.%-m.)
qrc:/qml/Main.qml:55:5: Type MapArea unavailable
qrc:/qml/MapArea.qml:2:1: module "QtMobility.location" is not installed

What I should to do? I tried to install QtMobility.location but I'm not sure which package is right one...

There's now version 2.0.0(http://talk.maemo.org/showthread.php?t=72982) in extras-devel that can be installed with application manager and it should also install correct dependencies.

hyrra 2011-05-13 13:50

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

Originally Posted by orava (Post 1005436)
There's now version 2.0.0(http://talk.maemo.org/showthread.php?t=72982) in extras-devel that can be installed with application manager and it should also install correct dependencies.

Yes I installed just that 2.0.0 yesterday but I got those problem with it. I haven't installed any previous version, only 2.0.0.

orava 2011-05-13 17:08

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

Originally Posted by hyrra (Post 1005521)
Yes I installed just that 2.0.0 yesterday but I got those problem with it. I haven't installed any previous version, only 2.0.0.

I guess that libqtm-11-declarative is the package you'll need. I had forgotten to add that to dependencies list.

hyrra 2011-05-14 09:56

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

Originally Posted by orava (Post 1005658)
I guess that libqtm-11-declarative is the package you'll need. I had forgotten to add that to dependencies list.

Thanks! Lot of package errors when I installed that but Mapsi works. I haven't noticed new 2.0.0 thread and posted my question here, sorry about that.

ofroberg 2011-05-18 07:48

Re: License for Finnish topo maps has expired?
 
Omg yes, kiitos!!

ofroberg 2011-05-18 09:09

Re: License for Finnish topo maps has expired?
 
Would it be possible to add an option to use nautical miles instead of km?

Braveslice 2011-07-12 10:42

Re: License for Finnish topo maps has expired?
 
N800 -->I’m currently using fetch_map to download a map as a picture in format of png. Then I use Hike as a navigation tool.

fetch_map supports multiple formats, surely there is a tool to translate the map directly for Navit use (or maemo mapper)?

Fetch_map currently supports:
Map – Ozi Explorer map data
Cal – FreeTrack CAL file
Gux – GPSU GUX
Tab – MapInfo tab file
Esri _esri world file

Edit: Oh well, right after asking I found a probable tool capable for that: MAPC2MAPC
It should be able to convert ozi to carmin format; witch is then supported by Navit. It is sad that Navit seems to be very difficult program to use.

Btw, Do you know if it is possible to use garmin Finnish topomaps directly in Navit?


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

vBulletin® Version 3.8.8