Update coastline fix

This commit is contained in:
Mikaël Capelle 2018-02-27 19:48:47 +01:00
parent 81ac3cc47e
commit bd1f850bf4
8 changed files with 2157 additions and 25 deletions

1
.gitignore vendored
View File

@ -6,5 +6,4 @@ inputs/land-polygons-split-4326
*.osm
*.shx
*.shp
*.poly
*.dbf

345
inputs/bbox/bretagne.poly Normal file
View File

@ -0,0 +1,345 @@
none
1
-4.963422E+00 4.709394E+01
-5.597685E+00 4.798896E+01
-5.883925E+00 4.884217E+01
-3.363363E+00 4.919312E+01
-1.801389E+00 4.879524E+01
-1.570048E+00 4.862724E+01
-1.564652E+00 4.862064E+01
-1.563489E+00 4.861510E+01
-1.543333E+00 4.860704E+01
-1.542196E+00 4.860289E+01
-1.536016E+00 4.859907E+01
-1.542692E+00 4.858679E+01
-1.541944E+00 4.858279E+01
-1.539558E+00 4.858117E+01
-1.531956E+00 4.858227E+01
-1.527330E+00 4.857995E+01
-1.525260E+00 4.857375E+01
-1.517827E+00 4.856699E+01
-1.524822E+00 4.855961E+01
-1.525422E+00 4.855602E+01
-1.529794E+00 4.855271E+01
-1.530397E+00 4.854898E+01
-1.526700E+00 4.854433E+01
-1.520481E+00 4.854261E+01
-1.514761E+00 4.853840E+01
-1.515424E+00 4.853250E+01
-1.494767E+00 4.850978E+01
-1.492703E+00 4.850165E+01
-1.487844E+00 4.849410E+01
-1.474719E+00 4.848691E+01
-1.466668E+00 4.848967E+01
-1.459788E+00 4.848642E+01
-1.455025E+00 4.848888E+01
-1.450155E+00 4.848893E+01
-1.441654E+00 4.848497E+01
-1.433761E+00 4.847840E+01
-1.436717E+00 4.847297E+01
-1.435588E+00 4.846981E+01
-1.426403E+00 4.846306E+01
-1.422128E+00 4.846189E+01
-1.414902E+00 4.846415E+01
-1.409000E+00 4.846178E+01
-1.397790E+00 4.846356E+01
-1.381055E+00 4.845807E+01
-1.370980E+00 4.846172E+01
-1.364969E+00 4.846802E+01
-1.354799E+00 4.846919E+01
-1.348867E+00 4.847493E+01
-1.350092E+00 4.848312E+01
-1.340359E+00 4.849198E+01
-1.333389E+00 4.849258E+01
-1.327567E+00 4.849979E+01
-1.321589E+00 4.850132E+01
-1.316268E+00 4.849797E+01
-1.301332E+00 4.850043E+01
-1.288208E+00 4.851060E+01
-1.280712E+00 4.851091E+01
-1.278534E+00 4.851664E+01
-1.271179E+00 4.852498E+01
-1.270816E+00 4.852940E+01
-1.273657E+00 4.853471E+01
-1.263219E+00 4.854136E+01
-1.252229E+00 4.854501E+01
-1.248471E+00 4.854484E+01
-1.246082E+00 4.854216E+01
-1.238998E+00 4.853949E+01
-1.230230E+00 4.853890E+01
-1.218828E+00 4.853884E+01
-1.206396E+00 4.854351E+01
-1.202941E+00 4.854205E+01
-1.194499E+00 4.853205E+01
-1.183639E+00 4.853000E+01
-1.170323E+00 4.853260E+01
-1.162900E+00 4.852956E+01
-1.153715E+00 4.852061E+01
-1.144400E+00 4.851920E+01
-1.133810E+00 4.852339E+01
-1.117490E+00 4.852302E+01
-1.113298E+00 4.851908E+01
-1.103435E+00 4.851452E+01
-1.092040E+00 4.851207E+01
-1.081442E+00 4.851274E+01
-1.076120E+00 4.851008E+01
-1.069675E+00 4.850997E+01
-1.067158E+00 4.850740E+01
-1.066019E+00 4.850385E+01
-1.073981E+00 4.849929E+01
-1.075065E+00 4.849215E+01
-1.068585E+00 4.848622E+01
-1.072994E+00 4.847923E+01
-1.072905E+00 4.847644E+01
-1.062745E+00 4.846754E+01
-1.065257E+00 4.846128E+01
-1.064068E+00 4.845122E+01
-1.078839E+00 4.844141E+01
-1.080989E+00 4.843431E+01
-1.076262E+00 4.842164E+01
-1.077246E+00 4.841406E+01
-1.069084E+00 4.840803E+01
-1.062321E+00 4.839994E+01
-1.060337E+00 4.839398E+01
-1.052152E+00 4.838255E+01
-1.052056E+00 4.838018E+01
-1.058922E+00 4.837093E+01
-1.054269E+00 4.836347E+01
-1.058546E+00 4.835699E+01
-1.058534E+00 4.835060E+01
-1.053924E+00 4.834033E+01
-1.043839E+00 4.832837E+01
-1.060586E+00 4.831027E+01
-1.081628E+00 4.829684E+01
-1.082701E+00 4.829245E+01
-1.088559E+00 4.828741E+01
-1.091325E+00 4.828207E+01
-1.091673E+00 4.827372E+01
-1.096693E+00 4.826976E+01
-1.099229E+00 4.826331E+01
-1.097051E+00 4.824989E+01
-1.089085E+00 4.823984E+01
-1.088778E+00 4.823416E+01
-1.085149E+00 4.823118E+01
-1.082710E+00 4.822304E+01
-1.079283E+00 4.821951E+01
-1.082815E+00 4.821014E+01
-1.072656E+00 4.820129E+01
-1.076411E+00 4.818996E+01
-1.077320E+00 4.817678E+01
-1.074009E+00 4.817245E+01
-1.070643E+00 4.816259E+01
-1.063059E+00 4.816121E+01
-1.059193E+00 4.815072E+01
-1.059629E+00 4.813629E+01
-1.057050E+00 4.813193E+01
-1.057734E+00 4.812627E+01
-1.052845E+00 4.811735E+01
-1.053393E+00 4.811146E+01
-1.049482E+00 4.810174E+01
-1.048370E+00 4.809090E+01
-1.039363E+00 4.807899E+01
-1.020152E+00 4.806857E+01
-1.026092E+00 4.806408E+01
-1.027100E+00 4.805852E+01
-1.031343E+00 4.805420E+01
-1.030460E+00 4.805047E+01
-1.025501E+00 4.804563E+01
-1.025983E+00 4.803906E+01
-1.030793E+00 4.803106E+01
-1.017177E+00 4.801349E+01
-1.014538E+00 4.800292E+01
-1.021852E+00 4.799308E+01
-1.037571E+00 4.798993E+01
-1.048408E+00 4.798338E+01
-1.064208E+00 4.798340E+01
-1.071465E+00 4.798058E+01
-1.091778E+00 4.798617E+01
-1.114734E+00 4.798664E+01
-1.122983E+00 4.798231E+01
-1.124610E+00 4.797042E+01
-1.133959E+00 4.796662E+01
-1.147230E+00 4.796651E+01
-1.154072E+00 4.796336E+01
-1.159847E+00 4.795070E+01
-1.158856E+00 4.793849E+01
-1.164035E+00 4.793380E+01
-1.162294E+00 4.792708E+01
-1.166901E+00 4.791606E+01
-1.174988E+00 4.790717E+01
-1.174958E+00 4.789701E+01
-1.179145E+00 4.789454E+01
-1.181096E+00 4.789104E+01
-1.189905E+00 4.789090E+01
-1.195686E+00 4.788613E+01
-1.196084E+00 4.788101E+01
-1.188985E+00 4.787341E+01
-1.188072E+00 4.786653E+01
-1.196055E+00 4.786272E+01
-1.202699E+00 4.785567E+01
-1.206745E+00 4.785629E+01
-1.215362E+00 4.785333E+01
-1.212690E+00 4.784405E+01
-1.214887E+00 4.783118E+01
-1.219687E+00 4.782483E+01
-1.218830E+00 4.782054E+01
-1.222402E+00 4.781809E+01
-1.230566E+00 4.781836E+01
-1.237736E+00 4.780832E+01
-1.238152E+00 4.780323E+01
-1.235310E+00 4.779781E+01
-1.239995E+00 4.779138E+01
-1.245184E+00 4.777579E+01
-1.311272E+00 4.778971E+01
-1.365397E+00 4.779786E+01
-1.365836E+00 4.780452E+01
-1.378366E+00 4.780868E+01
-1.382184E+00 4.782152E+01
-1.391446E+00 4.782708E+01
-1.397289E+00 4.782775E+01
-1.405210E+00 4.782310E+01
-1.411712E+00 4.782665E+01
-1.418143E+00 4.782601E+01
-1.424113E+00 4.783096E+01
-1.439613E+00 4.782915E+01
-1.448662E+00 4.783145E+01
-1.456653E+00 4.782985E+01
-1.463574E+00 4.783338E+01
-1.472574E+00 4.783143E+01
-1.474591E+00 4.782697E+01
-1.465659E+00 4.780825E+01
-1.470152E+00 4.780209E+01
-1.490720E+00 4.779698E+01
-1.506575E+00 4.779840E+01
-1.519953E+00 4.779200E+01
-1.529348E+00 4.778320E+01
-1.549040E+00 4.778153E+01
-1.555092E+00 4.778350E+01
-1.566428E+00 4.777743E+01
-1.586486E+00 4.777737E+01
-1.592465E+00 4.777341E+01
-1.593700E+00 4.776584E+01
-1.604636E+00 4.776131E+01
-1.611454E+00 4.776295E+01
-1.617314E+00 4.776073E+01
-1.623073E+00 4.776094E+01
-1.635007E+00 4.774012E+01
-1.638114E+00 4.772879E+01
-1.637166E+00 4.772158E+01
-1.647011E+00 4.771930E+01
-1.652483E+00 4.771493E+01
-1.653793E+00 4.771082E+01
-1.656977E+00 4.770825E+01
-1.660687E+00 4.770789E+01
-1.668923E+00 4.771102E+01
-1.681581E+00 4.771012E+01
-1.689861E+00 4.771187E+01
-1.694084E+00 4.770952E+01
-1.708305E+00 4.770717E+01
-1.710832E+00 4.769911E+01
-1.722315E+00 4.769700E+01
-1.729502E+00 4.769786E+01
-1.736645E+00 4.770291E+01
-1.750141E+00 4.770577E+01
-1.771216E+00 4.769697E+01
-1.784880E+00 4.769802E+01
-1.789102E+00 4.770040E+01
-1.802473E+00 4.770009E+01
-1.815699E+00 4.770409E+01
-1.820894E+00 4.770352E+01
-1.827757E+00 4.770792E+01
-1.840267E+00 4.770422E+01
-1.857643E+00 4.770702E+01
-1.862787E+00 4.770591E+01
-1.865344E+00 4.770132E+01
-1.877228E+00 4.769417E+01
-1.896426E+00 4.769465E+01
-1.936570E+00 4.768517E+01
-1.952863E+00 4.767134E+01
-1.957529E+00 4.766994E+01
-1.965858E+00 4.767023E+01
-1.970344E+00 4.767289E+01
-1.970633E+00 4.768809E+01
-1.975162E+00 4.769120E+01
-1.978509E+00 4.768934E+01
-1.981071E+00 4.768418E+01
-1.993813E+00 4.767648E+01
-2.007166E+00 4.767111E+01
-2.011955E+00 4.766512E+01
-2.037214E+00 4.766753E+01
-2.044663E+00 4.766376E+01
-2.046957E+00 4.766149E+01
-2.050791E+00 4.764872E+01
-2.067275E+00 4.764845E+01
-2.074363E+00 4.765059E+01
-2.081075E+00 4.764883E+01
-2.088946E+00 4.764155E+01
-2.092876E+00 4.763416E+01
-2.092425E+00 4.763111E+01
-2.086409E+00 4.762625E+01
-2.082843E+00 4.762012E+01
-2.084811E+00 4.760273E+01
-2.100472E+00 4.759589E+01
-2.102338E+00 4.759204E+01
-2.095169E+00 4.757144E+01
-2.097731E+00 4.756541E+01
-2.097884E+00 4.755814E+01
-2.102123E+00 4.754870E+01
-2.101438E+00 4.754597E+01
-2.095729E+00 4.754092E+01
-2.097561E+00 4.753338E+01
-2.114297E+00 4.752716E+01
-2.127512E+00 4.752781E+01
-2.132960E+00 4.752492E+01
-2.144435E+00 4.752372E+01
-2.152607E+00 4.752069E+01
-2.154088E+00 4.751829E+01
-2.151528E+00 4.751023E+01
-2.153176E+00 4.749582E+01
-2.163729E+00 4.748791E+01
-2.173935E+00 4.749053E+01
-2.182543E+00 4.748946E+01
-2.190855E+00 4.749353E+01
-2.193747E+00 4.749958E+01
-2.187968E+00 4.750388E+01
-2.188207E+00 4.750871E+01
-2.190466E+00 4.751055E+01
-2.212630E+00 4.750744E+01
-2.229147E+00 4.749748E+01
-2.244092E+00 4.749242E+01
-2.266129E+00 4.750059E+01
-2.265017E+00 4.750657E+01
-2.267813E+00 4.750941E+01
-2.274506E+00 4.751046E+01
-2.281319E+00 4.750823E+01
-2.288795E+00 4.751216E+01
-2.291969E+00 4.751194E+01
-2.295472E+00 4.750924E+01
-2.303224E+00 4.749045E+01
-2.311951E+00 4.748453E+01
-2.312606E+00 4.747579E+01
-2.310505E+00 4.746502E+01
-2.316703E+00 4.746001E+01
-2.326611E+00 4.745751E+01
-2.335025E+00 4.745828E+01
-2.347133E+00 4.745650E+01
-2.353098E+00 4.745312E+01
-2.370239E+00 4.746201E+01
-2.379761E+00 4.746130E+01
-2.389422E+00 4.745577E+01
-2.399485E+00 4.745457E+01
-2.417490E+00 4.745911E+01
-2.419154E+00 4.746486E+01
-2.423670E+00 4.746721E+01
-2.426133E+00 4.747089E+01
-2.428798E+00 4.747131E+01
-2.432534E+00 4.747017E+01
-2.436994E+00 4.746472E+01
-2.450700E+00 4.746211E+01
-2.457000E+00 4.744399E+01
-2.476844E+00 4.742439E+01
-2.606214E+00 4.736983E+01
-2.644864E+00 4.721199E+01
-4.963422E+00 4.709394E+01
END
END

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
42.467000,-0.427537,45.147790,3.553264

