<br><div class="gmail_quote">On Sun, Mar 23, 2008 at 2:10 PM, Mario <<a href="mailto:fadinlight@gmail.com">fadinlight@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi 80n! :)<br>
<div class="Ih2E3d"><br>
> JOSM is directed towards editing nodes, ways and relations.  For the<br>
> Osmarender frontend you want to be editing rules and styles.  Not sure<br>
> that JOSM helps much with that.<br>
<br>
</div>My idea was to integrate this as an independent JOSM plugin only to let<br>
the final user living with as few different programs as possible. IMHO,<br>
this could improve the overall usability. There would be no direct<br>
relation with JOSM code (perhaps, if it's possible, the plugin could<br>
take the OSM file which JOSM is editing in the same time).<br>
<div class="Ih2E3d"></div></blockquote><div><br> Possibly.  There may be some benefit to using JOSM to define rules:<br>1) Create a way.<br>2) Tag with highway=motorway; layer=1; style=highway-motorway-casing, render-sequence=548<br>
3) Define style somehow<br>4) Render using mapaint <br>5) Save as OSM file<br>6) Convert OSM file to Osmarender rules file<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> 1) I'd imagine something that has a test .osm file and a complete rules<br>
> file as input.  It should then display the rendered test file and<br>
> provide a way for the user to change the styling of any element<br>
> (motorway, footway, river, building, etc).  It should then emit a<br>
> modified rules file.  Once you have a solution that can edit styles,<br>
> you'd then need to be able to add/remove/edit rules.  This is a<br>
> different kind of activity from editing styles.<br>
<br>
</div>So, if I understood well.. I'm focusing these guidelines, which I'm<br>
integrating with some ideas of mine:<br>
1) The user can edit overall options (found in<br>
<a href="http://wiki.openstreetmap.org/index.php/Osmarender/Options" target="_blank">http://wiki.openstreetmap.org/index.php/Osmarender/Options</a>)<br>
</blockquote><div><br>The options are easy to edit in the XML file, and not changed often.  Very low priority.  Do this last, if at all.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
2) There should be some way to add/remove/edit styles. My idea is to let<br>
the user select from a list of the real CSS names and/or select from a<br>
"modified name" (eventually hierarchical.. i.e. "stroke-width" becomes<br>
"width" under menu "stroke", with some associated help tip)<br>
</blockquote><div><br>Osmarender can use the full power and extent of CSS, including cascading style definitions.  Any CSS editor would need to be quite complex and very comprehensive.  That's why I think starting with a good existing CSS editor would be a good idea.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
3) Enter rules easily. This should be something like a "query editor" to<br>
select "all kind of nodes like.." or "this node" (is there a way to pick<br>
up a specified node in the original OSM? Sorry I've to study better :))<br>
and associate a style to it.</blockquote><div><br>Do you mean "select * from ways where highway=motorway and layer=1"?<br><br>Much better would be to draw a line, using a graphical editor (JOSM perhaps)  and then add highway=motorway to it.  Then attach a style to it (style=highway-casing highway-motorway-casing).<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
4) There should be a way to pass easily between styles and rules to<br>
handle issues like "I've created a rule but I forgot to create the<br>
associated style..." or "This style it's not what I wanted, I must<br>
change that".</blockquote><div><br>Yes, some validation to make sure that all referenced styles exist and a way of vacuuming redundant styles. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
5) Node names or way names (or groups) can be selected through a kind of<br>
pull down menu which filters the content of the original OSM file.<br>
</blockquote><div><br>I don't understand this.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
6) Symbols/areas can be selected by a text/visual selection, which<br>
contains images extracted from symbol-catalogue.svg (or other collection<br>
like that). In addition, it should accept custom symbols uploaded by the<br>
user.<br>
</blockquote><div><br>Symbols are SVG files.  No need for any additional complexity here.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
7) I think it could be great to let the user view tips somewhere in the<br>
program, like what can be found in<br>
<a href="http://wiki.openstreetmap.org/index.php/Osmarender/Tips" target="_blank">http://wiki.openstreetmap.org/index.php/Osmarender/Tips</a>, or what can be<br>
found in <a href="http://wiki.openstreetmap.org/index.php/Osmarender_Styleguide" target="_blank">http://wiki.openstreetmap.org/index.php/Osmarender_Styleguide</a>.<br>
These tips should be not the "tip-of-the-day", but I imagine something<br>
more "target-oriented", so they will be viewed only in relevant areas of<br>
the program. (for example, color tips should be viewed when I'm editing<br>
a color style, not a width style :)))<br>
<br>
8) Something useful could be optionally saving created<br>
styles/rules/symbols (a sort of internal library).<br>
<br>
9) This is a question more than a proposal. I can't understand how are<br>
"osmarender:" tags are used. Should they be added to the OSM file before<br>
applying styles and rules?</blockquote><div><br>Osmarender tags are rendering hints.  They exist in the OSM data and are interpreted by the core rendering engine.  I don't think they are relevant to your task.<br> </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
In this case... it could be great to select single ways/areas directly<br>
from the preview output.. but I'm starting to be visionary ;) ;)<br>
<br>
Please let me know if there is something I haven't understood well.<br>
<div class="Ih2E3d"><br>
> It might be worth looking to see what can be done with Inkscape plugins.<br>
><br>
> 2) Another approach would be to augment some generated svg with<br>
> javascript and build a style/rule editing app that runs in a browser.<br>
> This would probably be a bit more work than using, say, Inkscape, but<br>
> could be a nice lightweight solution.<br>
<br>
</div>Can you please explain better this approach? I'm figuring a "classic"<br>
web app, with some AJAX to let the browser render any modified SVG file<br>
the WYSIWYG way, and some javascript (or a Java servlet) to modify<br>
styles/rules. Is this correct?<br>
</blockquote><div><br>Yes, exactly.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Bye!<br>
<font color="#888888"><br>
Mario<br>
</font></blockquote></div><br>