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

Etienne 80n80n at gmail.com
Sun Sep 17 00:37:07 BST 2006


Robert
I just noticed that GPX files downloaded from OSM have the following
element:
<gpx>
  <bounds minlat="49.876901667" minlon="8.655336667" maxlat="49.880420000"
maxlon="8.669021667"/>
  <trk>...

It would be sensible to extend the .OSM files in a similar fashion rather
than add attributes to the top level <osm> element.

Etienne

On 9/16/06, Robert Hart <Robert.Hart at burohappold.com> wrote:
>
> <<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>>
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20060917/2aa594f5/attachment.html>


More information about the dev mailing list