[OSM-talk] My PHP-Script to reduce the traffic between Tile-Server and Client/Browser and what i'm looking for ...
Frederik Ramm
frederik at remote.org
Mon Sep 8 19:28:12 BST 2008
Hi,
> What PHP script-example is currently available to render Openstreetmap
> data into (PNG) Tiles ?
Rendering maps from OSM data is a pretty complex operation. Even if it
were possible to do this with PHP on the server, this would eat so much
processing power that any bandwidth saving would be killed off by it.
> My current goal: To reduce the Data-Traffic (of Map-Tiles) between
> server and client down to 1/3,
I don't understand. If you create the bitmap server-side and send it to
the client, the benefits will be virtually nil, certainly not 60% (one
large PNG is not much smaller than a number of small PNGs combined).
If you want to transfer raw data from the server to the client and make
a map of it there, then you won't need a PHP renderer, but a Javascript
(or XSLT) renderer.
> and to attach a 'style-render' engine at the script, to create maps
> under the restrictions of a
> CSS stylesheet file.
You may want to check out Osmarender, and in particular the "Osmarender
frontend" code written by Mario as part of this year's summer of code.
Osmarender is an XSLT-based renderer that can run completely in the
browser. However, this only works for street-level views, because only
there you can practically transfer all the data to the client; if you
wanted to have a map for, say, the whole of Germany, you don't want to
transfer hundreds of Megabytes just to filter out the tiniy bits that
are displayed.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the talk
mailing list