Closed Joxit closed 7 years ago
Can you reproduce this error with other extracts? The geometry itself is fine:
select st_isvalid('0103000020110F00000400000023000000AF7EF71AD20F0E41F8BD3A5367DF5741E55FEF3698100E41C0753FAE68DF57418136320257110E41A746CB216ADF57416FA3D9740A120E41C4E987896BDF574146CAE11CBC120E41070A991F6DDF5741DC26327759130E41555221A76EDF5741C9685EF800140E416555735870DF57414B4319D6B5140E415C3B9D6472DF5741C414618854150E415A7D594D74DF5741D253BCA5F4150E41A685B25776DF5741D2BB4457C3160E4197EB2C2779DF57413C7D1D8173170E417BAF19857BDF574158CF405ACF180E41BE0E3A3E80DF5741C1DFA3AAD1180E41E78E121880DF5741B351BE66DF180E418D5FB0377FDF57412F4FE1CAEB180E419113336C7EDF57410A1A40C7EE180E4189503C3A7EDF574115BF3DCA2E180E41B82EA8757BDF5741951954D027170E41D1C713B977DF5741FCF3CE2EA0160E411345FDBF75DF57412E0BC34529160E4183FFD71674DF5741DC84093FC0150E41FD8B03B072DF5741A556117222150E4142A1D9A370DF5741666F47AE9C140E41FA14F9016FDF5741D72BCDCF17140E417B742A7D6DDF574136AE922CB1130E4177A5605B6CDF5741763612C131130E412CE7590A6BDF574144FCC92C8A120E418C52607369DF5741736C0EBCF4110E415461402D68DF57418D183DC559110E412EA2780167DF5741C7B261CFCD100E41AF1EEA1866DF5741288C7DCFE00F0E41BFED75A464DF574192B93AE6DD0F0E417D9F2E2865DF574100591EF1D40F0E415AE6B0CD66DF5741AF7EF71AD20F0E41F8BD3A5367DF574106000000806BCF9BA6140E41A68BFC5E71DF57417FAF91CAB4140E41681EC12D70DF5741D2D959D5E5140E416CCE31BE70DF57414EB014D1DE140E4178F7E65571DF5741FA9D7B93D7140E41CCCF55F071DF5741806BCF9BA6140E41A68BFC5E71DF57410500000073CAE5835B140E412FAAF68470DF5741643C004069140E411EBBFF5A6FDF57413F769C5C86140E411A2764B06FDF5741D8F4B9C678140E414B195BDA70DF574173CAE5835B140E412FAAF68470DF574105000000A2A60E0013130E419A12F32F6DDF57413295040122130E41DF8F7EBB6BDF5741BAEF4E4E6B130E4183EC89776CDF57412C01594D5C130E416B06E7EC6DDF5741A2A60E0013130E419A12F32F6DDF5741'::geometry);
I tried another extract for ile-de-france and here is the output:
[Feb 22 11:24:21] [PostGIS] SQL Error: pq: parse error - invalid geometry in query COPY "import"."osm_platform" ("osm_id", "geometry", "name", "type") FROM STDIN ([-5601287 0103000020110F00001B0000000B0000007293DE1C2B26104198D5F05899D35741490E783C3B261041E2A79F159AD357412E481A754E2610411A5552A19AD357415263DE8DE226104150312A7B8CD357416E2A2FBBE62710413681917272D357414AA03705CE28104176F797875AD357417E24036FBB2810415D73AEB959D35741C4397948B6281041E525598259D35741D2E4B852A32810418222D7F458D35741DCC3180FBA261041745D0DE28AD357417293DE1C2B26104198D5F05899D3574112000000615F3CB73127104166B9F04581D35741314890F0312710414DD4D12981D3574195E76DDF322710412661830F81D3574107A2698B33271041BD60590781D3574126492B673427104156602FFF80D35741AA8FCA3136271041BE0ABEF980D357410BDADBF23727104137D2FF0081D35741783F0B7139271041F20B3C1281D35741BAE25A563A2710412B46A22B81D35741DDDEE85F3A2710412DD5253A81D3574122D704733A271041269D914981D357411911B3E3392710415F82B06581D357415A984995382710412767A57981D357416142E2F036271041774B708581D35741BAFFB41C352710418412888481D35741C1A94D7833271041392EBD7881D357416A258E4632271041979E0F6281D35741615F3CB73127104166B9F04581D3574111000000A4937224DD2610416BEC97E889D35741757CC65DDD261041D0FF78CC89D35741DA1BA44CDE261041CFBE12B389D357414781D3CADF261041A8B9BEA289D35741CBC77295E126104197624D9D89D357414E0E1260E3261041D4F2A6A389D357419977B3D4E42610412E31E3B489D35741DB1A03BAE52610415BAB31CF89D35741FE1691C3E52610411205CDDC89D35741660B3BE0E52610412AD138EC89D357413A495B47E5261041EABD57088AD357417AD0F1F8E326104139E1341D8AD35741817A8A54E2261041ABC8FF288AD35741DB375D80E02610417F8F17288AD35741E2E1F5DBDE261041D66E641B8AD357418B5D36AADD2610412AD9B6048AD35741A4937224DD2610416BEC97E889D3574110000000C291282E9F2810412836BCE55BD35741927A7C679F2810418E719DC95BD35741F7195A56A0281041BC5437B05BD35741647F89D4A1281041CD66E39F5BD35741E9C5289FA32810418517729A5BD357416C0CC869A5281041B19ECBA05BD35741B77569DEA62810417EC407B25BD35741F918B9C3A7281041391956CC5BD357418409F1E9A7281041BA155DE95BD3574157471151A72810416CDA7B055CD35741BACA350CA62810410AE0581A5CD357419F78405EA4281041B9B623265CD35741F935138AA2281041EA4653245CD3574100E0ABE5A0281041417088185CD35741A95BECB39F281041D4FADA015CD35741C291282E9F2810412836BCE55BD3574110000000907B1DFA972810414752F89C5CD357413F68E329982810410E8DD9805CD35741C6034F2299281041C1378B665CD3574133697EA09A2810417C4937565CD35741B7AF1D6B9C28104111FAC5505CD357413AF6BC359E2810414AB907585CD35741865F5EAA9F28104178DF43695CD35741C702AE8FA0281041E4FCA9825CD3574130F757ACA028104104FAB09F5CD357412631061DA028104152BFCFBB5CD3574166B89CCE9E28104163C5ACD05CD357416E62352A9D281041549C77DC5CD35741C71F08569B2810416C648FDB5CD35741CFC9A0B199281041768DC4CF5CD357417745E17F98281041931717B95CD35741907B1DFA972810414752F89C5CD3574110000000B8758D866B281041C682812B61D35741895EE1BF6B28104192B9620F61D35741EEFDBEAE6C281041906014F560D357415B63EE2C6E281041F96FC0E460D35741DFA98DF76F281041CA1F4FDF60D3574162F02CC2712810410BE090E660D35741AD59CE3673281041AA08CDF760D35741EFFC1D1C74281041A429331161D357417AED554274281041EC62222F61D357414E2B76A973281041392C414B61D35741B1AE9A64722810412EFD355F61D35741955CA5B670281041C7D5006B61D35741121606EC6E281041B99D186A61D35741F6C3103E6D28104120C54D5E61D357419F3F510C6C2810410A4CA04761D35741B8758D866B281041C682812B61D3574110000000875F825264281041C1BCBDE261D357415748D68B64281041FBF29EC661D35741BCE7B37A652810415E9950AC61D357412A4DE3F8662810416BA8FC9B61D35741AE9382C36828104121588B9661D3574131DA218E6A2810417BE0E49C61D357417C43C3026C281041770921AE61D35741BEE612E86C28104112636FC861D3574126DBBC046D281041F46476E561D357411C156B756C281041D82E950162D357415C9C01276B2810415138721662D3574164469A82692810412D113D2262D35741BE036DAE672810411BD9542162D35741C5AD050A6628104143008A1562D357416E2946D864281041A986DCFE61D35741875F825264281041C1BCBDE261D35741100000009307FD3036281041D66CBA9D66D3574164F0506A36281041F49E9B8166D35741C88F2E59372810417D414D6766D3574136F55DD738281041264EF95666D35741BA3BFDA13A2810410BFD875166D357413D829C6C3C2810415886E15766D3574188EB3DE13D281041DAB11D6966D35741CA8E8DC63E2810414F0F6C8366D35741328337E33E2810416F1573A066D3574129BDE5533E28104172E391BC66D3574169447C053D281041F7EF6ED166D3574170EE14613B2810418DCA39DD66D35741CAABE78C392810415B9251DC66D35741D15580E837281041C7B786D066D357417AD1C0B636281041DB3AD9B966D357419307FD3036281041D66CBA9D66D35741100000003FF563F32E281041808D0E5467D3574110DEB72C2F281041F6BEEF3767D35741747D951B302810412799891E67D3574104DF52A33128104173A5350E67D357418825F26D332810413954C40867D35741E96F032F35281041A8DD1D0F67D3574157D532AD3628104194095A2067D3574198788292372810419C67A83A67D35741016D2CAF37281041586EAF5767D35741F7A6DA1F37281041FE3CCE7367D35741372E71D135281041F949AB8867D357413FD8092D34281041D424769467D357419995DC583228104161B4A59267D35741A03F75B4302810418DD9DA8667D3574149BBB5822F281041265C2D7067D357413FF563F32E281041808D0E5467D3574110000000802510FA0128104176AC93EC6BD35741500E643302281041ECD974D06BD35741B5AD4122032810412A7826B66BD35741460FFFA9042810417EBABAA66BD35741C9559E74062810417A6849A16BD357412AA0AF3508281041D1F2A2A76BD357419805DFB3092810412921DFB86BD35741DAA82E990A2810419D4A45D26BD35741429DD8B50A281041D68D34F06BD3574139D786260A2810417660530C6CD35741795E1DD808281041103848206CD357418008B63307281041EE4CFB2C6CD35741DAC5885F0528104141DC2A2B6CD35741E16F21BB03281041B6FF5F1F6CD3574189EB618902281041147FB2086CD35741802510FA0128104176AC93EC6BD35741100000004F0F05C6FA271041C55BB8A46CD357411FF858FFFA2710419E8899886CD35741849736EEFB27104146264B6E6CD3574115F9F375FD271041E32FF75D6CD3574175430537FF271041C4DD85586CD35741F989A401012810419DA0C75F6CD3574144F345760228104157CF03716CD357418696955B0328104155F9698A6CD357411087CD8103281041393D59A86CD35741E5C4EDE802281041801078C46CD35741484812A4012810418AE86CD86CD357414FF2AAFFFF27104155C537E46CD35741A9AF7D2BFE271041F48C4FE36CD35741B0591687FC2710412FB084D76CD3574135D9C84BFB271041082FD7C06CD357414F0F05C6FA271041C55BB8A46CD3574110000000490E82BFD0271041FEF8D35471D3574119F7D5F8D0271041BF21B53871D357417E96B3E7D127104195BB661E71D35741EBFBE265D3271041DAC2120E71D357416F428230D527104169A8890971D35741F28821FBD6271041CA33E30F71D357413EF2C26FD82710410C651F2171D357417F951255D9271041BD92853A71D357410B864A7BD9271041F4DA745871D35741DFC36AE2D82710414FB2937471D3574141478F9DD72710413E8D888871D3574126F599EFD5271041BB6B539471D35741A2AEFA24D42710413D336B9371D35741875C0577D2271041BC54A08771D357412FD84545D127104150D0F27071D35741490E82BFD0271041FEF8D35471D357411000000017F8768BC9271041958E100C72D35741E8E0CAC4C9271041BEB6F1EF71D357414D80A8B3CA271041FE4FA3D571D35741BAE5D731CC271041E0564FC571D357413E2C77FCCD271041D803DEBF71D35741C17216C7CF271041628F37C671D357410CDCB73BD127104100C173D771D357414E7F0721D2271041C027C2F171D35741B773B13DD22710412438C90E72D35741AEAD5FAED12710411910E82A72D35741EE34F65FD02710410124C53F72D35741F5DE8EBBCE271041C202904B72D357414E9C61E7CC2710413DCAA74A72D357415546FA42CB2710417EEBDC3E72D35741FEC13A11CA2710418E662F2872D3574117F8768BC9271041958E100C72D3574110000000412BFA119A27104125C9488A76D3574111144E4B9A2710415EED296E76D3574176B32B3A9B271041F682DB5376D35741E4185BB89C2710419487874376D35741675FFA829E271041CB33163E76D35741EBA5994DA027104139C06F4476D35741360F3BC2A1271041DD2C945676D3574177B28AA7A2271041A75EFA6F76D3574103A3C2CDA22710410A73018D76D35741D7E0E234A2271041EC4E20A976D357413A6407F0A0271041BB65FDBD76D357411E1212429F2710412046C8C976D3574177CFE46D9D271041790DE0C876D357417F797DC99B271041142D15BD76D3574127F5BD979A27104100A567A676D35741412BFA119A27104125C9488A76D35741100000001015EFDD92271041EEB46D4277D35741BD01B50D932710418CD84E2677D35741459D2006942710418F6D000C77D35741B202508495271041CB71ACFB76D357413649EF4E97271041E71D3BF676D35741BA8F8E199927104174AA94FC76D3574104F92F8E9A271041DBDED00D77D35741469C7F739B271041DC491F2877D35741AF9029909B271041E85E264577D35741A6CAD7009B271041673B456177D35741E6516EB299271041AE52227677D35741EDFB060E982710415433ED8177D3574146B9D93996271041A8FA048177D357414E63729594271041021A3A7577D35741F6DEB263932710416E918C5E77D357411015EFDD92271041EEB46D4277D3574110000000E91AA3F983271041105B4DCA78D35741BA03F73284271041537D2EAE78D357411FA3D421852710411811E09378D35741AF0492A98627104192148C8378D35741104FA36A8827104167C01A7E78D35741939542358A271041444D748478D35741DFFEE3A98B2710418082B09578D3574120A2338F8C271041BCEEFEAF78D35741AB926BB58C271041270506CD78D357417FD08B1C8C271041FDE224E978D35741E253B0D78A2710413EFB01FE78D35741E9FD48338927104173DCCC0979D3574143BB1B5F87271041BFA3E40879D357414B65B4BA8527104186C219FD78D35741D0E4667F84271041DF386CE678D35741E91AA3F983271041105B4DCA78D3574110000000B80498C57C271041EF1A8A8179D3574189EDEBFE7C271041993C6B6579D35741EE8CC9ED7D2710418108054C79D357415BF2F86B7F2710419F0BB13B79D35741DF3898368127104157B73F3679D35741627F3701832710415944993C79D35741ADE8D87584271041EE79D54D79D35741EF8B285B85271041C1E6236879D357417A7C608185271041D6FD2A8579D357414EBA80E88427104149DC49A179D357418E41179A8327104105F526B679D3574195EBAFF5812710417CD6F1C179D35741EFA8822180271041C49D09C179D35741F6521B7D7E2710418C8356B479D357419FCE5B4B7D27104164F9A89D79D35741B80498C57C271041EF1A8A8179D3574110000000304931832A27104162A92DFD81D35741003285BC2A271041A6C30EE181D3574164D162AB2B271041EC4FC0C681D35741F53220332D271041C64E6CB681D35741567D31F42E2710410BF9FAB081D35741DAC3D0BE30271041B88754B781D357414729003D32271041D9C190C881D3574166D0C118332710419235DFE281D35741F1C0F93E332710414554E6FF81D35741E8FAA7AF32271041173A051C82D3574128823E61312710414958E23082D35741302CD7BC2F271041DC3CAD3C82D3574189E9A9E82D271041E903C53B82D35741909342442C2710414F1FFA2F82D35741390F83122B271041338F4C1982D35741304931832A27104162A92DFD81D3574110000000669B38850E271041405A63E184D3574137848CBE0E271041FE7144C584D357419C236AAD0F271041ECFBF5AA84D357410989992B112710414DF9A19A84D357418DCF38F61227104117A3309584D357411016D8C01427104152328A9B84D357415C7F793516271041FD6DC6AC84D357419D22C91A1727104112E414C784D35741291301411727104160051CE484D35741FC5021A816271041B7ED3A0085D357413CD8B75915271041CC0D181585D35741448250B51327104168F3E22085D357419D3F23E1112710415FBAFA1F85D35741A5E9BB3C10271041BDD42F1485D357414D65FC0A0F2710419A4282FD84D35741669B38850E271041405A63E184D3574110000000447D4964072710416241179485D3574115669D9D07271041761F107785D357417A057B8C08271041E2E1A95D85D35741E76AAA0A0A271041ECDE554D85D357416BB149D50B2710419988E44785D35741EEF7E89F0D271041F6173E4E85D3574170618A140F27104101547A5F85D35741B204DAF90F271041A8CAC87985D357413CF511201027104192ECCF9685D35741113332870F27104183D5EEB285D3574173B656420E27104106F6CBC785D35741216461940C271041EADB96D385D357419E1DC2C90A271041DAA2AED285D3574183CBCC1B09271041F4BCE3C685D357412B470DEA07271041542A36B085D35741447D4964072710416241179485D35741100000005F79F5F9D526104160EF4B9B8AD3574130624933D626104128022D7F8AD3574195012722D72610419BC0C6658AD35741386756A0D826104116BB72558AD35741BCADF56ADA261041EA6301508AD3574140F49435DC26104149F45A568AD357418B5D36AADD261041FE3297678AD35741CC00868FDE261041BDADE5818AD3574135F52FACDE26104130D4EC9E8AD357412B2FDE1CDE26104185C10BBB8AD357416BB674CEDC2610414BE5E8CF8AD3574173600D2ADB261041FECCB3DB8AD35741CD1DE055D9261041915AE3D98AD357419DC778B1D7261041DE7218CE8AD357414643B97FD6261041B0DC6AB78AD357415F79F5F9D526104160EF4B9B8AD3574110000000CCAA3C77AB2610418B0DE5EE8ED357419C9390B0AB261041901CC6D28ED3574101336E9FAC2610414F9E77B88ED3574191942B27AE261041959623A88ED3574115DBCAF1AF261041B53EB2A28ED357417625DCB2B1261041E7CF0BA98ED35741E48A0B31B3261041EF1048BA8ED35741262E5B16B4261041338F96D48ED357418E220533B426104184B99DF18ED35741845CB3A3B326104199AABC0D8FD35741C4E34955B22610412AD199228FD35741CC8DE2B0B026104176BA642E8FD35741264BB5DCAE26104124817C2D8FD357412DF54D38AD261041D997B1218FD35741D5708E06AC2610419FFE030B8FD35741CCAA3C77AB2610418B0DE5EE8ED357411000000026856969A4261041F49E69A38FD35741F66DBDA2A426104158AD4A878FD357415A0D9B91A5261041842EFC6C8FD35741C972CA0FA72610417826A85C8FD357414CB969DAA826104174CE36578FD35741D0FF08A5AA2610412399785E8FD357411A69AA19AC2610418DDAB46F8FD357415C0CFAFEAC26104109201B898FD35741E7FC3125AD26104151840AA78FD35741BC3A528CAC2610410A7629C38FD35741FCC1E83DAB261041B0631ED78FD35741036C8199A92610413D4DE9E28FD357415C2954C5A7261041E81301E28FD3574164D3EC20A62610415A2A36D68FD357410C4F2DEFA4261041A99088BF8FD3574126856969A4261041F49E69A38FD3574110000000657C02767A26104127BD4AF493D35741356556AF7A261041CEC72BD893D357419A04349E7B2610417745DDBD93D35741086A631C7D261041AA7471AE93D357418BB002E77E261041ED1B00A993D357410FF7A1B18026104120AE59AF93D357415A60432682261041D2F195C093D357419C03930B83261041B43AFCD993D3574126F4CA318326104105A3EBF793D35741FB31EB988226104179980A1494D357415DB50F5481261041CE88FF2794D3574142631AA67F261041F073CA3394D35741BF1C7BDB7D2610417B3AE23294D35741A3CA852D7C261041554F172794D357414B46C6FB7A26104199B2691094D35741657C02767A26104127BD4AF493D3574110000000795E1355732610419B6ACFA894D357414947678E73261041A674B08C94D35741AEE6447D74261041312B4A7394D357413F480205762610419920F66294D357419F9213C677261041BCC7845D94D3574123D9B29079261041135ADE6394D357416E4254057B2610412A9E1A7594D35741B0E5A3EA7B2610411721698F94D357413BD6DB107C2610418A5070AC94D357410F14FC777B261041A0468FC894D35741729720337A261041DE706CDD94D357417941B98E78261041425C37E994D35741D2FE8BBA76261041C3224FE894D35741DAA8241675261041E6FD9BDB94D357415F28D7DA73261041AE60EEC494D35741795E1355732610419B6ACFA894D3574110000000F58776E548261041A5A781FB98D35741C570CA1E49261041EBAD62DF98D357412A10A80D4A261041792714C598D35741BA7165954B261041B51AC0B498D357411BBC76564D2610411FC14EAF98D357419F0216214F2610414F54A8B598D35741EA6BB79550261041B09AE4C698D357412B0F077B512610411E2133E198D35741B7FF3EA15126104177543AFE98D357418B3D5F08512610414B4E591A99D35741EEC083C34F261041577B362F99D35741F56A1C1F4E2610414F68013B99D357414E28EF4A4C261041B12E193A99D3574155D287A64A261041BA414E2E99D35741DB513A6B492610417CA1A01799D35741F58776E548261041A5A781FB98D3574110000000E66DF9BA41261041B38A65AC99D35741B7564DF4412610415A90469099D357411BF62AE342261041FB42E07699D35741AB57E86A44261041D9358C6699D357410DA2F92B4626104125DC1A6199D3574190E898F647261041746F746799D35741DB513A6B4926104136B6B07899D357411DF589504A261041383DFF9299D35741A8E5C1764A261041307106B099D357417C23E2DD49261041A26B25CC99D35741DFA60699482610411E9902E199D35741E6509FF4462610415386CDEC99D35741400E7220452610410F13FDEA99D3574124BC7C7243261041D72532DF99D35741CD37BD40422610411E8584C899D35741E66DF9BA41261041B38A65AC99D35741 Quai A/B platform])
The geometry is also valid. The osm object is : https://www.openstreetmap.org/relation/5601287
The problem is that with the commit 1aff01cc9e958295221fd130c3e2bb560c84b8ef I do not have this issue and the next commit fail.
I tried with portugal and corse and nothing wrong.
Any progress on this? Imposm seems to fail the same way also on this relation: www.openstreetmap.org/relation/49848
Error:
[PostGIS] SQL Error: pq: parse error - invalid geometry in query COPY \"import\".\"osm_pois\" (\"osm_id\", \"geometry\", \"name\", \"name_en\", \"tags\") FROM STDIN ([-100000000000049848 0102000020110F000019000000C4143B82A37C3841B6284BDC48A65841463F2A43947C3841B2A31AB23AA65841CB3000EE917C3841DE92618738A658416E1E6194947C3841BB72BFD337A65841F55584399A7C38417425FB7F37A6584181C6BDE6977C3841F5DEE14C35A6584112A9145E9E7C38414F532FF834A658414A1354579D7C3841596533EB33A65841C177E85E9C7C3841105AF8EE32A6584103F19A53A67C38413A95814632A658418A8C064CA77C384140308F5233A658413524004EA87C38419024816D34A6584114E159F3EC7C3841AB72A4BF2FA65841266DFD11EE7C384156F8B1CB30A65841C4B157A9037D3841C614B30145A658411CD2FB59BF7C3841C132079C49A6584104E3AD6CC07C38412EAB91A14AA65841FCF12684C17C3841C4598EAE4BA658412809D966B77C384177A6C84C4CA658414A778A56B67C384122A9945D4BA65841B5791214B57C384131B96C454AA658413297BB9CAE7C38412D03F0C44AA65841C786584CAC7C38416DAE868848A65841CA139DFDA57C3841CFAB1B0749A65841C4143B82A37C3841B6284BDC48A65841 Filozofická fakulta Univerzity Karlovy v Praze Faculty of Arts, Charles University in Prague \"name:cs\"=>\"Filozofická fakulta Univerzity Karlovy v Praze\", \"name:en\"=>\"Faculty of Arts, Charles University in Prague\", \"wikipedia\"=>\"cs:Filozofická fakulta Univerzity Karlovy\", \"phone\"=>\"+420 221 619 111\", \"short_name\"=>\"FF UK\", \"source\"=>\"cuzk:km\", \"type\"=>\"multipolygon\", \"amenity\"=>\"university\", \"building\"=>\"yes\", \"name\"=>\"Filozofická fakulta Univerzity Karlovy v Praze\", \"name:de\"=>\"Philosophische Fakultät der Karls-Universität Prag\", \"website\"=>\"http://www.ff.cuni.cz/\"])
@JanJakes
Any progress on this? Imposm seems to fail the same way also on this relation: www.openstreetmap.org/relation/49848
with rel49848 : it is hard to replicate on my config
cat /proc/version
SELECT PostGIS_Full_Version();
geos-config --version
I have tried:
wget http://download.geofabrik.de/europe/czech-republic-latest.osm.pbf
osmium getid czech-republic-latest.osm.pbf r49848 -r -o charles_university.osm.pbf
...
+ impconnection=postgis://localhost/imposm3dev
+ mapping_file=../charles_university.yml
+ import_osm_pbf=../charles_university.osm.pbf
+ /go/src/github.com/omniscale/imposm3/imposm3 import -mapping ../charles_university.yml -read ../charles_university.osm.pbf -srid 3857 -diff -write -optimize=false -overwritecache -deployproduction -connection postgis://localhost/imposm3dev
[May 25 19:22:50] [INFO] removing existing cache /tmp/imposm3
[May 25 19:22:50] [INFO] [reader] reading ../charles_university.osm.pbf with data till 2016-05-24 21:44:02 +0200 CEST
[May 25 19:22:50] [INFO] Reading OSM data took: 308.625ms
[May 25 19:22:50] [INFO] [ 0] C: 0/s (42) N: 0/s (1) W: 0/s (3) R: 0/s (1)
[May 25 19:22:51] [INFO] [ 0] C: 0/s ( 0.0%) N: 0/s (100.0%) W: 0/s (100.0%) R: 0/s (100.0%)
[May 25 19:22:51] [INFO] Writing OSM data took: 632.648ms
[May 25 19:22:51] [INFO] [PostGIS] Creating generalized tables took: 62µs
[May 25 19:22:51] [INFO] [PostGIS] Creating OSM id index on osm_university took: 31.417ms
[May 25 19:22:51] [INFO] [PostGIS] Creating geometry index on osm_university took: 10.421ms
[May 25 19:22:51] [INFO] [PostGIS] Creating geometry indices took: 42.268ms
[May 25 19:22:51] [INFO] Importing OSM data took: 675.129ms
[May 25 19:22:51] [INFO] [PostGIS] Rotating osm_university from import -> public -> backup
[May 25 19:22:51] [INFO] [PostGIS] backup of osm_university, to backup
[May 25 19:22:51] [INFO] [PostGIS] Rotating tables took: 15.457ms
[May 25 19:22:51] [INFO] Imposm took: 1.109825s
+ psql -d imposm3dev -c 'SELECT id, name , ST_SRID( geometry) FROM osm_university ;'
id | name | st_srid
--------+------------------------------------------------+---------
-49848 | Filozofická fakulta Univerzity Karlovy v Praze | 3857
(1 row)
$ cat charles_university.yml
tags:
load_all: true
tables:
university:
type: polygon
mapping:
name:
- __any__
columns:
- name: id
type: id
- name: geometry
type: geometry
- name: name
key: name
type: string
ok - I can replicate with rel49848. My guess : this is a 'mapping problem'
IF I use type: geometry
type_mappings:
-> OK ( see example1 )mapping:
-> error ( see example2)so probably the workaround:
mapping:
-> type_mappings:
type: geometry
+ type_mappings
= OK+ cd imposm3
+ impconnection=postgis://localhost/imposm3dev
+ import_osm_pbf=../charles_university.osm.pbf
+ mapping_file=../charles_university2_g2.yml
+ cat ../charles_university2_g2.yml
# ok
tables:
university:
type: geometry
type_mappings:
points:
amenity:
- university
polygons:
amenity:
- university
columns:
- name: id
type: id
- name: geometry
type: geometry
- name: name
key: name
type: string
+ /go/src/github.com/omniscale/imposm3/imposm3 import -mapping ../charles_university2_g2.yml -read ../charles_university.osm.pbf -write -overwritecache -deployproduction -connection postgis://localhost/imposm3dev
[May 26 02:55:01] [INFO] removing existing cache /tmp/imposm3
[May 26 02:55:01] [INFO] [reader] reading ../charles_university.osm.pbf with data till 2016-05-24 21:44:02 +0200 CEST
[May 26 02:55:01] [INFO] Reading OSM data took: 238.729ms
[May 26 02:55:01] [INFO] [ 0] C: 0/s (42) N: 0/s (0) W: 0/s (3) R: 0/s (1)
[May 26 02:55:01] [INFO] Writing OSM data took: 295.638ms
[May 26 02:55:01] [INFO] [PostGIS] Creating generalized tables took: 137µs
[May 26 02:55:01] [INFO] [ 0] C: 0/s ( 0.0%) N: 0/s (0) W: 0/s (100.0%) R: 0/s (100.0%)
[May 26 02:55:02] [INFO] [PostGIS] Creating OSM id index on osm_university took: 13.624ms
[May 26 02:55:02] [INFO] [PostGIS] Creating geometry index on osm_university took: 5.167ms
[May 26 02:55:02] [INFO] [PostGIS] Creating geometry indices took: 19.164ms
[May 26 02:55:02] [INFO] Importing OSM data took: 315.281ms
[May 26 02:55:02] [INFO] [PostGIS] Rotating osm_university from import -> public -> backup
[May 26 02:55:02] [INFO] [PostGIS] backup of osm_university, to backup
[May 26 02:55:02] [INFO] [PostGIS] Rotating tables took: 16.06ms
[May 26 02:55:02] [INFO] Imposm took: 570.27ms
type: geometry
+ mapping
= "pq: parse error - invalid geometry"+ mapping_file=../charles_university2_g1.yml
+ cat ../charles_university2_g1.yml
# error
tables:
university:
type: geometry
mapping:
amenity:
- university
columns:
- name: id
type: id
- name: geometry
type: geometry
- name: name
key: name
type: string
+ /go/src/github.com/omniscale/imposm3/imposm3 import -mapping ../charles_university2_g1.yml -read ../charles_university.osm.pbf -write -overwritecache -deployproduction -connection postgis://localhost/imposm3dev
[May 26 02:55:02] [INFO] removing existing cache /tmp/imposm3
[May 26 02:55:02] [INFO] [reader] reading ../charles_university.osm.pbf with data till 2016-05-24 21:44:02 +0200 CEST
[May 26 02:55:02] [INFO] [ 0] C: 0/s (42) N: 0/s (0) W: 0/s (3) R: 0/s (1)
[May 26 02:55:02] [INFO] Reading OSM data took: 240.535ms
[May 26 02:55:02] pq: parse error - invalid geometry
Thanks! We'll try it out. Yes, we use type: geometry
(with use_single_id_space: true
).
With older version (0.1 at 901b40bfd7e9d0eace5c74903d64731fdae2fafa) it works fine.
The workaround it working! Thanks :-)
The type_mappings has solved my issue thanks
The mapping should be :
tables:
platform:
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- key: name
name: name
type: string
- name: type
type: mapping_value
type_mappings:
polygon:
railway:
- platform
linestring:
railway:
- platform
type: geometry
@Joxit The fact that there is a workaround doesn't mean that the bug is fixed. Therefore I don't think this issue should be closed.
Ok, thx @JanJakes I reopen this issue
It is now an error to have a geometry table without type_mappings.
Ok, thx @olt :smile:
Since imposm3 423390ea71fc40f659aac649b1fe0807473f7def I have one error with geometry tables.
I'm importing ile-de-france data from geofabrik.
The yml mapping is :
Here is the error :
[PostGIS] SQL Error: pq: parse error - invalid geometry in query COPY "import"."osm_platform" ("osm_id", "geometry", "name", "type") FROM STDIN ([-5802618 0103000020110F00000400000023000000AF7EF71AD20F0E41F8BD3A5367DF5741E55FEF3698100E41C0753FAE68DF57418136320257110E41A746CB216ADF57416FA3D9740A120E41C4E987896BDF574146CAE11CBC120E41070A991F6DDF5741DC26327759130E41555221A76EDF5741C9685EF800140E416555735870DF57414B4319D6B5140E415C3B9D6472DF5741C414618854150E415A7D594D74DF5741D253BCA5F4150E41A685B25776DF5741D2BB4457C3160E4197EB2C2779DF57413C7D1D8173170E417BAF19857BDF574158CF405ACF180E41BE0E3A3E80DF5741C1DFA3AAD1180E41E78E121880DF5741B351BE66DF180E418D5FB0377FDF57412F4FE1CAEB180E419113336C7EDF57410A1A40C7EE180E4189503C3A7EDF574115BF3DCA2E180E41B82EA8757BDF5741951954D027170E41D1C713B977DF5741FCF3CE2EA0160E411345FDBF75DF57412E0BC34529160E4183FFD71674DF5741DC84093FC0150E41FD8B03B072DF5741A556117222150E4142A1D9A370DF5741666F47AE9C140E41FA14F9016FDF5741D72BCDCF17140E417B742A7D6DDF574136AE922CB1130E4177A5605B6CDF5741763612C131130E412CE7590A6BDF574144FCC92C8A120E418C52607369DF5741736C0EBCF4110E415461402D68DF57418D183DC559110E412EA2780167DF5741C7B261CFCD100E41AF1EEA1866DF5741288C7DCFE00F0E41BFED75A464DF574192B93AE6DD0F0E417D9F2E2865DF574100591EF1D40F0E415AE6B0CD66DF5741AF7EF71AD20F0E41F8BD3A5367DF574106000000806BCF9BA6140E41A68BFC5E71DF57417FAF91CAB4140E41681EC12D70DF5741D2D959D5E5140E416CCE31BE70DF57414EB014D1DE140E4178F7E65571DF5741FA9D7B93D7140E41CCCF55F071DF5741806BCF9BA6140E41A68BFC5E71DF57410500000073CAE5835B140E412FAAF68470DF5741643C004069140E411EBBFF5A6FDF57413F769C5C86140E411A2764B06FDF5741D8F4B9C678140E414B195BDA70DF574173CAE5835B140E412FAAF68470DF574105000000A2A60E0013130E419A12F32F6DDF57413295040122130E41DF8F7EBB6BDF5741BAEF4E4E6B130E4183EC89776CDF57412C01594D5C130E416B06E7EC6DDF5741A2A60E0013130E419A12F32F6DDF5741 Quai 1 SNCF platform])