<div dir="ltr"><div>It looks like the regex in</div><a href="https://qgis.org/api/qgsmultipoint_8cpp_source.html#l00037">https://qgis.org/api/qgsmultipoint_8cpp_source.html#l00037</a><br><div>does not work this case. Although it should, hm.</div><div>Was it fixed for 2.99 ? . Let's see:</div><div><a href="http://qgis.org/api/2.18/qgsmultipointv2_8cpp_source.html#l00037">http://qgis.org/api/2.18/qgsmultipointv2_8cpp_source.html#l00037</a><br></div><div>Yes ! The regex for 2.18 does not recognize the '-', and therefore does not recognize the 'non-standard' wkt form.</div><div>Looks like no need for a bug report then. Maybe I have missed an existing one (?).</div><div>2.18.10 should also work as it has the fixed regex:</div><div><a href="https://github.com/qgis/QGIS/blob/final-2_18_10/src/core/geometry/qgsmultipointv2.cpp#L37">https://github.com/qgis/QGIS/blob/final-2_18_10/src/core/geometry/qgsmultipointv2.cpp#L37</a><br></div><div>Too bad, on my gentoo system >2.18.3 does not work anymore due to qt5 issues, I think.</div><div>Well, all cleared up then.</div><div>-Andreas</div><div>PS: Thinking about the regex, it should probably recognize '+' as well: MULTIPOINT(+4 4, 5 5) may not work now. Hm, and '.' as in (.4 0.5, .1 .06)</div><div>What about testing for the 'standard' wkt form by looking for double parentheses with '(\\s*(' instead ?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 10:05 AM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@netscape.net" target="_blank">andreasplesch@netscape.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, I could narrow down the error to negative coordinates:</div><div><br></div><div>This works on the console:<br></div><div><div style="color:rgb(0,0,0);font-size:16px">>>> QgsGeometry.fromWkt('MULTIPOIN<wbr>TZ(2 2 4,3 3 4)').exportToWkt()</div><div style="color:rgb(0,0,0);font-size:16px">u'MultiPointZ ((2 2 4),(3 3 4))'</div><div style="color:rgb(0,0,0);font-size:16px"><br></div><div style="color:rgb(0,0,0);font-size:16px">But this does not:</div></div><div style="color:rgb(0,0,0);font-size:16px"><br></div><div><div style="color:rgb(0,0,0);font-size:16px">>>> QgsGeometry.fromWkt('<wbr>MULTIPOINTZ(-2 2 4,3 3 4)').exportToWkt()</div><div style="color:rgb(0,0,0);font-size:16px">Traceback (most recent call last):</div><div style="color:rgb(0,0,0);font-size:16px">  File "<input>", line 1, in <module></div><div style="color:rgb(0,0,0);font-size:16px">AttributeError: 'NoneType' object has no attribute 'exportToWkt'</div><div style="color:rgb(0,0,0);font-size:16px"><br></div><div style="color:rgb(0,0,0);font-size:16px">So negative coordinates do not work without parentheses, surprisingly. Perhaps some oversight in parsing.</div><div style="color:rgb(0,0,0);font-size:16px"><br></div><div style="color:rgb(0,0,0);font-size:16px">But negative coordinates work with parentheses:</div><div style="color:rgb(0,0,0);font-size:16px"><br></div><div><div><font color="#000000"><span style="font-size:16px">>>> QgsGeometry.fromWkt('<wbr>MULTIPOINTZ((-2 2 4),(3 3 4))').exportToWkt()</span></font></div><div><font color="#000000"><span style="font-size:16px">u'MultiPointZ ((-2 2 4),(3 3 4))'</span></font></div></div><div><font color="#000000"><span style="font-size:16px"><br></span></font></div><div><font color="#000000"><span style="font-size:16px">If there are no objections, I will file a report on the bug tracker.</span></font></div><div><font color="#000000"><span style="font-size:16px"><br></span></font></div><div><font color="#000000"><span style="font-size:16px">-Andreas</span></font></div><div style="color:rgb(0,0,0);font-size:16px"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 11, 2017 at 7:09 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@netscape.net" target="_blank">andreasplesch@netscape.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><div class="gmail_quote">Hi</div><div class="gmail_quote" dir="auto"><br><blockquote class="m_4381694449833827745m_-3540671510186272748quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Using 2.18.3, I found that Add Delimited Text Layer required a WKT of the form:</div><div><br></div>MULTIPOINT Z ((-119.00 34.82 1487),(-119.01 34.81 1450))<div><br></div><div>rather than just<br><div><br></div><div>MULTIPOINT Z (-119.00 34.82 1487,-119.01 34.81 1450)<br></div><div><br></div><div>without the internal parentheses which is also allowed, and perhaps more common.</div><div><br></div><div>I searched through the bug tracker for 'MULTIPOINT' but could not find a relevant issue.</div><div><br></div><div>Did anybody come across this ?</div><div><br></div><div>On a related note, I did this in order to convert a LINESTRINGZ to POINTZ since the Extract Nodes tool did not preserve Z. CSV Exporting, text editing and reimporting as MULTIPOINTZ seemed the easiest option. Is there another option ?</div><div><br></div><div>Thanks, Andreas </div><span class="HOEnZb"><font color="#888888"><span class="m_4381694449833827745HOEnZb"><font color="#888888"><font color="#888888"><div><br></div>-- <br><div class="m_4381694449833827745m_-3540671510186272748m_6205453221603329169gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</font></font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div><br></div>