[Talk-ca] october 3rdish vancouver island meetup

Adam Dunn dunnadam at gmail.com
Fri Aug 6 17:04:31 BST 2010


Thanks Richard. The bounds line isn't present in any of the files that I'm
working with, so it must be a convenience provided by whatever program you
used. The sed lines work like a charm, though.

Adam

On Fri, Aug 6, 2010 at 3:06 AM, Richard Weait <richard at weait.com> wrote:

> On Fri, Aug 6, 2010 at 1:23 AM, Adam Dunn <dunnadam at gmail.com> wrote:
> >
> > P.S. While we're at it, anyone know a method to find out the bounding box
> of
> > an osm file? In other words, I give you an .osm file and, using some
> command
> > line tool, you tell me the min lat for any node contained within the
> file,
> > the max lat, the min long and the max long.
>
> Check for the bounds line at the top of the file.
>
>  <bounds minlat="43.1347" minlon="-79.0719" maxlat="43.1752"
> maxlon="-79.0197"/>
>
> This did not match what I found with sed.
>
> grep "<node" queenston.osm| sed -e 's/^.*lat="//' | sed -e
> 's/".*$//'|sort -n|head -1
> grep "<node" queenston.osm| sed -e 's/^.*lat="//' | sed -e
> 's/".*$//'|sort -n|tail -1
> grep "<node" queenston.osm| sed -e 's/^.*lon="//' | sed -e
> 's/".*$//'|sort -n|head -1
> grep "<node" queenston.osm| sed -e 's/^.*lon="//' | sed -e
> 's/".*$//'|sort -n|tail -1
>
> either of these work for you?
>
> _______________________________________________
> Talk-ca mailing list
> Talk-ca at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-ca
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-ca/attachments/20100806/a0e877fb/attachment.html>


More information about the Talk-ca mailing list