diff -Nru osm2pgsql-0.88.0/configure.ac osm2pgsql-0.88.1/configure.ac --- osm2pgsql-0.88.0/configure.ac 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/configure.ac 2015-08-15 05:28:11.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(osm2pgsql, 0.88.0) +AC_INIT(osm2pgsql, 0.88.1) dnl Required autoconf version AC_PREREQ(2.61) diff -Nru osm2pgsql-0.88.0/debian/changelog osm2pgsql-0.88.1/debian/changelog --- osm2pgsql-0.88.0/debian/changelog 2015-08-16 08:56:31.000000000 +0000 +++ osm2pgsql-0.88.1/debian/changelog 2015-08-28 09:52:02.000000000 +0000 @@ -1,8 +1,10 @@ -osm2pgsql (0.88.0-1build1) wily; urgency=medium +osm2pgsql (0.88.1-1) unstable; urgency=medium - * No-change rebuild for libgeos rename. + * New upstream release. + * Update watch file to handle other tar extensions. + * Update Vcs-Browser URL to use HTTPS. - -- Mathieu Trudel-Lapierre Sun, 16 Aug 2015 10:56:29 +0200 + -- Bas Couwenberg Fri, 28 Aug 2015 11:51:55 +0200 osm2pgsql (0.88.0-1) unstable; urgency=medium diff -Nru osm2pgsql-0.88.0/debian/control osm2pgsql-0.88.1/debian/control --- osm2pgsql-0.88.0/debian/control 2015-07-15 05:57:30.000000000 +0000 +++ osm2pgsql-0.88.1/debian/control 2015-08-28 09:51:34.000000000 +0000 @@ -26,7 +26,7 @@ python, python-psycopg2 Standards-Version: 3.9.6 -Vcs-Browser: http://anonscm.debian.org/cgit/pkg-grass/osm2pgsql.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/osm2pgsql.git Vcs-Git: git://anonscm.debian.org/pkg-grass/osm2pgsql.git Homepage: http://wiki.openstreetmap.org/wiki/Osm2pgsql diff -Nru osm2pgsql-0.88.0/debian/watch osm2pgsql-0.88.1/debian/watch --- osm2pgsql-0.88.0/debian/watch 2015-07-15 05:59:49.000000000 +0000 +++ osm2pgsql-0.88.1/debian/watch 2015-08-22 16:40:59.000000000 +0000 @@ -2,6 +2,6 @@ opts=\ dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$//,\ uversionmangle=s/_/./g;s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/;s/RC/rc/,\ -filenamemangle=s/(?:.*?)?v?(\d[\d_\.\-\+]*((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)?)\.tar\.gz/osm2pgsql-$1.tar.gz/ \ +filenamemangle=s/(?:.*?)?(?:rel|v|osm2psql)?[\-\_]?(\d\S+)\.(tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))/osm2psql-$1.$2/ \ https://github.com/openstreetmap/osm2pgsql/releases \ -(?:.*/)*(?:rel|v|osm2pgsql|)[\-\_]?(\d\S*)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) +(?:.*?/)?(?:rel|v|osm2pqsql)?[\-\_]?(\d\S+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff -Nru osm2pgsql-0.88.0/docs/osm2pgsql.1 osm2pgsql-0.88.1/docs/osm2pgsql.1 --- osm2pgsql-0.88.0/docs/osm2pgsql.1 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/docs/osm2pgsql.1 2015-08-15 05:28:11.000000000 +0000 @@ -117,7 +117,7 @@ Only for slim mode: Use up to num many MB of RAM for caching nodes. Giving osm2pgsql sufficient cache to store all imported nodes typically greatly increases the speed of the import. Each cached node requires 8 bytes of cache, plus about 10% \- 30% overhead. For a current OSM full planet import with -its ~ 1.9 billion nodes, a good value would be 17000 if you have enough RAM. If you don't have enough +its ~ 3 billion nodes, a good value would be 27000 if you have enough RAM. If you don't have enough RAM, it is likely beneficial to give osm2pgsql close to the full available amount of RAM. Defaults to 800. .TP \fB\ \fR\-\-cache\-strategy strategy diff -Nru osm2pgsql-0.88.0/geometry-builder.cpp osm2pgsql-0.88.1/geometry-builder.cpp --- osm2pgsql-0.88.0/geometry-builder.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/geometry-builder.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -185,7 +185,7 @@ const Coordinate this_pt = coords->getAt(i); const Coordinate prev_pt = coords->getAt(i-1); const double delta = this_pt.distance(prev_pt); - assert(!isnan(delta)); + assert(!std::isnan(delta)); // figure out if the addition of this point would take the total // length of the line in `segment` over the `split_at` distance. diff -Nru osm2pgsql-0.88.0/id-tracker.cpp osm2pgsql-0.88.1/id-tracker.cpp --- osm2pgsql-0.88.0/id-tracker.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/id-tracker.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -171,6 +171,8 @@ size_t id_tracker::size() { return impl->count; } +osmid_t id_tracker::last_returned() const { return impl->old_id; } + bool id_tracker::is_valid(osmid_t id) { return id != max(); } osmid_t id_tracker::max() { return std::numeric_limits::max(); } osmid_t id_tracker::min() { return std::numeric_limits::min(); } diff -Nru osm2pgsql-0.88.0/id-tracker.hpp osm2pgsql-0.88.1/id-tracker.hpp --- osm2pgsql-0.88.0/id-tracker.hpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/id-tracker.hpp 2015-08-15 05:28:11.000000000 +0000 @@ -13,6 +13,7 @@ bool is_marked(osmid_t id); osmid_t pop_mark(); size_t size(); + osmid_t last_returned() const; static bool is_valid(osmid_t); static osmid_t max(); diff -Nru osm2pgsql-0.88.0/node-persistent-cache.cpp osm2pgsql-0.88.1/node-persistent-cache.cpp --- osm2pgsql-0.88.0/node-persistent-cache.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/node-persistent-cache.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -376,10 +376,11 @@ if (block_id < 0) block_id = load_block(block_offset); - if (isnan(lat) && isnan(lon)) + if (std::isnan(lat) && std::isnan(lon)) { readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK] = ramNode(); - else + } else { readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK] = ramNode(lon, lat); + } readNodeBlockCache[block_id].inc_used(); readNodeBlockCache[block_id].set_dirty(); @@ -438,7 +439,7 @@ size_t wrtidx = 0; for (size_t i = 0; i < nds.size(); i++) { - if (isnan(out[i].lat) && isnan(out[i].lon)) { + if (std::isnan(out[i].lat) && std::isnan(out[i].lon)) { if (get(&(out[wrtidx]), nds[i]) == 0) wrtidx++; } else { diff -Nru osm2pgsql-0.88.0/node-ram-cache.hpp osm2pgsql-0.88.1/node-ram-cache.hpp --- osm2pgsql-0.88.0/node-ram-cache.hpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/node-ram-cache.hpp 2015-08-15 05:28:11.000000000 +0000 @@ -68,7 +68,7 @@ ramNode() : _lat(NAN), _lon(NAN) {} ramNode(double _lon, double _lat) : _lon(lon), _lat(lat) {} - bool is_valid() const ( return !isnan(_lon); } + bool is_valid() const ( return !std::isnan(_lon); } double lon() const { return _lon; } double lat() const { return _lat; } private: diff -Nru osm2pgsql-0.88.0/output-multi.cpp osm2pgsql-0.88.1/output-multi.cpp --- osm2pgsql-0.88.0/output-multi.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/output-multi.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -61,6 +61,15 @@ } void output_multi_t::enqueue_ways(pending_queue_t &job_queue, osmid_t id, size_t output_id, size_t& added) { + osmid_t const prev = ways_pending_tracker->last_returned(); + if (id_tracker::is_valid(prev) && prev >= id) { + if (prev > id) { + job_queue.push(pending_job_t(id, output_id)); + } + // already done the job + return; + } + //make sure we get the one passed in if(!ways_done_tracker->is_marked(id) && id_tracker::is_valid(id)) { job_queue.push(pending_job_t(id, output_id)); @@ -83,11 +92,10 @@ //make sure to get this one as well and move to the next if(popped == id) { - popped = ways_pending_tracker->pop_mark(); - } - if (!ways_done_tracker->is_marked(popped) && id_tracker::is_valid(popped)) { - job_queue.push(pending_job_t(popped, output_id)); - added++; + if (!ways_done_tracker->is_marked(popped) && id_tracker::is_valid(popped)) { + job_queue.push(pending_job_t(popped, output_id)); + added++; + } } } @@ -106,6 +114,15 @@ } void output_multi_t::enqueue_relations(pending_queue_t &job_queue, osmid_t id, size_t output_id, size_t& added) { + osmid_t const prev = rels_pending_tracker->last_returned(); + if (id_tracker::is_valid(prev) && prev >= id) { + if (prev > id) { + job_queue.push(pending_job_t(id, output_id)); + } + // already done the job + return; + } + //make sure we get the one passed in if(id_tracker::is_valid(id)) { job_queue.push(pending_job_t(id, output_id)); @@ -126,11 +143,10 @@ //make sure to get this one as well and move to the next if(popped == id) { - popped = rels_pending_tracker->pop_mark(); - } - if(id_tracker::is_valid(popped)) { - job_queue.push(pending_job_t(popped, output_id)); - added++; + if(id_tracker::is_valid(popped)) { + job_queue.push(pending_job_t(popped, output_id)); + added++; + } } } diff -Nru osm2pgsql-0.88.0/output-pgsql.cpp osm2pgsql-0.88.1/output-pgsql.cpp --- osm2pgsql-0.88.0/output-pgsql.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/output-pgsql.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -276,6 +276,15 @@ } // anonymous namespace void output_pgsql_t::enqueue_ways(pending_queue_t &job_queue, osmid_t id, size_t output_id, size_t& added) { + osmid_t const prev = ways_pending_tracker->last_returned(); + if (id_tracker::is_valid(prev) && prev >= id) { + if (prev > id) { + job_queue.push(pending_job_t(id, output_id)); + } + // already done the job + return; + } + //make sure we get the one passed in if(!ways_done_tracker->is_marked(id) && id_tracker::is_valid(id)) { job_queue.push(pending_job_t(id, output_id)); @@ -297,12 +306,11 @@ } //make sure to get this one as well and move to the next - if(popped == id) { - popped = ways_pending_tracker->pop_mark(); - } - if (!ways_done_tracker->is_marked(popped) && id_tracker::is_valid(popped)) { - job_queue.push(pending_job_t(popped, output_id)); - added++; + if(popped > id) { + if (!ways_done_tracker->is_marked(popped) && id_tracker::is_valid(popped)) { + job_queue.push(pending_job_t(popped, output_id)); + added++; + } } } @@ -322,6 +330,15 @@ } void output_pgsql_t::enqueue_relations(pending_queue_t &job_queue, osmid_t id, size_t output_id, size_t& added) { + osmid_t const prev = rels_pending_tracker->last_returned(); + if (id_tracker::is_valid(prev) && prev >= id) { + if (prev > id) { + job_queue.push(pending_job_t(id, output_id)); + } + // already done the job + return; + } + //make sure we get the one passed in if(id_tracker::is_valid(id)) { job_queue.push(pending_job_t(id, output_id)); @@ -341,12 +358,11 @@ } //make sure to get this one as well and move to the next - if(popped == id) { - popped = rels_pending_tracker->pop_mark(); - } - if(id_tracker::is_valid(popped)) { - job_queue.push(pending_job_t(popped, output_id)); - added++; + if(popped > id) { + if(id_tracker::is_valid(popped)) { + job_queue.push(pending_job_t(popped, output_id)); + added++; + } } } diff -Nru osm2pgsql-0.88.0/table.cpp osm2pgsql-0.88.1/table.cpp --- osm2pgsql-0.88.0/table.cpp 2015-07-13 22:51:12.000000000 +0000 +++ osm2pgsql-0.88.1/table.cpp 2015-08-15 05:28:11.000000000 +0000 @@ -229,6 +229,8 @@ pgsql_exec_simple(sql_conn, PGRES_COMMAND_OK, (fmt("CREATE TABLE %1%_tmp %2% AS SELECT * FROM %3% ORDER BY CASE WHEN ST_IsEmpty(way) THEN NULL ELSE ST_GeoHash(ST_Transform(ST_Envelope(way),4326),10) END") % name % (table_space ? "TABLESPACE " + table_space.get() : "") % name).str()); pgsql_exec_simple(sql_conn, PGRES_COMMAND_OK, (fmt("DROP TABLE %1%") % name).str()); pgsql_exec_simple(sql_conn, PGRES_COMMAND_OK, (fmt("ALTER TABLE %1%_tmp RENAME TO %2%") % name % name).str()); + // Re-add constraints if on 1.x. 2.0 has typemod, and they automatically come with CREATE TABLE AS + pgsql_exec_simple(sql_conn, PGRES_TUPLES_OK, (fmt("SELECT CASE WHEN PostGIS_Lib_Version() LIKE '1.%%' THEN Populate_Geometry_Columns('%1%'::regclass) ELSE 1 END;") % name).str()); fprintf(stderr, "Copying %s to cluster by geometry finished\n", name.c_str()); fprintf(stderr, "Creating geometry index on %s\n", name.c_str());