warning: unsupported geometry type: undefined
I try to convert a geojson file to GPX, but it throws this error "warning: unsupported geometry type: undefined" "
Same issue here !
Here is my Json to convert.
If i save this in a json file and i use the commande line, it work perfectly and i got my gpx file. But when using it with js as a package i got this error.
{ "type":"FeatureCollection", "features":[ { "type":"Feature", "id":"d533b333-1575-4b9b-a11e-5bac2d4dc959", "geometry":{ "type":"Point", "coordinates":[ 4.660606, 45.76158 ] }, "properties":{ "nextPointConnection":"auto" }, "bbox":[ 4.660606384277345, 45.76158026929127, 4.660606384277345, 45.76158026929127 ] }, { "type":"Feature", "id":"8e9beb93-b569-491a-b415-9864248f54fe", "geometry":{ "type":"Point", "coordinates":[ 4.702148, 45.74602 ] }, "properties":{ "nextPointConnection":"auto" }, "bbox":[ 4.702148437500001, 45.74602019124212, 4.702148437500001, 45.74602019124212 ] }, { "type":"Feature", "id":"003ed499-e4d2-4b28-beba-7c3819a831e1", "geometry":{ "type":"Point", "coordinates":[ 4.748497, 45.746738 ] }, "properties":{ "nextPointConnection":"auto" }, "bbox":[ 4.748497009277345, 45.74673844418688, 4.748497009277345, 45.74673844418688 ] }, { "bbox":[ 4.660596, 45.745612, 259.85, 4.747788, 45.762389, 407.79 ], "type":"Feature", "properties":{ "ascent":35.2, "descent":180, "segments":[ { "distance":4109.1, "duration":821.8, "steps":[ { "distance":96.4, "duration":19.3, "type":11, "instruction":"Head northeast on Route de Vaugneray, D 70", "name":"Route de Vaugneray, D 70", "way_points":[ 0, 3 ] }, { "distance":808, "duration":161.6, "type":3, "instruction":"Turn sharp right onto Route du Gaminon, D 610", "name":"Route du Gaminon, D 610", "way_points":[ 3, 24 ] }, { "distance":1891.1, "duration":378.2, "type":13, "instruction":"Keep right onto Route de Grézieu, D 610", "name":"Route de Grézieu, D 610", "way_points":[ 24, 76 ] }, { "distance":97.4, "duration":19.5, "type":7, "instruction":"Enter the roundabout and take the 5th exit onto Route Neuve du Col de la Luère", "name":"Route Neuve du Col de la Luère", "exit_number":5, "way_points":[ 76, 96 ] }, { "distance":390.3, "duration":78.1, "type":6, "instruction":"Continue straight onto Route Neuve du Col de la Luère, D 24", "name":"Route Neuve du Col de la Luère, D 24", "way_points":[ 96, 102 ] }, { "distance":690.5, "duration":138.1, "type":7, "instruction":"Enter the roundabout and take the 2nd exit onto Route du Col de la Luère, D 24", "name":"Route du Col de la Luère, D 24", "exit_number":2, "way_points":[ 102, 130 ] }, { "distance":43.3, "duration":8.7, "type":7, "instruction":"Enter the roundabout and take the 1st exit", "name":"-", "exit_number":1, "way_points":[ 130, 137 ] }, { "distance":92.2, "duration":18.4, "type":1, "instruction":"Turn right", "name":"-", "way_points":[ 137, 142 ] }, { "distance":0, "duration":0, "type":10, "instruction":"Arrive at your destination, on the left", "name":"-", "way_points":[ 142, 142 ] } ], "detourfactor":1.12, "percentage":49.56, "avgspeed":18, "ascent":22.92592636557191, "descent":120.2460111281452 }, { "distance":4182.2, "duration":874.7, "steps":[ { "distance":92.2, "duration":18.4, "type":11, "instruction":"Head east on Ancienne-Voie-Ferrée-de-la-F.O.L.", "name":"Ancienne-Voie-Ferrée-de-la-F.O.L.", "way_points":[ 142, 147 ] }, { "distance":10.7, "duration":2.1, "type":1, "instruction":"Turn right", "name":"-", "way_points":[ 147, 150 ] }, { "distance":16.1, "duration":3.2, "type":2, "instruction":"Turn sharp left", "name":"-", "way_points":[ 150, 153 ] }, { "distance":60.8, "duration":12.2, "type":7, "instruction":"Enter the roundabout and take the 2nd exit onto D 489", "name":"D 489", "exit_number":2, "way_points":[ 153, 159 ] }, { "distance":524.9, "duration":105, "type":5, "instruction":"Turn slight right onto Le Tupinier, D 489", "name":"Le Tupinier, D 489", "way_points":[ 159, 181 ] }, { "distance":91.9, "duration":20.7, "type":1, "instruction":"Turn right onto Rue du Stade", "name":"Rue du Stade", "way_points":[ 181, 186 ] }, { "distance":232.2, "duration":52.2, "type":0, "instruction":"Turn left onto Rue de Verdun", "name":"Rue de Verdun", "way_points":[ 186, 194 ] }, { "distance":1430.3, "duration":301.8, "type":0, "instruction":"Turn left onto Rue Centrale", "name":"Rue Centrale", "way_points":[ 194, 233 ] }, { "distance":48.5, "duration":9.7, "type":12, "instruction":"Keep left onto Rue du 11 Novembre 1918, D 311", "name":"Rue du 11 Novembre 1918, D 311", "way_points":[ 233, 236 ] }, { "distance":322.6, "duration":64.5, "type":1, "instruction":"Turn right onto Ancienne Route de Brindas", "name":"Ancienne Route de Brindas", "way_points":[ 236, 243 ] }, { "distance":35, "duration":7, "type":1, "instruction":"Turn right onto Avenue Édouard Millaud, D 489", "name":"Avenue Édouard Millaud, D 489", "way_points":[ 243, 244 ] }, { "distance":185.2, "duration":37, "type":0, "instruction":"Turn left onto Rue du Tourillon", "name":"Rue du Tourillon", "way_points":[ 244, 254 ] }, { "distance":184.6, "duration":36.9, "type":13, "instruction":"Keep right onto Rue des Aqueducs", "name":"Rue des Aqueducs", "way_points":[ 254, 262 ] }, { "distance":158.8, "duration":35.7, "type":2, "instruction":"Turn sharp left onto Rue des Aqueducs", "name":"Rue des Aqueducs", "way_points":[ 262, 272 ] }, { "distance":94, "duration":18.8, "type":5, "instruction":"Turn slight right onto Rue des Aqueducs", "name":"Rue des Aqueducs", "way_points":[ 272, 277 ] }, { "distance":242, "duration":48.7, "type":1, "instruction":"Turn right onto Rue des Lilas", "name":"Rue des Lilas", "way_points":[ 277, 283 ] }, { "distance":340.6, "duration":68.1, "type":0, "instruction":"Turn left onto Avenue Édouard Millaud, D 489", "name":"Avenue Édouard Millaud, D 489", "way_points":[ 283, 297 ] }, { "distance":101.3, "duration":30.4, "type":1, "instruction":"Turn right", "name":"-", "way_points":[ 297, 302 ] }, { "distance":10.5, "duration":2.1, "type":2, "instruction":"Turn sharp left", "name":"-", "way_points":[ 302, 303 ] }, { "distance":0, "duration":0, "type":10, "instruction":"Arrive at your destination, on the right", "name":"-", "way_points":[ 303, 303 ] } ], "detourfactor":1.18, "percentage":50.44, "avgspeed":17.21, "ascent":12.274576386951253, "descent":59.70695858909971 } ], "summary":{ "distance":8291.3, "duration":1696.5 }, "way_points":[ 0, 142, 303 ] }, "geometry":{ "coordinates":[ [ 4.660596, 45.761585, 402.7 ], [ 4.660669, 45.761661, 402.9 ], [ 4.660795, 45.761922, 403.3 ], [ 4.66097, 45.762389, 407.8 ], [ 4.661093, 45.762295, 407.4 ], [ 4.661703, 45.761617, 405 ], [ 4.66203, 45.761221, 403.8 ], [ 4.662266, 45.761005, 402.5 ], [ 4.662556, 45.760821, 399.8 ], [ 4.662806, 45.760756, 399.1 ], [ 4.66303, 45.760716, 398.8 ], [ 4.663492, 45.760679, 398 ], [ 4.664006, 45.760605, 397 ], [ 4.665954, 45.759947, 390.5 ], [ 4.666402, 45.759855, 388.6 ], [ 4.666939, 45.75977, 385.9 ], [ 4.667111, 45.759748, 385.3 ], [ 4.667446, 45.759676, 384.3 ], [ 4.667791, 45.759574, 383.4 ], [ 4.66796, 45.759485, 383 ], [ 4.668089, 45.75938, 382.6 ], [ 4.668274, 45.759149, 382 ], [ 4.668437, 45.758941, 381.5 ], [ 4.668556, 45.758844, 381.5 ], [ 4.669178, 45.758532, 382.8 ], [ 4.669636, 45.758149, 381.9 ], [ 4.669721, 45.758079, 381.2 ], [ 4.670121, 45.757773, 378.2 ], [ 4.670451, 45.757562, 375.9 ], [ 4.670817, 45.757367, 373.1 ], [ 4.671221, 45.757217, 369.6 ], [ 4.671725, 45.757081, 365.6 ], [ 4.672218, 45.756916, 364.5 ], [ 4.672372, 45.756834, 364.4 ], [ 4.672492, 45.756719, 364.2 ], [ 4.672654, 45.756472, 363.5 ], [ 4.672843, 45.756255, 362.8 ], [ 4.673008, 45.756107, 362.1 ], [ 4.673199, 45.755967, 361.2 ], [ 4.673813, 45.755719, 357.9 ], [ 4.674057, 45.755582, 356.4 ], [ 4.674449, 45.755177, 352.1 ], [ 4.674673, 45.754993, 350.3 ], [ 4.675081, 45.754725, 347.2 ], [ 4.675279, 45.754644, 346.5 ], [ 4.675524, 45.754605, 345.9 ], [ 4.676031, 45.754594, 344.4 ], [ 4.676768, 45.754468, 342.7 ], [ 4.677836, 45.754314, 340.8 ], [ 4.678165, 45.75424, 340.2 ], [ 4.67854, 45.754093, 339.2 ], [ 4.679779, 45.753609, 335.2 ], [ 4.679843, 45.753585, 334.8 ], [ 4.679873, 45.753574, 334.4 ], [ 4.679964, 45.753549, 334 ], [ 4.680933, 45.753497, 331.9 ], [ 4.681216, 45.753458, 331.5 ], [ 4.683105, 45.752671, 331 ], [ 4.683285, 45.752574, 331 ], [ 4.683427, 45.752491, 330.9 ], [ 4.683606, 45.752323, 330.6 ], [ 4.683846, 45.752007, 330.1 ], [ 4.684026, 45.751898, 330 ], [ 4.684091, 45.751885, 330.9 ], [ 4.684378, 45.751862, 332.6 ], [ 4.685113, 45.751877, 336.6 ], [ 4.685512, 45.751838, 338.9 ], [ 4.685981, 45.751732, 341.3 ], [ 4.686263, 45.751627, 343.1 ], [ 4.686574, 45.751492, 344.9 ], [ 4.686788, 45.751376, 346.3 ], [ 4.687559, 45.75096, 343.8 ], [ 4.687942, 45.750736, 342.6 ], [ 4.688971, 45.750149, 339.5 ], [ 4.689029, 45.75009, 339.4 ], [ 4.689059, 45.750057, 339.2 ], [ 4.6891, 45.750005, 339.1 ], [ 4.689084, 45.749985, 339.1 ], [ 4.689076, 45.749962, 339 ], [ 4.689079, 45.749936, 339 ], [ 4.689118, 45.749894, 339 ], [ 4.68915, 45.749881, 339 ], [ 4.689199, 45.749877, 339 ], [ 4.689246, 45.749887, 339 ], [ 4.689271, 45.7499, 339 ], [ 4.68929, 45.749919, 339 ], [ 4.6893, 45.749936, 339 ], [ 4.689303, 45.749955, 339 ], [ 4.689351, 45.749971, 339 ], [ 4.689393, 45.749988, 339 ], [ 4.689413, 45.749992, 339 ], [ 4.689456, 45.75, 338.8 ], [ 4.689531, 45.750006, 338.7 ], [ 4.689598, 45.750017, 338.5 ], [ 4.689642, 45.75002, 338.3 ], [ 4.690039, 45.749999, 337.7 ], [ 4.69011, 45.749993, 337.5 ], [ 4.691094, 45.749879, 336.1 ], [ 4.692448, 45.74974, 334.4 ], [ 4.694406, 45.749529, 331.1 ], [ 4.694821, 45.749429, 330.3 ], [ 4.694876, 45.749419, 330 ], [ 4.69502, 45.749336, 329.7 ], [ 4.695021, 45.749292, 329.5 ], [ 4.695085, 45.749238, 329.3 ], [ 4.695119, 45.749222, 329.1 ], [ 4.695226, 45.749214, 328.9 ], [ 4.69529, 45.749223, 328.7 ], [ 4.69533, 45.749251, 328.6 ], [ 4.695474, 45.749217, 328.3 ], [ 4.695729, 45.749157, 327.7 ], [ 4.695997, 45.74909, 327 ], [ 4.696069, 45.749061, 326.6 ], [ 4.696339, 45.74896, 325.8 ], [ 4.697026, 45.74867, 323.7 ], [ 4.697149, 45.748623, 323.4 ], [ 4.697303, 45.74856, 323 ], [ 4.69739, 45.748525, 322.7 ], [ 4.697625, 45.748441, 322 ], [ 4.697754, 45.748389, 321.5 ], [ 4.698206, 45.748203, 320 ], [ 4.69949, 45.74769, 315.8 ], [ 4.700524, 45.747277, 312.1 ], [ 4.701223, 45.747071, 310.9 ], [ 4.701553, 45.747003, 310.5 ], [ 4.701669, 45.74698, 310.3 ], [ 4.70218, 45.746921, 309.2 ], [ 4.702415, 45.746884, 308.8 ], [ 4.702595, 45.746833, 308.5 ], [ 4.702808, 45.746724, 308 ], [ 4.70287, 45.746671, 307.7 ], [ 4.702883, 45.746606, 307.4 ], [ 4.702927, 45.746547, 307.2 ], [ 4.702997, 45.746503, 307 ], [ 4.703084, 45.746477, 306.7 ], [ 4.703133, 45.74645, 306.5 ], [ 4.703163, 45.746418, 306.3 ], [ 4.703187, 45.746378, 306.1 ], [ 4.703139, 45.746354, 305.9 ], [ 4.702832, 45.746178, 305.3 ], [ 4.702788, 45.74615, 305.2 ], [ 4.702427, 45.746139, 305.2 ], [ 4.702125, 45.746091, 305.4 ], [ 4.702427, 45.746139, 307.1 ], [ 4.702788, 45.74615, 306.5 ], [ 4.702832, 45.746178, 306.2 ], [ 4.703139, 45.746354, 305.8 ], [ 4.703187, 45.746378, 305.7 ], [ 4.70322, 45.746373, 305.7 ], [ 4.703269, 45.746382, 305.6 ], [ 4.70332, 45.746373, 305.6 ], [ 4.703322, 45.746422, 305.5 ], [ 4.703324, 45.746468, 305.5 ], [ 4.703324, 45.746517, 305.5 ], [ 4.703357, 45.74654, 305.4 ], [ 4.703384, 45.746566, 305.4 ], [ 4.703414, 45.746617, 305.4 ], [ 4.703423, 45.746671, 305.4 ], [ 4.703582, 45.74674, 305.3 ], [ 4.703909, 45.746822, 305.1 ], [ 4.704065, 45.746829, 305.1 ], [ 4.704777, 45.746788, 305.8 ], [ 4.704864, 45.746782, 305.9 ], [ 4.705083, 45.746803, 306.1 ], [ 4.705303, 45.746857, 306.2 ], [ 4.705644, 45.746983, 306.5 ], [ 4.70588, 45.747096, 306.8 ], [ 4.706126, 45.74721, 307 ], [ 4.706258, 45.747244, 307.1 ], [ 4.706482, 45.747296, 307.2 ], [ 4.707009, 45.747307, 307.5 ], [ 4.70713, 45.747307, 307.5 ], [ 4.707437, 45.747305, 307.5 ], [ 4.707701, 45.74731, 307.4 ], [ 4.707872, 45.747312, 307.3 ], [ 4.70793, 45.747312, 307.2 ], [ 4.70876, 45.747319, 306.3 ], [ 4.708912, 45.74732, 306.2 ], [ 4.70986, 45.747326, 305.1 ], [ 4.710141, 45.747326, 304.6 ], [ 4.71021, 45.747327, 304.4 ], [ 4.710489, 45.747329, 303.4 ], [ 4.710473, 45.747233, 303.1 ], [ 4.710466, 45.747206, 302.7 ], [ 4.710179, 45.746909, 301.8 ], [ 4.709992, 45.746651, 301.2 ], [ 4.709959, 45.746602, 301.2 ], [ 4.710155, 45.746459, 300.8 ], [ 4.711065, 45.746124, 299.1 ], [ 4.711391, 45.74598, 299.2 ], [ 4.711769, 45.745896, 299 ], [ 4.712215, 45.745813, 298.6 ], [ 4.712352, 45.745741, 298.4 ], [ 4.712437, 45.74568, 298 ], [ 4.712542, 45.745612, 297.4 ], [ 4.712731, 45.745652, 296.9 ], [ 4.713173, 45.745722, 295.6 ], [ 4.713618, 45.745791, 294.4 ], [ 4.714322, 45.745872, 292.4 ], [ 4.714543, 45.745893, 291.9 ], [ 4.714645, 45.745902, 291.4 ], [ 4.714917, 45.745921, 290.5 ], [ 4.716337, 45.745919, 288.6 ], [ 4.716533, 45.74591, 288.6 ], [ 4.716709, 45.745902, 288.5 ], [ 4.71689, 45.745897, 288.5 ], [ 4.718461, 45.74585, 288.8 ], [ 4.720347, 45.745822, 288.3 ], [ 4.720502, 45.745819, 288.1 ], [ 4.720597, 45.745818, 287.9 ], [ 4.721395, 45.745807, 286.6 ], [ 4.722451, 45.745827, 285.1 ], [ 4.72256, 45.74583, 284.9 ], [ 4.72264, 45.745832, 284.7 ], [ 4.722675, 45.745833, 284.5 ], [ 4.723511, 45.745856, 284 ], [ 4.723704, 45.74586, 283.9 ], [ 4.724298, 45.745871, 283.6 ], [ 4.724452, 45.745874, 283.5 ], [ 4.724929, 45.745883, 283.4 ], [ 4.7252, 45.74589, 283.4 ], [ 4.725705, 45.745903, 283.4 ], [ 4.725769, 45.745904, 283.5 ], [ 4.726612, 45.745925, 283.7 ], [ 4.726702, 45.745927, 283.8 ], [ 4.726832, 45.745931, 283.8 ], [ 4.72697, 45.745933, 283.7 ], [ 4.728537, 45.745964, 281.8 ], [ 4.728711, 45.745967, 281.6 ], [ 4.728912, 45.745971, 281.3 ], [ 4.729382, 45.745979, 280 ], [ 4.730575, 45.745973, 276.5 ], [ 4.730754, 45.745973, 276.2 ], [ 4.730916, 45.746007, 275.9 ], [ 4.730969, 45.746048, 275.5 ], [ 4.731171, 45.746202, 274.6 ], [ 4.731337, 45.746329, 274 ], [ 4.731402, 45.746321, 273.5 ], [ 4.731451, 45.746316, 273 ], [ 4.731501, 45.74631, 272.5 ], [ 4.73247, 45.746561, 270.1 ], [ 4.735075, 45.747239, 268.5 ], [ 4.73513, 45.747271, 268.6 ], [ 4.735163, 45.747341, 268.6 ], [ 4.735614, 45.747342, 269.3 ], [ 4.735626, 45.747417, 269.7 ], [ 4.735655, 45.747458, 270 ], [ 4.735706, 45.747483, 270.3 ], [ 4.736032, 45.747554, 271 ], [ 4.736207, 45.747605, 271.3 ], [ 4.736283, 45.747628, 271.7 ], [ 4.736535, 45.747836, 273.2 ], [ 4.736984, 45.748204, 276 ], [ 4.737167, 45.748376, 277.1 ], [ 4.737255, 45.748458, 277.6 ], [ 4.737423, 45.748477, 277.5 ], [ 4.737749, 45.74853, 276.9 ], [ 4.738048, 45.748588, 276.2 ], [ 4.738104, 45.748599, 275.9 ], [ 4.739098, 45.748799, 271.9 ], [ 4.739225, 45.748825, 271.2 ], [ 4.739381, 45.748828, 270.6 ], [ 4.739527, 45.748751, 269.8 ], [ 4.73957, 45.748829, 269 ], [ 4.73972, 45.748893, 268.2 ], [ 4.740387, 45.749018, 266.3 ], [ 4.740513, 45.749047, 266.1 ], [ 4.740736, 45.749097, 265.9 ], [ 4.740809, 45.74912, 265.7 ], [ 4.740922, 45.749185, 265.5 ], [ 4.741003, 45.749238, 265.3 ], [ 4.741146, 45.74933, 265.1 ], [ 4.741269, 45.749403, 264.9 ], [ 4.741404, 45.749432, 264.7 ], [ 4.741988, 45.749471, 263.8 ], [ 4.742308, 45.749493, 263.7 ], [ 4.742403, 45.749482, 263.7 ], [ 4.742466, 45.749468, 263.6 ], [ 4.742493, 45.749362, 263.6 ], [ 4.742687, 45.748718, 263.2 ], [ 4.742937, 45.74788, 263 ], [ 4.743047, 45.747467, 263 ], [ 4.743065, 45.747411, 263 ], [ 4.743066, 45.747334, 263 ], [ 4.743195, 45.747335, 263 ], [ 4.743266, 45.747334, 263 ], [ 4.743471, 45.747335, 263 ], [ 4.74375, 45.747345, 262.9 ], [ 4.744211, 45.747347, 262.8 ], [ 4.744706, 45.74735, 262.6 ], [ 4.744862, 45.74735, 262.6 ], [ 4.745706, 45.747354, 262 ], [ 4.74603, 45.747355, 261.8 ], [ 4.746245, 45.747358, 261.6 ], [ 4.746499, 45.747356, 261.5 ], [ 4.747067, 45.747356, 261 ], [ 4.747389, 45.747356, 260.8 ], [ 4.747455, 45.747356, 260.7 ], [ 4.747457, 45.747219, 260.6 ], [ 4.747456, 45.747043, 260.5 ], [ 4.747683, 45.746666, 260.2 ], [ 4.747694, 45.746615, 260.1 ], [ 4.747705, 45.746479, 260.1 ], [ 4.747788, 45.746554, 259.9 ] ], "type":"LineString" } } ] }