1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
|
--- src/vw/BundleAdjustment/ControlNetworkLoader.cc.orig 2013-03-08 16:52:15.333578744 +0100
+++ src/vw/BundleAdjustment/ControlNetworkLoader.cc 2013-03-08 16:53:50.333576735 +0100
@@ -43,7 +43,7 @@
for ( unsigned i = 0; i < image_files.size(); i++ ) {
fs::path image_path( image_files[i] );
crn.add_node( CameraNode<IPFeature>( i,
- image_path.stem() ) );
+ image_path.stem().string() ) );
}
// 2.) Load up matches into CRN
@@ -56,7 +56,7 @@
for ( unsigned j = i+1; j < image_files.size(); ++j ) {
std::string match_filename =
fs::path( image_files[i] ).replace_extension().string() + "__" +
- fs::path( image_files[j] ).stem() + ".match";
+ fs::path( image_files[j] ).stem().string() + ".match";
if ( !fs::exists( match_filename ) )
continue;
--- src/vw/Mosaic/GigapanQuadTreeConfig.cc.orig 2013-03-08 16:56:46.233577784 +0100
+++ src/vw/Mosaic/GigapanQuadTreeConfig.cc 2013-03-08 16:57:04.755613462 +0100
@@ -87,7 +87,7 @@
if ( root_node) {
std::ostringstream json;
- fs::path file_path( info.filepath, fs::native );
+ fs::path file_path( info.filepath );
fs::path json_path = change_extension( file_path, ".json" );
json << "{" << std::endl
--- src/vw/FileIO/KML.cc.orig 2013-03-08 16:55:22.113578106 +0100
+++ src/vw/FileIO/KML.cc 2013-03-08 16:56:08.907603626 +0100
@@ -248,7 +248,7 @@
std::ostringstream path;
if ( m_directory != "" )
path << m_directory << "/";
- fs::path kml_path( path.str(), fs::native );
+ fs::path kml_path( path.str() );
fs::create_directories( kml_path );
path << m_filename;
kml_path = path.str();
--- src/vw/BundleAdjustment/ControlNetworkLoader.h.orig 2013-03-08 16:54:36.249577058 +0100
+++ src/vw/BundleAdjustment/ControlNetworkLoader.h 2013-03-08 16:55:07.281602691 +0100
@@ -46,7 +46,7 @@
std::map<std::string,unsigned> image_lookup;
for (unsigned i = 0; i < image_files.size(); i++ ) {
image_lookup[image_files[i]] = i;
- image_lookup[fs::path(image_files[i]).filename()] = i;
+ image_lookup[fs::path(image_files[i]).filename().string()] = i;
}
while ( gcp_start != gcp_end ) {
@@ -126,7 +126,7 @@
std::map<std::string,unsigned> image_lookup;
for (unsigned i = 0; i < image_files.size(); i++ ) {
image_lookup[image_files[i]] = i;
- image_lookup[fs::path(image_files[i]).filename()] = i;
+ image_lookup[fs::path(image_files[i]).filename().string()] = i;
}
while ( gcpcnet_start != gcpcnet_end ) {
--- src/vw/Mosaic/ToastQuadTreeConfig.h.orig 2013-03-08 16:59:57.069577673 +0100
+++ src/vw/Mosaic/ToastQuadTreeConfig.h 2013-03-08 17:15:44.380685037 +0100
@@ -189,13 +189,13 @@
}
// Read it in from disk
- fs::path path( qtree->get_name(), fs::native );
+ fs::path path( qtree->get_name() );
std::ostringstream filename;
filename << level << "/" << x << "/" << y << "." << qtree->get_file_type();
path /= filename.str();
ImageView<PixelT> tile;
if( exists(path) ) {
- read_image( tile, path.native_file_string() );
+ read_image( tile, path.string() );
}
// Save it in the cache. The cache size of 1024 tiles was chosen
@@ -240,7 +240,7 @@
generate_branch( branch_level, level+1, 2*x+1, 2*y+1, SubProgressCallback(progress_callback, 0.75, 1.00) );
}
else {
- fs::path path( qtree->get_name(), fs::native );
+ fs::path path( qtree->get_name() );
std::ostringstream filename;
filename << level << "/" << x << "/" << y << "." << qtree->get_file_type();
path /= filename.str();
@@ -277,8 +277,8 @@
}
if( ! is_transparent(tile) ) {
- create_directories( path.branch_path() );
- write_image( path.native_file_string(), tile );
+ create_directories( path.parent_path() );
+ write_image( path.string(), tile );
}
progress_callback.report_progress(1);
--- src/vw/Mosaic/CelestiaQuadTreeConfig.cc.orig 2013-03-08 17:00:36.216575686 +0100
+++ src/vw/Mosaic/CelestiaQuadTreeConfig.cc 2013-03-08 17:06:42.847575641 +0100
@@ -20,7 +20,7 @@
}
std::string CelestiaQuadTreeConfig::image_path( QuadTreeGenerator const& qtree, std::string const& name ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
Vector<size_t,2> pos(0,0);
for ( size_t i=0; i < name.length(); ++i ) {
@@ -44,7 +44,7 @@
path /= oss.str();
- return path.native_file_string();
+ return path.string();
}
void CelestiaQuadTreeConfig::configure( QuadTreeGenerator& qtree ) const {
--- src/vw/Mosaic/QuadTreeGenerator.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/Mosaic/QuadTreeGenerator.cc 2013-03-08 17:15:35.038577037 +0100
@@ -17,13 +17,13 @@
namespace mosaic {
std::string QuadTreeGenerator::simple_image_path::operator()( QuadTreeGenerator const& qtree, std::string const& name ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
path /= "r" + name;
- return path.native_file_string();
+ return path.string();
}
std::string QuadTreeGenerator::tiered_image_path::operator()( QuadTreeGenerator const& qtree, std::string const& name, int32 levels_per_directory ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
std::string rname = "r" + name;
@@ -32,14 +32,14 @@
}
path /= rname;
- return path.native_file_string();
+ return path.string();
}
std::string QuadTreeGenerator::named_tiered_image_path::operator()( QuadTreeGenerator const& qtree, std::string const& name, int32 levels_per_directory ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
if( name.length() == 0 ) {
- path /= change_extension( path, "" ).leaf();
+ path /= change_extension( path, "" ).filename().string();
}
else {
for ( int32 i=0; i<(int32)name.length() - levels_per_directory; i+=levels_per_directory ) {
@@ -48,7 +48,7 @@
path /= name;
}
- return path.native_file_string();
+ return path.string();
}
std::vector<std::pair<std::string,vw::BBox2i> > QuadTreeGenerator::default_branch_func::operator()( QuadTreeGenerator const& qtree, std::string const& name, BBox2i const& region ) {
@@ -63,7 +63,7 @@
}
boost::shared_ptr<DstImageResource> QuadTreeGenerator::default_tile_resource_func::operator()( QuadTreeGenerator const&, TileInfo const& info, ImageFormat const& format ) {
- create_directories( fs::path( info.filepath, fs::native ).branch_path() );
+ create_directories( fs::path( info.filepath ).parent_path() );
return boost::shared_ptr<DstImageResource>( DiskImageResource::create( info.filepath+info.filetype, format ) );
}
--- src/vw/Mosaic/UniviewQuadTreeConfig.cc.orig 2013-03-08 17:02:02.216579576 +0100
+++ src/vw/Mosaic/UniviewQuadTreeConfig.cc 2013-03-08 17:15:16.050574661 +0100
@@ -56,7 +56,7 @@
}
std::string UniviewQuadTreeConfig::image_path( QuadTreeGenerator const& qtree, std::string const& name ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
Vector2i pos(0,0);
for ( int i=0; i<(int)name.length(); ++i ) {
@@ -75,12 +75,12 @@
oss << name.length()-1 << "/" << pos.y() << "/" << pos.x();
path /= oss.str();
- return path.native_file_string();
+ return path.string();
}
boost::shared_ptr<DstImageResource> UniviewQuadTreeConfig::terrain_tile_resource( QuadTreeGenerator const& /*qtree*/,QuadTreeGenerator::TileInfo const& info, ImageFormat const& format ) {
- create_directories( fs::path( info.filepath, fs::native ).branch_path() );
+ create_directories( fs::path( info.filepath ).parent_path() );
return boost::shared_ptr<DstImageResource>( new UniviewTerrainResource( info.filepath+info.filetype, format ) );
}
--- src/vw/Mosaic/TMSQuadTreeConfig.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/Mosaic/TMSQuadTreeConfig.cc 2013-03-08 17:07:28.324574605 +0100
@@ -14,7 +14,7 @@
namespace mosaic {
std::string TMSQuadTreeConfig::image_path( QuadTreeGenerator const& qtree, std::string const& name ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name() );
Vector2i pos(0,0);
for ( int i=0; i<(int)name.length(); ++i ) {
@@ -30,7 +30,7 @@
oss << name.length() << "/" << pos.x() << "/" << pos.y();
path /= oss.str();
- return path.native_file_string();
+ return path.string();
}
void TMSQuadTreeConfig::configure( QuadTreeGenerator& qtree ) const {
--- src/vw/Mosaic/KMLQuadTreeConfig.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/Mosaic/KMLQuadTreeConfig.cc 2013-03-08 17:15:08.901576709 +0100
@@ -224,8 +224,8 @@
void KMLQuadTreeConfigData::metadata_func( QuadTreeGenerator const& qtree, QuadTreeGenerator::TileInfo const& info ) const {
std::ostringstream kml;
- fs::path file_path( info.filepath, fs::native );
- size_t base_len = file_path.branch_path().native_file_string().size() + 1;
+ fs::path file_path( info.filepath );
+ size_t base_len = file_path.parent_path().string().size() + 1;
fs::path kml_path = change_extension( file_path, ".kml" );
kml << std::setprecision(10);
@@ -256,7 +256,7 @@
std::vector<std::pair<std::string,BBox2i> > children = qtree.branches( info.name, info.region_bbox );
for( unsigned i=0; i<children.size(); ++i ) {
std::string kmlfile = qtree.image_path(children[i].first) + ".kml";
- if( exists( fs::path( kmlfile, fs::native ) ) ) {
+ if( exists( fs::path( kmlfile ) ) ) {
num_children++;
kml << kml_network_link( children[i].first.substr(children[i].first.size()-1),
kmlfile.substr(base_len),
@@ -270,7 +270,7 @@
int draw_order = m_draw_order_offset + int(info.name.size());
BBox2i go_bbox = (qtree.get_crop_images() ? info.image_bbox : info.region_bbox);
if( exists( fs::path( info.filepath + info.filetype ) ) ) {
- kml << kml_ground_overlay( file_path.leaf() + info.filetype,
+ kml << kml_ground_overlay( file_path.filename().string() + info.filetype,
pixels_to_longlat( info.region_bbox, qtree.get_dimensions() ),
pixels_to_longlat( go_bbox, qtree.get_dimensions() ),
draw_order, qtree.get_tile_size()/2, max_lod );
@@ -322,7 +322,7 @@
}
boost::shared_ptr<DstImageResource> KMLQuadTreeConfigData::tile_resource_func( QuadTreeGenerator const&, QuadTreeGenerator::TileInfo const& info, ImageFormat const& format ) const {
- create_directories( fs::path( info.filepath, fs::native ).branch_path() );
+ create_directories( fs::path( info.filepath ).parent_path() );
if( info.filetype == ".png" && (format.pixel_format==VW_PIXEL_RGBA || format.pixel_format==VW_PIXEL_GRAYA) ) {
return boost::shared_ptr<DstImageResource>( new DiskImageResourcePNGAlphaHack( info.filepath+info.filetype, format ) );
}
--- src/vw/Core/tests/TestTemporaryFile.cxx.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/Core/tests/TestTemporaryFile.cxx 2013-03-08 17:05:44.024579819 +0100
@@ -31,11 +31,11 @@
}
string get_prefix(const TemporaryFile& f, size_t len) {
- return fs::path(f.filename()).leaf().substr(0, len);
+ return fs::path(f.filename()).filename().string().substr(0, len);
}
string get_suffix(const TemporaryFile& f, size_t len) {
- string fn = fs::path(f.filename()).leaf();
+ string fn = fs::path(f.filename()).filename().string();
return fn.substr(fn.size()-len, len);
}
--- src/vw/tools/correlate.cc.orig 2013-03-08 17:10:12.973587146 +0100
+++ src/vw/tools/correlate.cc 2013-03-08 17:09:43.786595690 +0100
@@ -95,7 +95,7 @@
return 1;
}
- std::string match_filename = fs::path( left_file_name ).replace_extension().string() + "__" + fs::path( right_file_name ).stem() + ".match";
+ std::string match_filename = fs::path( left_file_name ).replace_extension().string() + "__" + fs::path( right_file_name ).stem().string() + ".match";
if ( fs::exists( match_filename ) ) {
vw_out() << "Found a match file. Using it to pre-align images.\n";
std::vector<ip::InterestPoint> matched_ip1, matched_ip2;
--- src/vw/tools/ipmatch.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/tools/ipmatch.cc 2013-03-08 17:10:40.056574977 +0100
@@ -214,13 +214,13 @@
std::string output_filename =
fs::path(input_file_names[i]).replace_extension().string() + "__" +
- fs::path(input_file_names[j]).stem() + ".match";
+ fs::path(input_file_names[j]).stem().string() + ".match";
write_binary_match_file(output_filename, final_ip1, final_ip2);
if (vm.count("debug-image")) {
std::string matchimage_filename =
fs::path(input_file_names[i]).replace_extension().string() + "__" +
- fs::path(input_file_names[j]).stem() + ".png";
+ fs::path(input_file_names[j]).stem().string() + ".png";
write_match_image(matchimage_filename,
input_file_names[i], input_file_names[j],
final_ip1, final_ip2);
--- src/vw/tools/ipalign.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/tools/ipalign.cc 2013-03-08 17:11:06.293581132 +0100
@@ -209,7 +209,7 @@
}
std::string output_filename =
fs::path(ref_name).replace_extension().string() + "__" +
- fs::path(input_name).stem() + ".match";
+ fs::path(input_name).stem().string() + ".match";
write_binary_match_file(output_filename, final_ip1, final_ip2);
}
--- src/vw/tools/ba_test.cc.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/tools/ba_test.cc 2013-03-08 17:14:46.816575195 +0100
@@ -508,7 +508,7 @@
#if (BOOST_VERSION >= 103600)
if (!file.has_parent_path())
#else
- if (!file.has_branch_path())
+ if (!file.has_parent_path())
#endif
{ file = dir / file; }
--- src/vw/Core/Thread.h.orig 2011-05-13 01:00:56.000000000 +0200
+++ src/vw/Core/Thread.h 2013-03-08 17:22:49.709580051 +0100
@@ -156,7 +156,7 @@
template<typename LockT>
bool timed_wait(LockT &lock, unsigned long milliseconds) {
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
while (milliseconds >= 1000) {
xt.sec++;
milliseconds -= 1000;
@@ -168,7 +168,7 @@
template<typename LockT, typename Pred>
bool timed_wait(LockT &lock, unsigned long milliseconds, Pred pred) {
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
while (milliseconds >= 1000) {
xt.sec++;
milliseconds -= 1000;
@@ -250,7 +250,7 @@
/// threads/processes.
static inline void sleep_ms( uint32 milliseconds ) {
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
while (milliseconds >= 1000) {
xt.sec++;
milliseconds -= 1000;
--- src/vw/Core/Settings.cc.orig 2013-03-08 17:21:56.326584731 +0100
+++ src/vw/Core/Settings.cc 2013-03-08 17:22:09.988577481 +0100
@@ -56,7 +56,7 @@
// call reload_config and deadlock!
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
bool needs_reloading = false;
// Every five seconds, we attempt to open the log config file to see
--- src/vw/Mosaic/GMapQuadTreeConfig.cc.orig 2013-03-12 12:25:10.297738955 +0100
+++ src/vw/Mosaic/GMapQuadTreeConfig.cc 2013-03-12 13:09:37.326744526 +0100
@@ -19,7 +19,7 @@
// for gmaps, origin is upper left, advancing right and down.
std::string GMapQuadTreeConfig::image_path( QuadTreeGenerator const& qtree, std::string const& name ) {
- fs::path path( qtree.get_name(), fs::native );
+ fs::path path( qtree.get_name());
Vector<size_t, 2> pos(0,0);
BOOST_FOREACH(char n, name) {
@@ -39,11 +39,11 @@
oss << name.length() << "/" << pos.x() << "/" << pos.y();
path /= oss.str();
- return path.native_file_string();
+ return path.string();
}
boost::shared_ptr<DstImageResource> GMapQuadTreeConfig::tile_resource( QuadTreeGenerator const& /*qtree*/, QuadTreeGenerator::TileInfo const& info, ImageFormat const& format ) {
- create_directories( fs::path( info.filepath, fs::native ).branch_path() );
+ create_directories( fs::path( info.filepath ).parent_path() );
return boost::shared_ptr<DstImageResource>( DiskImageResource::create( info.filepath + info.filetype, format, info.filetype ) );
}
--- src/vw/tools/blend.cc.orig 2013-03-12 13:34:46.914744538 +0100
+++ src/vw/tools/blend.cc 2013-03-12 13:35:13.477743815 +0100
@@ -47,7 +47,7 @@
std::map<std::string,fs::path> image_files;
std::map<std::string,fs::path> offset_files;
- fs::path source_dir_path( mosaic_name, fs::native );
+ fs::path source_dir_path( mosaic_name );
fs::directory_iterator pi( source_dir_path ), pend;
for( ; pi != pend; ++pi ) {
if( extension(*pi) == ".offset" )
|