[Talk-ca] october 3rdish vancouver island meetup
Richard Weait
richard at weait.com
Fri Aug 6 11:06:48 BST 2010
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?
More information about the Talk-ca
mailing list