On 9/16/06, <b class="gmail_sendername">Robert Hart</b> <<a href="mailto:Robert.Hart@burohappold.com">Robert.Hart@burohappold.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<<ouputbbox.diff>><br><br><br>When OSM data is requested for a given bounding box some nodes will<br>inevitably fall outside the specified area. This is the intended<br>behaviour and is desireable.<br><br>If that data is saved to a file, and later reloaded, (either in an
<br>editor or by a renderer), it is not possible to fully determine the<br>bounding box. The resulting view/render has a jagged edge.<br><br>The attached patch for JOSM adds bllat, bllon, trlat, and trlon<br>attributes to the top-level <osm> element based on the current view.
<br><br>I have a rough hack to osmarender that well take those attributes,<br>create a clip-path, and apply it to all map features (see<br><a href="http://wiki.openstreetmap.org/images/d/d0/CentralBath.png">http://wiki.openstreetmap.org/images/d/d0/CentralBath.png
</a>). This needs<br>some clean-up (see 3. below)<br><br><br>Questions.<br><br>1. Are there any objections to using these new attributes?<br><br>2. Where else should support be added for them?<br><br>3. Does anybody know how to write xslt that would allow the bounding box
<br>to be taken from osm-map-features.xml, if present, then from attributes<br>in data.osm if present, or finally using the existing max and min nodal<br>values from data.osm?</blockquote><div><br>Something like this ought to work:
<br><br><xsl:choose><br> <xsl:when test='/rules/@bllat'><br> <xsl:variable name='bllat'><value-of select='/rules/@bllat'/><br> <xsl:variable name='blllon'><value-of select='/rules/@bllon'/>
<br> ...<br> </xsl:when><br> <xsl:when test='$data/osm/@bllat'><br>
<xsl:variable name='bllat'><value-of select='$data/@bllat'/><br> <xsl:variable name='blllon'><value-of select='$data/@bllon'/><br>
...<br>
</xsl:when><br>
<xsl:otherwise'><br> <!-- existing code for bllat bllon etc goes here --><br> </xsl:otherwise><br></xsl:choose><br>
<br>Etienne<br><br><br><br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Rob<br> <<ouputbbox.diff>> <<osmarender.xsl
>><br><br><br><br>_______________________________________________<br>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">
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev</a><br><br><br><br></blockquote></div><br>