From f0f6fcf256c83176dbcda0d0fd4fec977ea8a0ad Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 15 May 2016 11:29:09 +0200 Subject: [PATCH] fix scene making scripts and add building-parallel-road scene Scripts updated to newest libosmium and shebang fixed. --- tests/scenes/bin/Makefile | 1 + tests/scenes/bin/make_scenes.sh | 8 +- tests/scenes/bin/osm2wkt.cc | 4 - .../data/building-with-parallel-streets.wkt | 7 + tests/scenes/data/country.wkt | 10 +- tests/scenes/data/roads.osm | 442 ++++++++++-------- 6 files changed, 263 insertions(+), 209 deletions(-) create mode 100644 tests/scenes/data/building-with-parallel-streets.wkt diff --git a/tests/scenes/bin/Makefile b/tests/scenes/bin/Makefile index c65f52b8..d508bbac 100644 --- a/tests/scenes/bin/Makefile +++ b/tests/scenes/bin/Makefile @@ -24,3 +24,4 @@ osm2wkt: osm2wkt.cc $(CXX) $(CXXFLAGS) $(CXXFLAGS_WARNINGS) -o $@ $< $(LDFLAGS) $(LIB_IO) scenarios: osm2wkt + ./make_scenes.sh diff --git a/tests/scenes/bin/make_scenes.sh b/tests/scenes/bin/make_scenes.sh index 71de8703..25340b50 100755 --- a/tests/scenes/bin/make_scenes.sh +++ b/tests/scenes/bin/make_scenes.sh @@ -1,4 +1,4 @@ -#/bin/bash -e +#!/bin/bash -e # # Regenerates wkts for scenarios. # @@ -11,10 +11,10 @@ if [ ! -d "$datadir" ]; then fi echo "Using datadir $datadir" -pushd $datadir +cd $datadir # remove old wkts -rm $datadir/*.wkt +rm -f $datadir/*.wkt # create wkts from SQL scripts for fl in *.sql; do @@ -27,5 +27,3 @@ for fl in *.osm; do echo "Processing $fl.." ../bin/osm2wkt $fl done - -popd diff --git a/tests/scenes/bin/osm2wkt.cc b/tests/scenes/bin/osm2wkt.cc index 56210892..d13a4632 100644 --- a/tests/scenes/bin/osm2wkt.cc +++ b/tests/scenes/bin/osm2wkt.cc @@ -92,10 +92,6 @@ int main(int argc, char* argv[]) { reader2.close(); export_handler.close(); std::cerr << "Pass 2 done\n"; - - - google::protobuf::ShutdownProtobufLibrary(); - } diff --git a/tests/scenes/data/building-with-parallel-streets.wkt b/tests/scenes/data/building-with-parallel-streets.wkt new file mode 100644 index 00000000..c84978e0 --- /dev/null +++ b/tests/scenes/data/building-with-parallel-streets.wkt @@ -0,0 +1,7 @@ +n-south-w | POINT(1.0031633 2.001023) +n-south-e | POINT(1.0043359 2.0010068) +n-north-w | POINT(1.0031511 2.0012655) +n-north-e | POINT(1.0043238 2.0012493) +w-south | LINESTRING(1.0031633 2.001023,1.0036943 2.0010149,1.0040717 2.0010203,1.0043359 2.0010068) +w-north | LINESTRING(1.0031511 2.0012655,1.0036822 2.0012574,1.0040596 2.0012628,1.0043238 2.0012493) +w-building | LINESTRING(1.0036157 2.0011891,1.0036166 2.0010787,1.0038457 2.0010805,1.0038448 2.001191,1.0036157 2.0011891) diff --git a/tests/scenes/data/country.wkt b/tests/scenes/data/country.wkt index 8eded2e7..dd14d79b 100644 --- a/tests/scenes/data/country.wkt +++ b/tests/scenes/data/country.wkt @@ -56,7 +56,7 @@ cz | POINT(16.3209805488586 49.5069274902344) de | POINT(9.30716800689697 50.2128944396973) dj | POINT(42.969040422876 11.41542855) - dk | POINT(9.18490123748779 55.5634002685547) + dk | POINT(9.18490123748779 55.9891662597656) dm | POINT(-61.0035801928854 15.6547055) do | POINT(-69.6285591125488 18.5884169089722) dz | POINT(4.24749487638474 25.797215461731) @@ -69,7 +69,7 @@ et | POINT(38.6169757843018 7.71399855613708) fi | POINT(26.8979873657227 63.5619449615479) fj | POINT(177.918533325195 -17.7423753738403) - fk | POINT(-60.0855102539062 -51.6555919647217) + fk | POINT(-58.9904479980469 -51.3450936007813) fm | POINT(151.9535889125 8.5045) fo | POINT(-6.60483694084778 62.10000995) fr | POINT(0.284105718135834 47.5104522705078) @@ -105,7 +105,7 @@ in | POINT(88.6762087020508 27.86155515) io | POINT(71.4274391359073 -6.14349685) iq | POINT(42.5810985565186 34.2610359191895) - ir | POINT(51.268892288208 34.1931705474854) + ir | POINT(56.0935573577881 30.4675178527832) is | POINT(-17.5178508758545 64.7168769836426) it | POINT(10.4263944625854 44.8790493011475) je | POINT(-2.19261599848299 49.1245833) @@ -156,7 +156,7 @@ mw | POINT(33.9572296142578 -12.2821822166443) mx | POINT(-105.892219543457 25.8682699203491) my | POINT(112.711540222168 2.10098683834076) - mz | POINT(37.5868968963623 -15.5801844596863) + mz | POINT(37.5868968963623 -13.7268223762512) na | POINT(16.6856970787048 -21.4657220840454) nc | POINT(164.953224182129 -20.3888988494873) ne | POINT(10.060417175293 19.0827360153198) @@ -204,7 +204,7 @@ sm | POINT(12.4606268797657 43.9427969) sn | POINT(-15.3711128234863 14.9947791099548) so | POINT(46.9338359832764 9.34094429016113) - sr | POINT(-56.4855213165283 4.5773549079895) + sr | POINT(-55.4286479949951 4.5698549747467) ss | POINT(28.1357345581055 8.50933408737183) st | POINT(6.61025854583333 0.2215) sv | POINT(-89.3666543301004 13.4307287) diff --git a/tests/scenes/data/roads.osm b/tests/scenes/data/roads.osm index ed7cd62a..b7614f78 100644 --- a/tests/scenes/data/roads.osm +++ b/tests/scenes/data/roads.osm @@ -1,347 +1,399 @@ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - + - - + + - - - - - - + + + + + + - - + + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - + + + + + + + + + + - + - + - + - - - - - - - + + + + + + + - + - - - + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5