[OSM-dev] [RFC] Add bounding box information to OSM files.

Robert Hart Robert.Hart at BuroHappold.com
Sat Sep 16 15:53:21 BST 2006


 <<ouputbbox.diff>> 
 

When OSM data is requested for a given bounding box some nodes will
inevitably fall outside the specified area. This is the intended
behaviour and is desireable.

If that data is saved to a file, and later reloaded, (either in an
editor or by a renderer), it is not possible to fully determine the
bounding box. The resulting view/render has a jagged edge.

The attached patch for JOSM adds bllat, bllon, trlat, and trlon
attributes to the top-level <osm> element based on the current view.

I have a rough hack to osmarender that well take those attributes,
create a clip-path, and apply it to all map features (see
http://wiki.openstreetmap.org/images/d/d0/CentralBath.png). This needs
some clean-up (see 3. below)


Questions.

1. Are there any objections to using these new attributes?

2. Where else should support be added for them?

3. Does anybody know how to write xslt that would allow the bounding box
to be taken from osm-map-features.xml, if present, then from attributes
in data.osm if present, or finally using the existing max and min nodal
values from data.osm?  


Rob
 <<ouputbbox.diff>>  <<osmarender.xsl>> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: osmarenderhack.diff
Type: application/octet-stream
Size: 6704 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060916/9a7e0b53/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ouputbbox.diff
Type: application/octet-stream
Size: 2660 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060916/9a7e0b53/attachment-0001.obj>


More information about the dev mailing list