[Tile-serving] [openstreetmap/osm2pgsql] Save unprojected coordinates in node caches and use osmium dense file array (#668)
Paul Norman
notifications at github.com
Wed Jan 4 23:54:47 UTC 2017
pnorman commented on this pull request.
🎆
> @@ -378,8 +367,9 @@ size_t middle_pgsql_t::local_nodes_get_list(nodelist_t &out, osmium::WayNodeList
size_t wrtidx = 0;
for (size_t i = 0; i < nds.size(); ++i) {
if (std::isnan(out[i].lat)) {
- std::unordered_map<osmid_t, osmNode>::iterator found = pg_nodes.find(nds[i].ref());
- if(found != pg_nodes.end()) {
+ std::unordered_map<osmid_t, osmNode>::iterator found =
+ pg_nodes.find(nds[i].ref());
+ if (found != pg_nodes.end()) {
could this entire loop be an `auto nd:nds`?
> }
- return 1;
+ if (coord.valid()) {
+ nodesCacheHits++;
+ }
+ nodesCacheLookups++;
+
+ return coord;
}
If any reformatting has been missed by only doing the diffs, I'd just as soon reformat the entire file. Of course, you might have already thought of this ;)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/668#pullrequestreview-15223574
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20170104/c82f80d9/attachment.html>
More information about the Tile-serving
mailing list