@@ -134,84 +134,4 @@ class expire_tiles
134
134
int expire_from_result (expire_tiles *expire, pg_result_t const &result,
135
135
expire_config_t const &expire_config);
136
136
137
- /* *
138
- * Iterate over tiles and call output function for each tile on all requested
139
- * zoom levels.
140
- *
141
- * \tparam OUTPUT Class with operator() taking a tile_t argument
142
- *
143
- * \param tiles_at_maxzoom The list of tiles at maximum zoom level
144
- * \param minzoom Minimum zoom level
145
- * \param maxzoom Maximum zoom level
146
- * \param output Output function
147
- */
148
- template <class OUTPUT >
149
- std::size_t for_each_tile (quadkey_list_t const &tiles_at_maxzoom,
150
- uint32_t minzoom, uint32_t maxzoom, OUTPUT &&output)
151
- {
152
- assert (minzoom <= maxzoom);
153
-
154
- if (minzoom == maxzoom) {
155
- for (auto const quadkey : tiles_at_maxzoom) {
156
- std::forward<OUTPUT>(output)(
157
- tile_t::from_quadkey (quadkey, maxzoom));
158
- }
159
- return tiles_at_maxzoom.size ();
160
- }
161
-
162
- /* *
163
- * Loop over all requested zoom levels (from maximum down to the minimum
164
- * zoom level).
165
- */
166
- quadkey_t last_quadkey{};
167
- std::size_t count = 0 ;
168
- for (auto const quadkey : tiles_at_maxzoom) {
169
- for (uint32_t dz = 0 ; dz <= maxzoom - minzoom; ++dz) {
170
- auto const qt_current = quadkey.down (dz);
171
- /* *
172
- * If dz > 0, there are probably multiple elements whose quadkey
173
- * is equal because they are all sub-tiles of the same tile at the
174
- * current zoom level. We skip all of them after we have written
175
- * the first sibling.
176
- */
177
- if (qt_current != last_quadkey.down (dz)) {
178
- std::forward<OUTPUT>(output)(
179
- tile_t::from_quadkey (qt_current, maxzoom - dz));
180
- ++count;
181
- }
182
- }
183
- last_quadkey = quadkey;
184
- }
185
- return count;
186
- }
187
-
188
- /* *
189
- * Write the list of tiles to a file.
190
- *
191
- * \param tiles_at_maxzoom The list of tiles at maximum zoom level
192
- * \param minzoom Minimum zoom level
193
- * \param maxzoom Maximum zoom level
194
- * \param filename Name of the file
195
- */
196
- std::size_t output_tiles_to_file (quadkey_list_t const &tiles_at_maxzoom,
197
- uint32_t minzoom, uint32_t maxzoom,
198
- std::string_view filename);
199
-
200
- /* *
201
- * Write the list of tiles to a database table. The table will be created
202
- * if it doesn't exist already.
203
- *
204
- * \param tiles_at_maxzoom The list of tiles at maximum zoom level
205
- * \param minzoom Minimum zoom level
206
- * \param maxzoom Maximum zoom level
207
- * \param conninfo database connection info
208
- * \param schema The schema the table is in (empty for public schema)
209
- * \param table The table name
210
- */
211
- std::size_t output_tiles_to_table (quadkey_list_t const &tiles_at_maxzoom,
212
- uint32_t minzoom, uint32_t maxzoom,
213
- std::string const &conninfo,
214
- std::string const &schema,
215
- std::string const &table);
216
-
217
137
#endif // OSM2PGSQL_EXPIRE_TILES_HPP
0 commit comments