<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Richard et al,<div><br></div><div>So, I've used osm2pgsql to import the canada.osm file into PostgreSQL:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> osm2pgsql --latlong -d speed_limits_canada canada.osm -U postgres</span></div><div><br></div><div>Seems to have done the job: </div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>Node stats: total(132433150), max(1873380872) in 1150s</div></div><div><div>Way stats: total(8281053), max(176854853) in 1235s</div></div><div><div>Relation stats: total(103361), max(2363373) in 742s</div></div><div><div><br></div></div><div><div>Writing way (8281k)</div></div><div><div><br></div></div><div><div>Writing relation (103344)</div></div><div><div>Committing transaction for planet_osm_point</div></div><div><div>Committing transaction for planet_osm_roads</div></div><div><div>Committing transaction for planet_osm_line</div></div><div><div>Sorting data and creating indexes for planet_osm_point</div></div><div><div>Sorting data and creating indexes for planet_osm_roads</div></div><div><div>Sorting data and creating indexes for planet_osm_line</div></div><div><div>Committing transaction for planet_osm_polygon</div></div><div><div>Sorting data and creating indexes for planet_osm_polygon</div></div><div><div>Indexes on planet_osm_roads created in 99s</div></div><div><div>Completed planet_osm_roads</div></div><div><div>Indexes on planet_osm_point created in 564s</div></div><div><div>Completed planet_osm_point</div></div><div><div>Indexes on planet_osm_line created in 808s</div></div><div><div>Completed planet_osm_line</div></div><div><div>Indexes on planet_osm_polygon created in 819s</div></div><div><div>Completed planet_osm_polygon</div></div></blockquote><div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>Osm2pgsql took 4972s overall</div></div></blockquote><div><br></div><div>Not being familiar with OSM at all, I was wondering, can someone suggest the simplest way (query) to get the max speed of the nearest road to a given point?</div><div><br><div><div><div>On 2012-08-21, at 4:22 PM, Richard Weait wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tue, Aug 21, 2012 at 4:26 PM, René Fournier <<a href="mailto:m5@renefournier.com">m5@renefournier.com</a>> wrote:<br><blockquote type="cite">Looking for suggestions...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I need to create a web service that, given a latitude/longitude coordinate that lies on a major road or highway, returns a maximum speed limit. Looking at services like <a href="http://www.itoworld.com/map/35#fullscreen">http://www.itoworld.com/map/35#fullscreen</a>, it's clear that much of the data is there. What's the best way to go about this? Anyone try it before?<br></blockquote><br>How often do you want to request the data?<br><br>1) Build a local DB.<br>2) request the maxspeed from the highway nearest the stated coordinates.<br><br>For extra marks, you might want to build in some logic and some persistence.<br><br>Seems pretty straightforward.<br></div></blockquote></div><br></div></div></body></html>