diff --git a/test/basic_geometries_elevation.pbf.xml b/test/basic_geometries_elevation.pbf.xml new file mode 100644 index 0000000..5d5174a --- /dev/null +++ b/test/basic_geometries_elevation.pbf.xml @@ -0,0 +1,626 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/basic_geometries_elevation.xml b/test/basic_geometries_elevation.xml new file mode 100644 index 0000000..68299b7 --- /dev/null +++ b/test/basic_geometries_elevation.xml @@ -0,0 +1,626 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/basic_geometries_elevation_name.pbf.xml b/test/basic_geometries_elevation_name.pbf.xml new file mode 100644 index 0000000..64593de --- /dev/null +++ b/test/basic_geometries_elevation_name.pbf.xml @@ -0,0 +1,625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/basic_geometries_elevation_name.xml b/test/basic_geometries_elevation_name.xml new file mode 100644 index 0000000..2241129 --- /dev/null +++ b/test/basic_geometries_elevation_name.xml @@ -0,0 +1,625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/osm_output.t b/test/osm_output.t index d11a428..a2adc97 100644 --- a/test/osm_output.t +++ b/test/osm_output.t @@ -579,3 +579,53 @@ basicgeometriesfilterlayer: Writing file footer $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_filterlayer.xml +elevation: + $ ogr2osm -f $TESTDIR/shapefiles/basic_geometries.kml --add-z-value-tag elevation + Using default translations + Preparing to convert .* (re) + Detected projection metadata: + GEOGCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",6378137,298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["degree",0.0174532925199433, + AUTHORITY["EPSG","9122"]], + AXIS["Latitude",NORTH], + AXIS["Longitude",EAST], + AUTHORITY["EPSG","4326"]] + Splitting long ways + Writing file header + Writing nodes + Writing ways + Writing relations + Writing file footer + $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_elevation.xml + +elevationclashingtags: + $ ogr2osm -f $TESTDIR/shapefiles/basic_geometries.kml --add-z-value-tag Name + Using default translations + Preparing to convert .* (re) + Detected projection metadata: + GEOGCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",6378137,298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["degree",0.0174532925199433, + AUTHORITY["EPSG","9122"]], + AXIS["Latitude",NORTH], + AXIS["Longitude",EAST], + AUTHORITY["EPSG","4326"]] + Splitting long ways + Writing file header + Writing nodes + Writing ways + Writing relations + Writing file footer + $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_elevation_name.xml + diff --git a/test/pbf_output.t b/test/pbf_output.t index e5338ee..f5deaf9 100644 --- a/test/pbf_output.t +++ b/test/pbf_output.t @@ -539,3 +539,55 @@ basicgeometriesfilterlayer: $ osmconvert --drop-author basic_geometries.osm.pbf > basic_geometries.osm 2> /dev/null $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_filterlayer.pbf.xml +elevation: + $ ogr2osm --pbf -f $TESTDIR/shapefiles/basic_geometries.kml --add-z-value-tag elevation + Using default translations + Preparing to convert .* (re) + Detected projection metadata: + GEOGCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",6378137,298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["degree",0.0174532925199433, + AUTHORITY["EPSG","9122"]], + AXIS["Latitude",NORTH], + AXIS["Longitude",EAST], + AUTHORITY["EPSG","4326"]] + Splitting long ways + Writing file header + Writing nodes + Writing ways + Writing relations + $ osmconvert --drop-author basic_geometries.osm.pbf > basic_geometries.osm 2> /dev/null + \[.[0-9]\] (re) + $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_elevation.pbf.xml + +elevationclashingtags: + $ ogr2osm --pbf -f $TESTDIR/shapefiles/basic_geometries.kml --add-z-value-tag Name + Using default translations + Preparing to convert .* (re) + Detected projection metadata: + GEOGCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",6378137,298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["degree",0.0174532925199433, + AUTHORITY["EPSG","9122"]], + AXIS["Latitude",NORTH], + AXIS["Longitude",EAST], + AUTHORITY["EPSG","4326"]] + Splitting long ways + Writing file header + Writing nodes + Writing ways + Writing relations + $ osmconvert --drop-author basic_geometries.osm.pbf > basic_geometries.osm 2> /dev/null + \[.[0-9]\] (re) + $ xmllint --format basic_geometries.osm | diff -uNr - $TESTDIR/basic_geometries_elevation_name.pbf.xml + diff --git a/test/shapefiles/basic_geometries.kml b/test/shapefiles/basic_geometries.kml index a673175..336f92c 100644 --- a/test/shapefiles/basic_geometries.kml +++ b/test/shapefiles/basic_geometries.kml @@ -5,13 +5,13 @@ TestPoint - -23.094721,33.4838,0.0 + -23.094721,33.4838,1.123456789123456789 TestLinestring - -23.1659603,33.4754108,0.0 -23.1631279,33.476771,0.0 -23.1604671,33.4769858,0.0 -23.155489,33.4758403,0.0 -23.1545448,33.4731198,0.0 -23.1518841,33.4686807,0.0 -23.1486225,33.4667476,0.0 -23.143301,33.4662464,0.0 -23.1391811,33.4666044,0.0 -23.1354904,33.4686807,0.0 -23.1324005,33.4715447,0.0 -23.1305981,33.4754824,0.0 -23.1307697,33.4795631,0.0 -23.1289673,33.4822835,0.0 -23.1247616,33.4828562,0.0 -23.1208992,33.4819255,0.0 -23.1177235,33.4796347,0.0 -23.115921,33.4762699,0.0 -23.1117153,33.4736925,0.0 -23.1081963,33.4726186,0.0 + -23.1659603,33.4754108,2.0 -23.1631279,33.476771,3.0 -23.1604671,33.4769858,4.0 -23.155489,33.4758403,5.0 -23.1545448,33.4731198,6.0 -23.1518841,33.4686807,7.0 -23.1486225,33.4667476,8.0 -23.143301,33.4662464,9.0 -23.1391811,33.4666044,10.0 -23.1354904,33.4686807,11.0 -23.1324005,33.4715447,12.0 -23.1305981,33.4754824,13.0 -23.1307697,33.4795631,14.0 -23.1289673,33.4822835,15.0 -23.1247616,33.4828562,16.0 -23.1208992,33.4819255,17.0 -23.1177235,33.4796347,18.0 -23.115921,33.4762699,19.0 -23.1117153,33.4736925,20.0 -23.1081963,33.4726186,21.0 @@ -19,7 +19,7 @@ - -23.089571,33.4706855,0.0 -23.0868244,33.472905,0.0 -23.0818462,33.4744085,0.0 -23.0760098,33.4738357,0.0 -23.0727482,33.4737641,0.0 -23.0702591,33.4745517,0.0 -23.0689716,33.475554,0.0 -23.0683708,33.4769142,0.0 -23.0689716,33.4778449,0.0 -23.0709457,33.4772722,0.0 -23.0737782,33.4761267,0.0 -23.0778122,33.4772006,0.0 -23.0790138,33.4786324,0.0 -23.0786705,33.4804938,0.0 -23.0774689,33.4819255,0.0 -23.0756664,33.4823551,0.0 -23.0742931,33.4837868,0.0 -23.0740356,33.485648,0.0 -23.0724049,33.4870797,0.0 -23.0697441,33.4884398,0.0 -23.0687141,33.4880103,0.0 -23.0688,33.4871513,0.0 -23.0714607,33.4854333,0.0 -23.0706882,33.4832857,0.0 -23.0691433,33.4851469,0.0 -23.0657101,33.4849322,0.0 -23.0639076,33.4828562,0.0 -23.063221,33.4807085,0.0 -23.0631351,33.4784892,0.0 -23.0640793,33.4761983,0.0 -23.0651093,33.4744085,0.0 -23.0671692,33.4720458,0.0 -23.0712032,33.4707571,0.0 -23.0739498,33.4701843,0.0 -23.0764389,33.4683228,0.0 -23.0767822,33.466318,0.0 -23.0761814,33.4645995,0.0 -23.0739498,33.4629526,0.0 -23.0709457,33.4612341,0.0 -23.0704308,33.4593008,0.0 -23.0710316,33.4572958,0.0 -23.072834,33.4566513,0.0 -23.0755806,33.4560068,0.0 -23.0778122,33.455792,0.0 -23.0811596,33.455792,0.0 -23.0843353,33.455792,0.0 -23.0881119,33.4538585,0.0 -23.0901718,33.4522831,0.0 -23.0922318,33.4504211,0.0 -23.0954933,33.4503495,0.0 -23.0985832,33.4521398,0.0 -23.100729,33.4550043,0.0 -23.1036472,33.4558636,0.0 -23.1075096,33.457081,0.0 -23.110857,33.4576538,0.0 -23.1130028,33.4590144,0.0 -23.1141186,33.4615922,0.0 -23.1143761,33.4643131,0.0 -23.1085396,33.4653871,0.0 -23.1037331,33.4678216,0.0 -23.1018448,33.4711151,0.0 -23.1021881,33.4731198,0.0 -23.1040764,33.4762699,0.0 -23.1037545,33.4773975,0.0 -23.1026173,33.4777196,0.0 -23.10148,33.4775765,0.0 -23.1007719,33.4771111,0.0 -23.0985403,33.4760014,0.0 -23.097167,33.4756614,0.0 -23.09618,33.4753392,0.0 -23.0914593,33.4720458,0.0 -23.089571,33.4706855,0.0 + -23.089571,33.4706855,1.0 -23.0868244,33.472905,2.0 -23.0818462,33.4744085,3.0 -23.0760098,33.4738357,26.0 -23.0727482,33.4737641,48.0 -23.0702591,33.4745517,4.0 -23.0689716,33.475554,27.0 -23.0683708,33.4769142,49.0 -23.0689716,33.4778449,5.0 -23.0709457,33.4772722,28.0 -23.0737782,33.4761267,50.0 -23.0778122,33.4772006,6.0 -23.0790138,33.4786324,29.0 -23.0786705,33.4804938,51.0 -23.0774689,33.4819255,7.0 -23.0756664,33.4823551,30.0 -23.0742931,33.4837868,52.0 -23.0740356,33.485648,8.0 -23.0724049,33.4870797,31.0 -23.0697441,33.4884398,53.0 -23.0687141,33.4880103,9.0 -23.0688,33.4871513,32.0 -23.0714607,33.4854333,54.0 -23.0706882,33.4832857,55.0 -23.0691433,33.4851469,10.0 -23.0657101,33.4849322,33.0 -23.0639076,33.4828562,56.0 -23.063221,33.4807085,11.0 -23.0631351,33.4784892,34.0 -23.0640793,33.4761983,57.0 -23.0651093,33.4744085,12.0 -23.0671692,33.4720458,35.0 -23.0712032,33.4707571,58.0 -23.0739498,33.4701843,13.0 -23.0764389,33.4683228,36.0 -23.0767822,33.466318,59.0 -23.0761814,33.4645995,14.0 -23.0739498,33.4629526,37.0 -23.0709457,33.4612341,60.0 -23.0704308,33.4593008,15.0 -23.0710316,33.4572958,38.0 -23.072834,33.4566513,61.0 -23.0755806,33.4560068,16.0 -23.0778122,33.455792,39.0 -23.0811596,33.455792,62.0 -23.0843353,33.455792,71.0 -23.0881119,33.4538585,17.0 -23.0901718,33.4522831,63.0 -23.0922318,33.4504211,40.0 -23.0954933,33.4503495,18.0 -23.0985832,33.4521398,64.0 -23.100729,33.4550043,41.0 -23.1036472,33.4558636,19.0 -23.1075096,33.457081,65.0 -23.110857,33.4576538,42.0 -23.1130028,33.4590144,20.0 -23.1141186,33.4615922,66.0 -23.1143761,33.4643131,43.0 -23.1085396,33.4653871,21.0 -23.1037331,33.4678216,67.0 -23.1018448,33.4711151,44.0 -23.1021881,33.4731198,22.0 -23.1040764,33.4762699,68.0 -23.1037545,33.4773975,45.0 -23.1026173,33.4777196,23.0 -23.10148,33.4775765,69.0 -23.1007719,33.4771111,46.0 -23.0985403,33.4760014,24.0 -23.097167,33.4756614,70.0 -23.09618,33.4753392,47.0 -23.0914593,33.4720458,72.0 -23.089571,33.4706855,1.0 @@ -29,7 +29,7 @@ - -23.1465626,33.4720458,0.0 -23.1454468,33.4739073,0.0 -23.1457901,33.4752676,0.0 -23.1480217,33.4779881,0.0 -23.1473351,33.4812096,0.0 -23.1423569,33.4823551,0.0 -23.1374645,33.4820687,0.0 -23.1346321,33.4826414,0.0 -23.131628,33.4851469,0.0 -23.1281948,33.487366,0.0 -23.1245041,33.4866502,0.0 -23.1205559,33.4845742,0.0 -23.1206417,33.4812812,0.0 -23.1218433,33.4776301,0.0 -23.1249332,33.477129,0.0 -23.1258774,33.4756972,0.0 -23.1254482,33.4739073,0.0 -23.1239033,33.4731198,0.0 -23.120985,33.4714015,0.0 -23.1181526,33.4716163,0.0 -23.1160069,33.4726902,0.0 -23.1136036,33.4758403,0.0 -23.1112862,33.4777017,0.0 -23.1087971,33.4777733,0.0 -23.1060505,33.4766995,0.0 -23.1045914,33.4750528,0.0 -23.1034756,33.4726186,0.0 -23.1031322,33.4710435,0.0 -23.1037331,33.4693967,0.0 -23.1070805,33.4675352,0.0 -23.1100845,33.4663896,0.0 -23.1137753,33.4657451,0.0 -23.1207275,33.4653871,0.0 -23.1247616,33.4640983,0.0 -23.1266499,33.4624514,0.0 -23.1287098,33.4604465,0.0 -23.1337738,33.459802,0.0 -23.137207,33.4599452,0.0 -23.1396961,33.4611625,0.0 -23.1433868,33.4640983,0.0 -23.1451893,33.4664612,0.0 -23.1485367,33.4683228,0.0 -23.1465626,33.4720458,0.0 + -23.1465626,33.4720458,15.0 -23.1454468,33.4739073,30.0 -23.1457901,33.4752676,1.0 -23.1480217,33.4779881,16.0 -23.1473351,33.4812096,31.0 -23.1423569,33.4823551,2.0 -23.1374645,33.4820687,17.0 -23.1346321,33.4826414,32.0 -23.131628,33.4851469,3.0 -23.1281948,33.487366,18.0 -23.1245041,33.4866502,33.0 -23.1205559,33.4845742,19.0 -23.1206417,33.4812812,4.0 -23.1218433,33.4776301,34.0 -23.1249332,33.477129,20.0 -23.1258774,33.4756972,5.0 -23.1254482,33.4739073,35.0 -23.1239033,33.4731198,21.0 -23.120985,33.4714015,6.0 -23.1181526,33.4716163,36.0 -23.1160069,33.4726902,22.0 -23.1136036,33.4758403,7.0 -23.1112862,33.4777017,37.0 -23.1087971,33.4777733,23.0 -23.1060505,33.4766995,8.0 -23.1045914,33.4750528,38.0 -23.1034756,33.4726186,24.0 -23.1031322,33.4710435,9.0 -23.1037331,33.4693967,39.0 -23.1070805,33.4675352,25.0 -23.1100845,33.4663896,10.0 -23.1137753,33.4657451,40.0 -23.1207275,33.4653871,26.0 -23.1247616,33.4640983,11.0 -23.1266499,33.4624514,41.0 -23.1287098,33.4604465,27.0 -23.1337738,33.459802,12.0 -23.137207,33.4599452,42.0 -23.1396961,33.4611625,28.0 -23.1433868,33.4640983,13.0 -23.1451893,33.4664612,43.0 -23.1485367,33.4683228,29.0 -23.1465626,33.4720458,15.0