Re: [OSM-dev] Changing language in tile server

2013-08-12 Thread Sven Geggus
Gurpinder Chahal chahalgurpinde...@gmail.com wrote:

 I'm trying to change language in my OSM tile server.
 I have modified my fontset-settings.xml.inc and osm.xml. But these
 things didn't worked. These just gave rectangular boxes on my map.

Can you describe in more detail what you tried to do?

I have l10n stuff in our german mapnik style (the one used at
http://openstreetmap.de/karte.html) which can be also used for
any other languages using latin script (french, spanish, ..)

You will basically need the following:
* separate colums in database for int_name, name:en, name:yourlang
  or hstore (which is what I recomend).
* replacement of all select name by select 
yourfunc(name,int_name,name:en,name:yourlang) as name
* PL/pgSQL function from 
http://svn.openstreetmap.org/applications/rendering/mapnik-german/views/get_localized_name.sql
* optional Transliteration code is here:
  
http://svn.openstreetmap.org/applications/rendering/mapnik-german/utf8translit/

Our get_localized_name function can be used for any language using latin
script. If you e.g. want to prefer spanish use it like this:

get_germanified_name(name,name:es,int_name,name:en) as name

name:en is used as an alterative to int_name in case name is not latin
script.

Known issues with transliteration currently are:
* Thai Language uses ISO 11940 rather than RTGS
* Kanji Transliteration produces chinese rather than japanese

Regards

Sven

P.S.: Minimal (sorry) documentation of the i10n stuff is here:
http://svn.openstreetmap.org/applications/rendering/mapnik-german/README.i10n
http://svn.openstreetmap.org/applications/rendering/mapnik-german/utf8translit/README

-- 
Das ist halt der Unterschied: Unix ist ein Betriebssystem mit Tradition,
 die anderen sind einfach von sich aus unlogisch.
  (Anselm Lingnau in de.comp.os.unix.discussion)
/me ist giggls@ircnet, http://sven.gegg.us/ im WWW

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osmcoastline install question

2013-08-12 Thread Jochen Topf
On Sun, Aug 11, 2013 at 01:25:47PM -0700, Jeff Meyer wrote:
 Does anyone have any experience with osmcoastline installations (Jochen,
 obviously!)?
 
 I'm getting the following error from runtest.sh after setup:
 
 $ ./runtest.sh
 Enabled debug option
 [ 0:00] Using SRS 4326 for output. (Change with the --srs/s option.)
 [ 0:00] Writing to output database 'testdata.db'. (Was set with the
 --output-database/-o option.)
 [ 0:00] Removing database output file (if it exists) (because you told me
 to with --overwrite/-f).
 [ 0:00] Will create geometry index. (If you do not want an index use
 --no-index/-i.)
 [12:54] Reading from file 'testdata.osm'.
 [12:54] Reading ways (1st pass through input file)...
 [12:54]   There are 19 nodes where the coastline is not closed.
 [12:54]   There are 36 coastline rings (16 from a single way and 20 from
 multiple ways).
 [12:54] Memory used currently: 205 MB (Peak was: 205 MB).
 [12:54] Reading nodes (2nd pass through input file)...
 ERROR 1: In CreateFeature(): sqlite3_prepare(INSERT INTO 'error_points'
 (GEOMETRY,osm_id,error) VALUES (?,?,?)):
   table error_points has no column named GEOMETRY
 Failed to create feature on layer 'error_points'.
 $
 
 spatialite .schema error_points
 CREATE TABLE 'error_points' (   OGC_FID INTEGER PRIMARY KEY, 'osm_id'
 VARCHAR, 'error' VARCHAR);
 spatialite
 
 Not sure what's going on here, so thanks in advance for any help.

Probably old spatialite and/or gdal lib. The spatialite format changed at
some point and this leads to some confusion. You need GDAL 1.7 or later.
If thats not the problem tell us something more about your setup (os
version, lib versions etc.)

Jochen
-- 
Jochen Topf  joc...@remote.org  http://www.jochentopf.com/  +49-721-388298

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Improvement to openstreetmap.org for mobile devices

2013-08-12 Thread Mark Newnham
Stemming from a discussion on a diary entry I created 
http://www.openstreetmap.org/user/Mark%20Newnham/diary/19723 , I'm trying to 
start a project about getting an improved home screen for openstreetmap.org 
when someone lands there while using a mobile device,especially a small device 
like a smartphone. I feel that it is extremely unfriendly (i know, i've used 
it) and that many potential contributors could be frightened away simply by the 
fact that there is no explanation to what is going on. A redirect to an 
extremely simple mobile framework screen would be better than what is going on 
now.
I've recently placed a request in to the wiki team to get the mobile frontend 
installed on the wiki as part of the same request.
I'm assuming that the mobile interface would have to be built in ruby, and I've 
no experience at all in that, and no real time to learn it. I've loads of 
experience in  php/javascript development and have used jquery wrappers to 
build mobile web apps, but I'm happy to be involved in building prototypes and  
to donate bandwidth and disk space to such a project.
I originally placed this message on the development forum, and it was suggested 
it should be placed here for a better response, so here it is...___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osmcoastline install question

2013-08-12 Thread Jeff Meyer
I thought I was up to date, but perhaps some bindings or compile flags
weren't set properly?

Kernel 3.2.0-38-generic
Ubuntu 12.04
(uname -a:  Linux hackercoop 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19
12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

gdal: 1.9.2
Boost is 1.49
Zlib is 1.28

$ spatialite --version
SpatiaLite version ..: 4.1.1 Supported Extensions:
- 'VirtualShape' [direct Shapefile access]
- 'VirtualDbf' [direct DBF access]
- 'VirtualText' [direct CSV/TXT access]
- 'VirtualNetwork' [Dijkstra shortest path]
- 'RTree' [Spatial Index - R*Tree]
- 'MbrCache' [Spatial Index - MBR cache]
- 'VirtualSpatialIndex' [R*Tree metahandler]
- 'VirtualFDO' [FDO-OGR interoperability]
- 'SpatiaLite' [Spatial SQL - OGC]
PROJ.4 version ..: Rel. 4.8.0, 6 March 2012
GEOS version : 3.3.7-CAPI-1.7.7
3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e

What other libraries should I include?

Thanks!
Jeff




On Mon, Aug 12, 2013 at 5:43 AM, Jochen Topf joc...@remote.org wrote:

 On Sun, Aug 11, 2013 at 01:25:47PM -0700, Jeff Meyer wrote:
  Does anyone have any experience with osmcoastline installations (Jochen,
  obviously!)?
 
  I'm getting the following error from runtest.sh after setup:
 
  $ ./runtest.sh
  Enabled debug option
  [ 0:00] Using SRS 4326 for output. (Change with the --srs/s option.)
  [ 0:00] Writing to output database 'testdata.db'. (Was set with the
  --output-database/-o option.)
  [ 0:00] Removing database output file (if it exists) (because you told me
  to with --overwrite/-f).
  [ 0:00] Will create geometry index. (If you do not want an index use
  --no-index/-i.)
  [12:54] Reading from file 'testdata.osm'.
  [12:54] Reading ways (1st pass through input file)...
  [12:54]   There are 19 nodes where the coastline is not closed.
  [12:54]   There are 36 coastline rings (16 from a single way and 20 from
  multiple ways).
  [12:54] Memory used currently: 205 MB (Peak was: 205 MB).
  [12:54] Reading nodes (2nd pass through input file)...
  ERROR 1: In CreateFeature(): sqlite3_prepare(INSERT INTO 'error_points'
  (GEOMETRY,osm_id,error) VALUES (?,?,?)):
table error_points has no column named GEOMETRY
  Failed to create feature on layer 'error_points'.
  $
 
  spatialite .schema error_points
  CREATE TABLE 'error_points' (   OGC_FID INTEGER PRIMARY KEY, 'osm_id'
  VARCHAR, 'error' VARCHAR);
  spatialite
 
  Not sure what's going on here, so thanks in advance for any help.

 Probably old spatialite and/or gdal lib. The spatialite format changed at
 some point and this leads to some confusion. You need GDAL 1.7 or later.
 If thats not the problem tell us something more about your setup (os
 version, lib versions etc.)

 Jochen
 --
 Jochen Topf  joc...@remote.org  http://www.jochentopf.com/  +49-721-388298




-- 
Jeff Meyer
Global World History Atlas
www.gwhat.org
j...@gwhat.org
206-676-2347

OpenStreetMap: Mapping with a Human Touch
osm: Open Historical Map
(OHM)http://wiki.openstreetmap.org/wiki/Open_Historical_Map
 / my OSM user page http://www.openstreetmap.org/user/jeffmeyer
t: @GWHAThistory https://twitter.com/GWHAThistory
f: GWHAThistory https://www.facebook.com/GWHAThistory
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osmcoastline install question

2013-08-12 Thread Jochen Topf
Hi!

it runs for me on a plain Ubuntu 12.04. Some library versions you have are
different from what I have on that system. Did you install them yourself?
Try using the versions supplied as Ubuntu packages. I think Osmium is the
only library on that system that you need to install yourself, everything
elseo should be okay out of the box.

Jochen

On Mon, Aug 12, 2013 at 08:18:47AM -0700, Jeff Meyer wrote:
 Date: Mon, 12 Aug 2013 08:18:47 -0700
 From: Jeff Meyer j...@gwhat.org
 To: Jochen Topf joc...@remote.org
 Cc: dev@openstreetmap.org dev@openstreetmap.org
 Subject: Re: [OSM-dev] osmcoastline install question
 
 I thought I was up to date, but perhaps some bindings or compile flags
 weren't set properly?
 
 Kernel 3.2.0-38-generic
 Ubuntu 12.04
 (uname -a:  Linux hackercoop 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19
 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 
 gdal: 1.9.2
 Boost is 1.49
 Zlib is 1.28
 
 $ spatialite --version
 SpatiaLite version ..: 4.1.1 Supported Extensions:
 - 'VirtualShape' [direct Shapefile access]
 - 'VirtualDbf' [direct DBF access]
 - 'VirtualText' [direct CSV/TXT access]
 - 'VirtualNetwork' [Dijkstra shortest path]
 - 'RTree' [Spatial Index - R*Tree]
 - 'MbrCache' [Spatial Index - MBR cache]
 - 'VirtualSpatialIndex' [R*Tree metahandler]
 - 'VirtualFDO' [FDO-OGR interoperability]
 - 'SpatiaLite' [Spatial SQL - OGC]
 PROJ.4 version ..: Rel. 4.8.0, 6 March 2012
 GEOS version : 3.3.7-CAPI-1.7.7
 3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
 
 What other libraries should I include?
 
 Thanks!
 Jeff
 
 
 
 
 On Mon, Aug 12, 2013 at 5:43 AM, Jochen Topf joc...@remote.org wrote:
 
  On Sun, Aug 11, 2013 at 01:25:47PM -0700, Jeff Meyer wrote:
   Does anyone have any experience with osmcoastline installations (Jochen,
   obviously!)?
  
   I'm getting the following error from runtest.sh after setup:
  
   $ ./runtest.sh
   Enabled debug option
   [ 0:00] Using SRS 4326 for output. (Change with the --srs/s option.)
   [ 0:00] Writing to output database 'testdata.db'. (Was set with the
   --output-database/-o option.)
   [ 0:00] Removing database output file (if it exists) (because you told me
   to with --overwrite/-f).
   [ 0:00] Will create geometry index. (If you do not want an index use
   --no-index/-i.)
   [12:54] Reading from file 'testdata.osm'.
   [12:54] Reading ways (1st pass through input file)...
   [12:54]   There are 19 nodes where the coastline is not closed.
   [12:54]   There are 36 coastline rings (16 from a single way and 20 from
   multiple ways).
   [12:54] Memory used currently: 205 MB (Peak was: 205 MB).
   [12:54] Reading nodes (2nd pass through input file)...
   ERROR 1: In CreateFeature(): sqlite3_prepare(INSERT INTO 'error_points'
   (GEOMETRY,osm_id,error) VALUES (?,?,?)):
 table error_points has no column named GEOMETRY
   Failed to create feature on layer 'error_points'.
   $
  
   spatialite .schema error_points
   CREATE TABLE 'error_points' (   OGC_FID INTEGER PRIMARY KEY, 'osm_id'
   VARCHAR, 'error' VARCHAR);
   spatialite
  
   Not sure what's going on here, so thanks in advance for any help.
 
  Probably old spatialite and/or gdal lib. The spatialite format changed at
  some point and this leads to some confusion. You need GDAL 1.7 or later.
  If thats not the problem tell us something more about your setup (os
  version, lib versions etc.)
 
  Jochen
  --
  Jochen Topf  joc...@remote.org  http://www.jochentopf.com/  +49-721-388298
 
 
 
 
 -- 
 Jeff Meyer
 Global World History Atlas
 www.gwhat.org
 j...@gwhat.org
 206-676-2347
 
 OpenStreetMap: Mapping with a Human Touch
 osm: Open Historical Map
 (OHM)http://wiki.openstreetmap.org/wiki/Open_Historical_Map
  / my OSM user page http://www.openstreetmap.org/user/jeffmeyer
 t: @GWHAThistory https://twitter.com/GWHAThistory
 f: GWHAThistory https://www.facebook.com/GWHAThistory

-- 
Jochen Topf  joc...@remote.org  http://www.jochentopf.com/  +49-721-388298

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osmcoastline install question

2013-08-12 Thread Jeff Meyer
Ah, ok... I think I had to use some non-Ubuntu flavors to make some other
packages work (PostGIS 2.0 comes to mind, but I installed that a ways
back...).

I'll try on a different box  see what happens.

Thanks!
Jeff



On Mon, Aug 12, 2013 at 8:27 AM, Jochen Topf joc...@remote.org wrote:

 Hi!

 it runs for me on a plain Ubuntu 12.04. Some library versions you have are
 different from what I have on that system. Did you install them yourself?
 Try using the versions supplied as Ubuntu packages. I think Osmium is the
 only library on that system that you need to install yourself, everything
 elseo should be okay out of the box.

 Jochen

 On Mon, Aug 12, 2013 at 08:18:47AM -0700, Jeff Meyer wrote:
  Date: Mon, 12 Aug 2013 08:18:47 -0700
  From: Jeff Meyer j...@gwhat.org
  To: Jochen Topf joc...@remote.org
  Cc: dev@openstreetmap.org dev@openstreetmap.org
  Subject: Re: [OSM-dev] osmcoastline install question
 
  I thought I was up to date, but perhaps some bindings or compile flags
  weren't set properly?
 
  Kernel 3.2.0-38-generic
  Ubuntu 12.04
  (uname -a:  Linux hackercoop 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19
  12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 
  gdal: 1.9.2
  Boost is 1.49
  Zlib is 1.28
 
  $ spatialite --version
  SpatiaLite version ..: 4.1.1 Supported Extensions:
  - 'VirtualShape' [direct Shapefile access]
  - 'VirtualDbf' [direct DBF access]
  - 'VirtualText' [direct CSV/TXT access]
  - 'VirtualNetwork' [Dijkstra shortest path]
  - 'RTree' [Spatial Index - R*Tree]
  - 'MbrCache' [Spatial Index - MBR cache]
  - 'VirtualSpatialIndex' [R*Tree metahandler]
  - 'VirtualFDO' [FDO-OGR interoperability]
  - 'SpatiaLite' [Spatial SQL - OGC]
  PROJ.4 version ..: Rel. 4.8.0, 6 March 2012
  GEOS version : 3.3.7-CAPI-1.7.7
  3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
 
  What other libraries should I include?
 
  Thanks!
  Jeff
 
 
 
 
  On Mon, Aug 12, 2013 at 5:43 AM, Jochen Topf joc...@remote.org wrote:
 
   On Sun, Aug 11, 2013 at 01:25:47PM -0700, Jeff Meyer wrote:
Does anyone have any experience with osmcoastline installations
 (Jochen,
obviously!)?
   
I'm getting the following error from runtest.sh after setup:
   
$ ./runtest.sh
Enabled debug option
[ 0:00] Using SRS 4326 for output. (Change with the --srs/s option.)
[ 0:00] Writing to output database 'testdata.db'. (Was set with the
--output-database/-o option.)
[ 0:00] Removing database output file (if it exists) (because you
 told me
to with --overwrite/-f).
[ 0:00] Will create geometry index. (If you do not want an index use
--no-index/-i.)
[12:54] Reading from file 'testdata.osm'.
[12:54] Reading ways (1st pass through input file)...
[12:54]   There are 19 nodes where the coastline is not closed.
[12:54]   There are 36 coastline rings (16 from a single way and 20
 from
multiple ways).
[12:54] Memory used currently: 205 MB (Peak was: 205 MB).
[12:54] Reading nodes (2nd pass through input file)...
ERROR 1: In CreateFeature(): sqlite3_prepare(INSERT INTO
 'error_points'
(GEOMETRY,osm_id,error) VALUES (?,?,?)):
  table error_points has no column named GEOMETRY
Failed to create feature on layer 'error_points'.
$
   
spatialite .schema error_points
CREATE TABLE 'error_points' (   OGC_FID INTEGER PRIMARY KEY, 'osm_id'
VARCHAR, 'error' VARCHAR);
spatialite
   
Not sure what's going on here, so thanks in advance for any help.
  
   Probably old spatialite and/or gdal lib. The spatialite format changed
 at
   some point and this leads to some confusion. You need GDAL 1.7 or
 later.
   If thats not the problem tell us something more about your setup (os
   version, lib versions etc.)
  
   Jochen
   --
   Jochen Topf  joc...@remote.org  http://www.jochentopf.com/
 +49-721-388298
  
 
 
 
  --
  Jeff Meyer
  Global World History Atlas
  www.gwhat.org
  j...@gwhat.org
  206-676-2347
 
  OpenStreetMap: Mapping with a Human Touch
  osm: Open Historical Map
  (OHM)http://wiki.openstreetmap.org/wiki/Open_Historical_Map
   / my OSM user page http://www.openstreetmap.org/user/jeffmeyer
  t: @GWHAThistory https://twitter.com/GWHAThistory
  f: GWHAThistory https://www.facebook.com/GWHAThistory

 --
 Jochen Topf  joc...@remote.org  http://www.jochentopf.com/  +49-721-388298




-- 
Jeff Meyer
Global World History Atlas
www.gwhat.org
j...@gwhat.org
206-676-2347

OpenStreetMap: Mapping with a Human Touch
osm: Open Historical Map
(OHM)http://wiki.openstreetmap.org/wiki/Open_Historical_Map
 / my OSM user page http://www.openstreetmap.org/user/jeffmeyer
t: @GWHAThistory https://twitter.com/GWHAThistory
f: GWHAThistory https://www.facebook.com/GWHAThistory
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev