Re: [OSM-talk] rendering some large maps, e.g. whole world

2009-05-21 Thread Dane Springmeyer
Holger,

Great script for modifying mapnik symbology for higher/print  
resolution, and awesome to hear that you are using Cascadenik.

Just a note that I've started to work in Mapnik core for supporting  
scaling based on variable resolution output:

http://trac.mapnik.org/ticket/343

- Dane


On Apr 18, 2009, at 3:18 AM, Holger Schöner wrote:

 Hello,

 2009/4/18 Torsten Mohr tm...@s.netic.de
 I'd like to print a map of Germany as a poster.  My understanding is
 that osm.xml is configured to create maps that look fine on a  
 screen.
 But the Pixels per Inch on a computer monitor are different  
 compared to
 the PPI on a printed poster.
 So e.g. text size, symbol size and others may not look optimal when
 printed.

 That is correct. I wrote a small script (in Ruby, BSD license) to  
 modify an
 existing mapnik style by scaling all text sizes, line widths,
 min/maxscaledenominators etc. It worked quite well for me (using the
 standard openstreetmap mapnik style) when I tried it some months ago.

 Link to script: http://www.ancalime.de/images/scalestyle.rb

 One caveat, though: As the icons are included as pixel graphics, and  
 I do
 not know of any possiblity to scale them using style file syntax,  
 they are
 not modified. Thus they will appear much too small on a printed map.  
 If you
 have better icons, you might be able to adapt the script such that it
 exchanges yours for the standard ones ...

 For an own map (which also uses cascadenic style preprocessor to  
 produce the
 mapnik styles), I created a set of icons in different pixel sizes  
 (converted
 by inkscape from SVG templates mainly from the OSM SVN), where the  
 size is
 included as suffix in the filename. With another script (much more  
 complex,
 so I cannot publish it right away; but if you are interested, I  
 might be
 able to produce an excerpt of the relevant parts in about two or three
 weeks) I can parse these filenames, and look for appropriately sized  
 icons
 in their directory.

 Hope this helps ... Yours,
 -- 
 Holger Schoener   nume...@ancalime.de


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


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


[OSM-talk] rendering some large maps, e.g. whole world

2009-04-18 Thread Torsten Mohr
Hello,

i installed PostgreSQL / PostGIS and use a modified version of this
script to render maps:

svn.openstreetmap.org/applications/render/mapnik/generate_image.py

I've just created two maps of Germany, one is 12000 x 16000, the other
is 3000 x 4000.  I then get two different 'levels of detail', as expected.

I'd like to print a map of Germany as a poster.  My understanding is that
osm.xml is configured to create maps that look fine on a screen.
But the Pixels per Inch on a computer monitor are different compared to
the PPI on a printed poster.
So e.g. text size, symbol size and others may not look optimal when printed.

Has anybody got any experience with changing osm.xml to create maps
that look fine when printed (readable text, ...)?

Or do i worry too much and printing PNGs looks just all right?


2.
When rendering the whole world with coordinates like this:

# unused:   ll = (4.5, 46, 16, 56) # Germany
ll = (-180.0, -90.0, 180.0, 90.0) # World

Then i just get an empty file (just background).

Is this related to the scale denominators in osm.xml?

Can anybody give me a hint on what values to use when printing
the whole planet?



Thanks for any hints,
Torsten.


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


Re: [OSM-talk] rendering some large maps, e.g. whole world

2009-04-18 Thread Matt Amos
On Sat, Apr 18, 2009 at 9:34 AM, D Tucny d...@tucny.com wrote:
 2009/4/18 Torsten Mohr tm...@s.netic.de
 Has anybody got any experience with changing osm.xml to create maps
 that look fine when printed (readable text, ...)?

 Or do i worry too much and printing PNGs looks just all right?

 The maps are typically rendered for viewing on a screen, so, text and
 symbols may appear too small when printed, you would likely need to adjust
 their size for print, but, how much you adjust it can be a taste thing...

 I haven't done it with a map myself, but others have and hopefully they will
 be able to contribute here with their experiences...

i've seen two approaches:

1. render to PDF/PS and rasterise/print that at whatever scale you
want. this means no mucking about with the style file, but some
features (e.g: transparency, text halo-ing) sometimes don't come
across the same as they do on the rendered tiles.

2. alter the style file so that everything is ~3 times bigger. this
means everything will render right, but is a pain to do by hand.

both approaches give comparable results. for the best results, replace
the icons with a scalable icon set rendered at 3 times their normal
size.

 2.
 When rendering the whole world with coordinates like this:

 # unused:   ll = (4.5, 46, 16, 56) # Germany
    ll = (-180.0, -90.0, 180.0, 90.0) # World

 Then i just get an empty file (just background).

 Is this related to the scale denominators in osm.xml?

 It likely is a combination of the scale and potentially a lack of the coast
 shapefiles... The lowest level of detail just has the coast line rendered
 from the shapefiles...

i think its more likely to be that -90/+90 lat project to infinity in
the mercartor projection. if you want a square image, use
-85.0511/+85.0511 lat. see also
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#X_and_Y

cheers,

matt

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


Re: [OSM-talk] rendering some large maps, e.g. whole world

2009-04-18 Thread Holger Schöner
Hello,

 2009/4/18 Torsten Mohr tm...@s.netic.de
  I'd like to print a map of Germany as a poster.  My understanding is
  that osm.xml is configured to create maps that look fine on a screen.
  But the Pixels per Inch on a computer monitor are different compared to
  the PPI on a printed poster.
  So e.g. text size, symbol size and others may not look optimal when
  printed.