View File

@ -1 +1 @@
47.234,-3.598,47.997,-1.648
47.160000,-3.855000,48.330000,-1.915000

275
inputs/bbox/morbihan.poly Normal file
View File

@ -0,0 +1,275 @@
polygon
1
-3.755 48.115
-3.73 48.16
-3.705 48.17
-3.67 48.17
-3.62 48.195
-3.595 48.195
-3.585 48.205
-3.43 48.205
-3.4 48.185
-3.4 48.175
-3.38 48.185
-3.325 48.19
-3.31 48.175
-3.28 48.175
-3.275 48.165
-3.26 48.165
-3.225 48.17
-3.2 48.185
-3.175 48.18
-3.155 48.19
-3.14 48.22
-3.115 48.23
-3.03 48.225
-3.02 48.215
-3.01 48.22
-2.995 48.205
-2.995 48.19
-2.985 48.185
-2.92 48.19
-2.885 48.185
-2.85 48.16
-2.795 48.165
-2.77 48.135
-2.71 48.135
-2.675 48.155
-2.65 48.15
-2.63 48.12
-2.63 48.09
-2.645 48.06
-2.63 48.055
-2.605 48.07
-2.59 48.09
-2.575 48.09
-2.575 48.105
-2.54 48.13
-2.555 48.145
-2.555 48.165
-2.535 48.18
-2.415 48.195
-2.395 48.185
-2.355 48.145
-2.335 48.145
-2.325 48.155
-2.28 48.155
-2.235 48.12
-2.235 48.1
-2.18 48.105
-2.15 48.09
-2.15 48.055
-2.16 48.045
-2.19 48.03
-2.21 48.035
-2.245 48.03
-2.255 48.02
-2.2 48.015
-2.17 48
-2.14 48.005
-2.115 47.98
-2.095 47.975
-2.06 47.925
-2.065 47.895
-2.085 47.88
-2.075 47.875
-2.06 47.89
-2.04 47.885
-2.03 47.85
-2.015 47.84
-2.02 47.815
-2.035 47.8
-2.045 47.8
-2.065 47.77
-2.04 47.76
-2.04 47.725
-2.1 47.715
-2.1 47.695
-2.085 47.685
-2.085 47.66
-2.065 47.63
-2.065 47.6
-2.08 47.585
-2.08 47.525
-2.1 47.51
-2.135 47.505
-2.14 47.48
-2.155 47.47
-2.19 47.47
-2.205 47.485
-2.255 47.475
-2.285 47.49
-2.3 47.445
-2.345 47.435
-2.405 47.435
-2.44 47.445
-2.445 47.43
-2.46 47.43
-2.485 47.415
-2.515 47.43
-2.525 47.455
-2.525 47.505
-2.545 47.49
-2.59 47.5
-2.595 47.49
-2.64 47.485
-2.655 47.495
-2.655 47.485
-2.675 47.47
-2.705 47.485
-2.73 47.485
-2.755 47.475
-2.77 47.48
-2.785 47.465
-2.82 47.465
-2.86 47.48
-2.88 47.515
-2.925 47.52
-2.935 47.51
-2.96 47.51
-2.97 47.53
-3 47.535
-3.005 47.545
-3.03 47.545
-3.04 47.555
-3.08 47.545
-3.11 47.55
-3.1 47.51
-3.085 47.505
-3.07 47.485
-3.055 47.485
-3.05 47.475
-3.045 47.48
-3.025 47.465
-3.025 47.45
-3.04 47.435
-3.06 47.445
-3.145 47.455
-3.165 47.475
-3.165 47.49
-3.2 47.55
-3.195 47.565
-3.17 47.575
-3.165 47.585
-3.18 47.595
-3.21 47.59
-3.22 47.605
-3.22 47.625
-3.26 47.645
-3.265 47.655
-3.315 47.675
-3.34 47.675
-3.35 47.665
-3.37 47.665
-3.38 47.685
-3.46 47.675
-3.49 47.7
-3.5 47.7
-3.525 47.735
-3.55 47.755
-3.56 47.845
-3.53 47.87
-3.51 47.87
-3.5 47.85
-3.47 47.855
-3.47 47.87
-3.455 47.885
-3.43 47.89
-3.44 47.91
-3.42 47.93
-3.42 47.945
-3.445 47.94
-3.46 47.925
-3.475 47.925
-3.495 47.935
-3.505 47.955
-3.525 47.955
-3.555 47.97
-3.6 47.97
-3.615 47.96
-3.65 47.965
-3.665 47.995
-3.68 48.005
-3.69 48.035
-3.7 48.045
-3.715 48.045
-3.73 48.06
-3.73 48.075
-3.75 48.085
-3.755 48.115
END
2
-3.04 47.435
-2.995 47.43
-2.99 47.42
-2.97 47.415
-2.955 47.425
-2.935 47.42
-2.915 47.395
-2.925 47.36
-2.96 47.335
-2.98 47.335
-2.995 47.35
-2.99 47.375
-3.01 47.375
-3.045 47.405
-3.05 47.42
-3.04 47.435
END
3
-2.91 47.345
-2.9 47.365
-2.86 47.37
-2.845 47.36
-2.84 47.345
-2.825 47.345
-2.815 47.335
-2.815 47.315
-2.825 47.305
-2.85 47.305
-2.855 47.315
-2.9 47.315
-2.91 47.345
END
4
-3.285 47.355
-3.285 47.375
-3.27 47.405
-3.24 47.41
-3.23 47.4
-3.21 47.4
-3.205 47.39
-3.2 47.395
-3.185 47.385
-3.15 47.385
-3.125 47.35
-3.095 47.335
-3.07 47.34
-3.045 47.33
-3.035 47.3
-3.05 47.29
-3.06 47.27
-3.08 47.26
-3.105 47.26
-3.12 47.27
-3.15 47.265
-3.165 47.275
-3.22 47.27
-3.265 47.3
-3.285 47.355
END
5
-3.445 47.605
-3.47 47.6
-3.48 47.61
-3.515 47.62
-3.535 47.64
-3.53 47.665
-3.485 47.675
-3.415 47.66
-3.395 47.64
-3.4 47.615
-3.415 47.6
-3.445 47.605
END
END

