[OSM-dev] [OSM] Informations about osmarender for Google SoC

sven at schunterscouts.de sven at schunterscouts.de
Sun Mar 23 23:22:43 GMT 2008

Hi Mario,

If my memory doesn't play tricks on me that was me who suggested this  
Tool on the GSoC wiki-page. So I'm very pleased by the enthusiasm you  
put into this idea.

Though I'm no developer and reading this list out of pure interest I'm  
gonna raise my voice to shed some light on my thoughts and motivation  
for this idea.

As mentioned before it's only about editing/generating a rules-file  
for Osmarender in some GUI/WYSWIG way. One of OSMs great potentials is  
that users have access to the raw data (unlike the prefabricated maps  
of Google&Co.) which allows them to render custon-style maps.  
Unfortunately it requires an editor, some knowledge of XML, deep  
knowledge about Osmarenders ruling and quite some time to create the  
rules-file for such a custom rendering. My dream is that any clerk  
whose computer-skills are limited to MS Word and Outlook is able to  
render her boss a map of, say, Europe with the company-logo displayed  
for every branch and nothing else except ,coastlines, national  
boundaries and cities with more than population=500 000.

The software you might want to write could serve two different purposes/users:

A) Some advanced user who has a local instance of osmarender or even a  
tile-server installed. This person wants to generate a custom  
rules-file and would be able to do so in an editor. But that's a PITA  
when you wanna go seriously "custom". A pretty text-based approach  
with maybe a colorpicker, a file-selector for icons and some  
SVG-Preview for single icons and linestyles would suit this purpose.

B) The clerk mentioned above. She won't be running osmarender on her  
local machine (which she wouldn't even call 'machine' :-) and she  
would be pretty confused when a bridleway is called 'highway', ie.  
she's not familiar with OSM's tagging sheme. Additionally she would  
want her output to be a PDF of PNG (but that part of the process would  
hopefully be done by TomH's export tab).

While B) could IMO could only be achieved by a web-app  
(PHP,AJAX,etc.), could A) be done by a classical GUI-app for Windows,  
Linux, etc. written in any suitable language you desire (Java, C++,  
Delphi, Fortran, Assembler ;-). While such a stand-alone app would  
probably be easier to start with it would leave little to recycle when  
moving on to B) unless you use something exotic like XUL. So I'd  
favour a Web-app from the very beginning since this could (in the  
early stages) also serve A)-users by offering a downloadable  
rules-file. Some interaction with the export tab would also be easier  
in that case.

I can't tell you much about the internals of the GUI itself since I'm  
not familiar enough with osmarender-ruling but I'll try to comment  
your ideas.

> So, if I understood well.. I'm focusing these guidelines, which I'm
> integrating with some ideas of mine:
> 1) The user can edit overall options (found in
> http://wiki.openstreetmap.org/index.php/Osmarender/Options)

These would be served by some checkboxes and maybe some sliders for  
the scale-values.

> 2) There should be some way to add/remove/edit styles. My idea is to let
> the user select from a list of the real CSS names and/or select from a
> "modified name" (eventually hierarchical.. i.e. "stroke-width" becomes
> "width" under menu "stroke", with some associated help tip)

This sounds great maybe some hierarchy allowing to set some values for  
the higher levels (like captions for all shop=) and specify the for  
every detail (write caption for shop=supermarket even bigger).

> 4) There should be a way to pass easily between styles and rules to
> handle issues like "I've created a rule but I forgot to create the
> associated style..." or "This style it's not what I wanted, I must
> change that".

Great. Also some sort of style/icon-library to ship with would be great.

> 5) Node names or way names (or groups) can be selected through a kind of
> pull down menu which filters the content of the original OSM file.

Pulldown-menues and combo-boxes are just what I had in mind. Don't  
forget some sort of color-picker.

> 6) Symbols/areas can be selected by a text/visual selection, which
> contains images extracted from symbol-catalogue.svg (or other collection
> like that). In addition, it should accept custom symbols uploaded by the
> user.

When allowing the user to 'upload' his own icons other formats than  
svg should be accepted, like png etc. Think of the clerk, she won't  
know either SVG nor the format of the logo-file she has on her disk...

> 8) Something useful could be optionally saving created
> styles/rules/symbols (a sort of internal library).

That could be an additional module to allow users to upload their  
rule-files to the OSM-Server (along with some description and maybe an  
PNG-sample) to share them with other users.

> 9) This is a question more than a proposal. I can't understand how are
> "osmarender:" tags are used. Should they be added to the OSM file before
> applying styles and rules?

Don't worry about those. Mappers rarely use the to achieve some very  
special behaviour in Osmarender.

> Can you please explain better this approach? I'm figuring a "classic"
> web app, with some AJAX to let the browser render any modified SVG file
> the WYSIWYG way, and some javascript (or a Java servlet) to modify
> styles/rules. Is this correct?

IMHO that's correct. But only when there's a color-picker ;-)

I hope this wasn't to much but the time I saved when writing those few  
lines in the wiki I spent now by explaining them. I'm aware that most  
of the above can't be achieved within one SoC. Just to make this sure:  
I'm not able to mentor such a project. But when you need a user's  
opinion about usability I'll be glad to help.

Regards, Sven

More information about the dev mailing list