That is correct. I wrote a small script (in Ruby, BSD license) to modify an 
existing mapnik style by scaling all text sizes, line widths, 
min/maxscaledenominators etc. It worked quite well for me (using the 
standard openstreetmap mapnik style) when I tried it some months ago.

Link to script: http://www.ancalime.de/images/scalestyle.rb

One caveat, though: As the icons are included as pixel graphics, and I do 
not know of any possiblity to scale them using style file syntax, they are 
not modified. Thus they will appear much too small on a printed map. If you 
have better icons, you might be able to adapt the script such that it 
exchanges yours for the standard ones ...

For an own map (which also uses cascadenic style preprocessor to produce the 
mapnik styles), I created a set of icons in different pixel sizes (converted 
by inkscape from SVG templates mainly from the OSM SVN), where the size is 
included as suffix in the filename. With another script (much more complex, 
so I cannot publish it right away; but if you are interested, I might be 
able to produce an excerpt of the relevant parts in about two or three 
weeks) I can parse these filenames, and look for appropriately sized icons 
in their directory.

Hope this helps ... Yours,
-- 
Holger Schoener nume...@ancalime.de


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


Re: [OSM-talk] rendering some large maps, e.g. whole world

2009-04-18 Thread Brian Quinion
 One caveat, though: As the icons are included as pixel graphics, and I do
 not know of any possiblity to scale them using style file syntax, they are
 not modified. Thus they will appear much too small on a printed map. If you
 have better icons, you might be able to adapt the script such that it
 exchanges yours for the standard ones ...

Most of the icons in the standard mapnik style are rendered from the
twotone svg set and can be rendered at any required size by modifying
the script (i.e.
http://svn.openstreetmap.org/applications/share/map-icons/svg-twotone/generatemapniksymbols.sh)
Although i've still not got round to modifying this script since the
icons where put in to the new hierarchy - you might need to check out
an old version of the twotone folder to get it to work.

Cheers,
--
 Brian

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


Re: [OSM-talk] rendering some large maps, e.g. whole world

2009-04-18 Thread Torsten Mohr
Hello,

thanks you very much for the answers, that helped _a_ _lot_ !

Lowering the latitude from 90.0 helped, now i can render the whole world.

I can now render a map of the world and i'm trying to scale certain parameters
so a printed map will look fine.


Best regards,
Torsten.



Am Samstag, 18. April 2009 10:34:06 schrieb D Tucny:
 2009/4/18 Torsten Mohr tm...@s.netic.de

  Hello,
 
  i installed PostgreSQL / PostGIS and use a modified version of this
  script to render maps:
 
  svn.openstreetmap.org/applications/render/mapnik/generate_image.py
 
  I've just created two maps of Germany, one is 12000 x 16000, the other
  is 3000 x 4000.  I then get two different 'levels of detail', as
  expected.
 
  I'd like to print a map of Germany as a poster.  My understanding is that
  osm.xml is configured to create maps that look fine on a screen.
  But the Pixels per Inch on a computer monitor are different compared to
  the PPI on a printed poster.
  So e.g. text size, symbol size and others may not look optimal when
  printed.
 
  Has anybody got any experience with changing osm.xml to create maps
  that look fine when printed (readable text, ...)?
 
  Or do i worry too much and printing PNGs looks just all right?

 A standard/typical print resolution is 300dpi, whereas a standard/typical
 screen resolution would be 96 dpi... So, if you had an image, viewed at
 native resolution, on a screen that took up an area 30cm by 30cm and looked
 good, to print it at it's native resolution the image would be 10cm by 10cm
 (approximately)... Your 12000 x 16000 image would be good for printing
 about 1m by 1.3m at 300dpi, any smaller and you would loose some of that
 resolution, any bigger and the image would start to appear pixelated...
 Your 3000 x 4000 image would be good for up to 25cm by 34cm at 300dpi...

 If you wanted to print an A0 poster, with no margins, you have a print area
 of 118.9cm by 84.1cm, so, an optimum resolution for your image would be
 14043 x 9933 if printing at 300dpi... If you view this image at 33% scale
 on your computer, you'll get a rough idea of the size of features when
 printed (though you may want to work out the real DPI of your screen if you
 want it to be more accurate, e.g. the screen I'm using now is 37.6cm wide
 with a horizontal resolution of 1280 pixels, or 86dpi, so I'd get more
 accurate feel of size by using a scale of 29% when viewing the image on
 screen)...

 The maps are typically rendered for viewing on a screen, so, text and
 symbols may appear too small when printed, you would likely need to adjust
 their size for print, but, how much you adjust it can be a taste thing...

 I haven't done it with a map myself, but others have and hopefully they
 will be able to contribute here with their experiences...

 2.

  When rendering the whole world with coordinates like this:
 
  # unused:   ll = (4.5, 46, 16, 56) # Germany
 ll = (-180.0, -90.0, 180.0, 90.0) # World
 
  Then i just get an empty file (just background).
 
  Is this related to the scale denominators in osm.xml?

 It likely is a combination of the scale and potentially a lack of the coast
 shapefiles... The lowest level of detail just has the coast line rendered
 from the shapefiles...

  Can anybody give me a hint on what values to use when printing
  the whole planet?

 To give accurate values, people would need to know what size image you will
 be looking to create, so, would need to know the size and resolution you
 will be printing at...

 Hope that helps...

 d


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