<br><div class="gmail_quote">On Sun, Mar 23, 2008 at 3:26 PM, Frederik Ramm <<a href="mailto:frederik@remote.org">frederik@remote.org</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,<br>
<div class="Ih2E3d"><br>
> So, if we want to mantain XSLT, there should be a way to display<br>
> only a subset of the SVG, with a sort of global preview and the<br>
> classical "rectangle", which could be used to zoom only single<br>
> parts of the map. When you use the rectangle, the program should<br>
> take only the points that are contained in those lat/lon<br>
> coordinates and show them. But I don't know how difficult this<br>
> could be to achieve. I see issues such as full OSM file searching<br>
> (I don't know if the OSM file has some kind of internal ordering)<br>
> and cutting away the way/areas lines (even if this could be<br>
> workarounded by not displaying those parts :)).<br>
<br>
</div>Currently all clipping in Osmarender is done through SVG, i.e.<br>
Osmarender always renders the full input even if you request to see<br>
only a small rectangle, and then it is left to the SVG renderer to<br>
cut out that rectangle. For top-quality maps this is probably<br>
unavoidable as there might be nods outside the rectangle that still<br>
influence what is seen inside the rectangle (think a node<br>
representing "place=city name=London" just outside your box; the text<br>
would stretch into the box). But for a quick preview you could<br>
probably do filtering.<br>
<div class="Ih2E3d"><br>
> Also, if I'm not wrong, there is a way to select osmarender's<br>
> zoom... so if the user select a low zoom, the map has to be<br>
> displayed as a whole, and I see no way to workaround this.<br>
<br>
</div>Keep in mind that you are not writing a WYSIWYG map editor; your aim<br>
is to allow the user to edit the rules file! You'd probably have to<br>
pre-filter the data according to what is rendered at all, or just<br>
create a fixed demo file. This is perhaps the simpler way for your<br>
task: Manually create a "demo" file that contains a lot of rendering<br>
cases and use this to let the user determine what he wants...<br>
<div class="Ih2E3d"></div></blockquote><div><br>A demo file is a good approach.  This can contain samples of all the cases that need to be considered.  Then as the user changes styles etc the appearance of the rendered demo file will change.<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>
>> That's why I did the Perl implemenentation, hoping to open up<br>
>> development to more people. We'll see how well this is received.<br>
>> I'd say that the rules files will certainly stay, but whehter or<br>
>> not the XSLT part will stay remains to be seen.<br>
><br>
> I've a problem with this, because I've never studied Perl.<br>
<br>
</div>I'm not saying you should use Perl, just that you should not assume<br>
that XSLT is here to stay. It would be really easy to convert the<br>
Perl stuff to Java, or if you're uncomfortable with that, convert the<br>
XSLT stuff to Java just as I converted it to Perl. But if that is too<br>
much of a detraction for you, it's perfectly fine to use the XSLT<br>
stuff for your task.<br>
<div class="Ih2E3d"></div></blockquote><div><br>I don't think the language that the Osmarender engine is implemented in matters for this task.  The main file to focus on is the XML rules file.  This is an input for both the XSL and the Perl versions of Osmarender.<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>
Bye<br>
Frederik<br>
<br>
--<br>
Frederik Ramm  ##  eMail <a href="mailto:frederik@remote.org">frederik@remote.org</a>  ##  N49°00'09" E008°23'33"<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="Wj3C7c">dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev" target="_blank">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev</a><br>
</div></div></blockquote></div><br>