Skip to content

Commit 44d4e9e

Browse files
committed
Add _t suffix to class reprojection
1 parent c03742a commit 44d4e9e

19 files changed

+64
-60
lines changed

src/command-line-parser.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ options_t parse_command_line(int argc, char *argv[])
392392
app.add_flag_function("-l,--latlong",
393393
[&](int64_t) {
394394
options.projection =
395-
reprojection::create_projection(PROJ_LATLONG);
395+
reprojection_t::create_projection(
396+
PROJ_LATLONG);
396397
})
397398
->description("Store data in degrees of latitude & longitude (WGS84).")
398399
->group("Pgsql output options");
@@ -401,7 +402,7 @@ options_t parse_command_line(int argc, char *argv[])
401402
app.add_flag_function("-m,--merc",
402403
[&](int64_t) {
403404
options.projection =
404-
reprojection::create_projection(
405+
reprojection_t::create_projection(
405406
PROJ_SPHERE_MERC);
406407
})
407408
->description("Store data in Web Mercator [EPSG 3857]. This is the "
@@ -425,7 +426,7 @@ options_t parse_command_line(int argc, char *argv[])
425426
#ifdef HAVE_GENERIC_PROJ
426427
[&](int arg) {
427428
options.projection =
428-
reprojection::create_projection(arg);
429+
reprojection_t::create_projection(arg);
429430
#else
430431
[&](int) {
431432
throw std::runtime_error{
@@ -665,7 +666,8 @@ options_t parse_command_line(int argc, char *argv[])
665666
}
666667

667668
if (!options.projection) {
668-
options.projection = reprojection::create_projection(PROJ_SPHERE_MERC);
669+
options.projection =
670+
reprojection_t::create_projection(PROJ_SPHERE_MERC);
669671
}
670672

671673
check_options_expire(&options);

src/expire-tiles.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "wkb.hpp"
2828

2929
expire_tiles::expire_tiles(uint32_t max_zoom,
30-
std::shared_ptr<reprojection> projection)
30+
std::shared_ptr<reprojection_t> projection)
3131
: m_projection(std::move(projection)), m_maxzoom(max_zoom),
3232
m_map_width(static_cast<int>(1U << m_maxzoom))
3333
{}

src/expire-tiles.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
#include "pgsql.hpp"
2626
#include "tile.hpp"
2727

28-
class reprojection;
28+
class reprojection_t;
2929

3030
class expire_tiles
3131
{
3232
public:
33-
expire_tiles(uint32_t max_zoom, std::shared_ptr<reprojection> projection);
33+
expire_tiles(uint32_t max_zoom, std::shared_ptr<reprojection_t> projection);
3434

3535
bool empty() const noexcept { return m_dirty_tiles.empty(); }
3636

@@ -115,7 +115,7 @@ class expire_tiles
115115
/// The tile which has been added last to the unordered set.
116116
tile_t m_prev_tile;
117117

118-
std::shared_ptr<reprojection> m_projection;
118+
std::shared_ptr<reprojection_t> m_projection;
119119

120120
uint32_t m_maxzoom;
121121
int m_map_width;

src/flex-table.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class table_connection_t
278278
public:
279279
table_connection_t(flex_table_t *table,
280280
std::shared_ptr<db_copy_thread_t> const &copy_thread)
281-
: m_proj(reprojection::create_projection(table->srid())), m_table(table),
281+
: m_proj(reprojection_t::create_projection(table->srid())), m_table(table),
282282
m_target(std::make_shared<db_target_descr_t>(
283283
table->schema(), table->name(), table->id_column_names(),
284284
table->build_sql_column_list())),
@@ -314,7 +314,7 @@ class table_connection_t
314314

315315
void delete_rows_with(osmium::item_type type, osmid_t id);
316316

317-
reprojection const &proj() const noexcept
317+
reprojection_t const &proj() const noexcept
318318
{
319319
assert(m_proj);
320320
return *m_proj;
@@ -335,7 +335,7 @@ class table_connection_t
335335
}
336336

337337
private:
338-
std::shared_ptr<reprojection> m_proj;
338+
std::shared_ptr<reprojection_t> m_proj;
339339

340340
flex_table_t *m_table;
341341

src/geom-functions.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class transform_visitor_t
134134
{
135135
public:
136136
explicit transform_visitor_t(geometry_t *output,
137-
reprojection const *reprojection)
137+
reprojection_t const *reprojection)
138138
: m_output(output), m_reprojection(reprojection)
139139
{}
140140

@@ -220,14 +220,14 @@ class transform_visitor_t
220220
}
221221

222222
geometry_t *m_output;
223-
reprojection const *m_reprojection;
223+
reprojection_t const *m_reprojection;
224224

225225
}; // class transform_visitor_t
226226

227227
} // anonymous namespace
228228

229229
void transform(geometry_t *output, geometry_t const &input,
230-
reprojection const &reprojection)
230+
reprojection_t const &reprojection)
231231
{
232232
assert(input.srid() == PROJ_LATLONG);
233233

@@ -236,7 +236,8 @@ void transform(geometry_t *output, geometry_t const &input,
236236
input.visit(transform_visitor_t{output, &reprojection});
237237
}
238238

239-
geometry_t transform(geometry_t const &input, reprojection const &reprojection)
239+
geometry_t transform(geometry_t const &input,
240+
reprojection_t const &reprojection)
240241
{
241242
geometry_t output;
242243
transform(&output, input, reprojection);

src/geom-functions.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ geometry_t geometry_n(geometry_t const &input, std::size_t n);
100100
* \pre \code geom.srid() == 4326 \endcode
101101
*/
102102
void transform(geometry_t *output, geometry_t const &input,
103-
reprojection const &reprojection);
103+
reprojection_t const &reprojection);
104104

105105
/**
106106
* Transform a geometry in 4326 into some other projection.
@@ -111,7 +111,8 @@ void transform(geometry_t *output, geometry_t const &input,
111111
*
112112
* \pre \code geom.srid() == 4326 \endcode
113113
*/
114-
geometry_t transform(geometry_t const &input, reprojection const &reprojection);
114+
geometry_t transform(geometry_t const &input,
115+
reprojection_t const &reprojection);
115116

116117
/**
117118
* Returns a modified geometry having no segment longer than the given

src/options.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <string>
2020
#include <vector>
2121

22-
class reprojection;
22+
class reprojection_t;
2323

2424
enum class command_t : uint8_t
2525
{
@@ -93,7 +93,7 @@ struct options_t
9393

9494
std::vector<std::string> input_files;
9595

96-
std::shared_ptr<reprojection> projection; ///< SRS of projection
96+
std::shared_ptr<reprojection_t> projection; ///< SRS of projection
9797

9898
/// Max bbox size in either dimension to expire full bbox for a polygon
9999
double expire_tiles_max_bbox = 20000.0;

src/output-flex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ output_flex_t::output_flex_t(output_flex_t const *other,
12071207
for (auto &expire_output : *m_expire_outputs) {
12081208
m_expire_tiles.emplace_back(
12091209
expire_output.maxzoom(),
1210-
reprojection::create_projection(PROJ_SPHERE_MERC));
1210+
reprojection_t::create_projection(PROJ_SPHERE_MERC));
12111211
}
12121212
}
12131213

@@ -1273,7 +1273,7 @@ output_flex_t::output_flex_t(std::shared_ptr<middle_query_t> const &mid,
12731273
for (auto const &expire_output : *m_expire_outputs) {
12741274
m_expire_tiles.emplace_back(
12751275
expire_output.maxzoom(),
1276-
reprojection::create_projection(PROJ_SPHERE_MERC));
1276+
reprojection_t::create_projection(PROJ_SPHERE_MERC));
12771277
}
12781278

12791279
create_expire_tables(*m_expire_outputs, get_options()->connection_params);

src/output-pgsql.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ double calculate_area(bool reproject_area, geom::geometry_t const &geom4326,
5252
geom::geometry_t const &projected_geom)
5353
{
5454
static thread_local auto const proj3857 =
55-
reprojection::create_projection(PROJ_SPHERE_MERC);
55+
reprojection_t::create_projection(PROJ_SPHERE_MERC);
5656

5757
if (reproject_area) {
5858
auto const ogeom = geom::transform(geom4326, *proj3857);

src/output-pgsql.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class output_pgsql_t : public output_t
106106

107107
std::array<std::unique_ptr<table_t>, t_MAX> m_tables;
108108

109-
std::shared_ptr<reprojection> m_proj;
109+
std::shared_ptr<reprojection_t> m_proj;
110110
expire_config_t m_expire_config;
111111
expire_tiles m_expire;
112112

0 commit comments

Comments
 (0)