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 <[email protected]> wrote: > On Fri, Aug 6, 2010 at 1:23 AM, Adam Dunn <[email protected]> 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 > [email protected] > http://lists.openstreetmap.org/listinfo/talk-ca >
_______________________________________________ Talk-ca mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk-ca