View File

@ -0,0 +1 @@
47.234,-3.598,47.997,-1.648

View File

@ -8,21 +8,30 @@ OSMOSIS=$(pwd)/../bin/osmosis
# Input folder
INPUTS=$(pwd)
# Change to desired region
REGION=$1
# Input PBF
inpbf=$1
if [ -z "${REGION}" ]; then
echo "Usage: $0: REGION_NAME"
if [ -z "${inpbf}" ]; then
echo "Usage: $0: PBF_FILE"
exit 1
fi
if [ ! -e "${REGION}/${REGION}-latest.osm.pbf" ]; then
echo "${REGION}/${REGION}-latest.pbf does not exist, you may want to download it from https://download.geofabrik.de/index.html."
region_dir=$(dirname $(realpath ${inpbf}))
region_name=$(basename ${inpbf} .pbf)
region_name=$(basename ${region_name} .osm)
poly_file=${region_dir}/${region_name}.poly
if [ ! -e "${inpbf}" ]; then
echo "${inpbf} does not exist, you may want to download it from https://download.geofabrik.de/index.html."
exit 1
fi
if [ ! -e "${REGION}/${REGION}.poly" ]; then
echo "${REGION}/${REGION}.poly does not exist, you may want to download it from https://download.geofabrik.de/index.html."
if [ ! -e "${poly_file}" ]; then
poly_file=${INPUTS}/bbox/${region_name}.poly
fi
if [ ! -e "${poly_file}" ]; then
echo "Unable to find polygon file, you may want to download it from https://download.geofabrik.de/index.html."
exit 1
fi
@ -33,43 +42,48 @@ fi
# Bounds
cd mapsforge-creator
olddir=$(pwd)
cd ${INPUTS}/mapsforge-creator
BBOX=$(perl poly2bb.pl "${poly_file}")
echo "$BBOX" > ${INPUTS}/bbox/${region_name}.bbox
BBOX=$(perl poly2bb.pl "$INPUTS/$REGION/$REGION.poly")
BBOX=(${BBOX//,/ })
BOTTOM=${BBOX[0]}
LEFT=${BBOX[1]}
TOP=${BBOX[2]}
RIGHT=${BBOX[3]}
# Start position
CENTER=$(perl poly2center.pl "$INPUTS/$REGION/$REGION.poly")
CENTER=$(perl poly2center.pl "${poly_file}")
CENTER=(${CENTER//,/ })
LAT=${CENTER[0]}
LON=${CENTER[1]}
# Land
ogr2ogr -overwrite -progress -skipfailures -clipsrc $LEFT $BOTTOM $RIGHT $TOP "$INPUTS/$REGION/${REGION}_land.shp" "$INPUTS/land-polygons-split-4326/land_polygons.shp"
python shape2osm.py -l "$INPUTS/$REGION/${REGION}_land" "$INPUTS/$REGION/${REGION}_land.shp"
ogr2ogr -overwrite -progress -skipfailures -clipsrc $LEFT $BOTTOM $RIGHT $TOP "${region_dir}/${region_name}_land.shp" "$INPUTS/land-polygons-split-4326/land_polygons.shp"
python shape2osm.py -l "${region_dir}/${region_name}_land" "${region_dir}/${region_name}_land.shp"
# Sea
cp sea.osm "$INPUTS/$REGION/"
sed -i "s/\$BOTTOM/$BOTTOM/g" "$INPUTS/$REGION/sea.osm"
sed -i "s/\$LEFT/$LEFT/g" "$INPUTS/$REGION/sea.osm"
sed -i "s/\$TOP/$TOP/g" "$INPUTS/$REGION/sea.osm"
sed -i "s/\$RIGHT/$RIGHT/g" "$INPUTS/$REGION/sea.osm"
sea_file="${region_dir}/${region_name}_sea.osm"
cp sea.osm "${sea_file}"
sed -i "s/\$BOTTOM/$BOTTOM/g" "${sea_file}"
sed -i "s/\$LEFT/$LEFT/g" "${sea_file}"
sed -i "s/\$TOP/$TOP/g" "${sea_file}"
sed -i "s/\$RIGHT/$RIGHT/g" "${sea_file}"
cd $INPUTS
cd ${olddir}
CMD="$OSMOSIS --rb file=$INPUTS/$REGION/$REGION-latest.osm.pbf \
--rx file=$INPUTS/$REGION/sea.osm --s --m"
for f in $INPUTS/$REGION/${REGION}_land*.osm; do
CMD="$OSMOSIS --rb file=${inpbf} \
--rx file=${sea_file} --s --m"
for f in ${region_dir}/${region_name}_land*.osm; do
CMD="$CMD --rx file=$f --s --m"
done
CMD="$CMD --wb file=$INPUTS/$REGION/${REGION}_merge.pbf omitmetadata=true"
CMD="$CMD --wb file=${region_dir}/${region_name}_merge.pbf omitmetadata=true"
echo $CMD
$CMD