<div dir="ltr"><div><div>Hi,<br></div>I think the WKT issue is an OGR one : <a href="https://trac.osgeo.org/gdal/ticket/5508">https://trac.osgeo.org/gdal/ticket/5508</a><br></div>It should work in QGIS master<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-20 20:31 GMT+02:00 Alex Mandel <span dir="ltr"><<a href="mailto:tech_dev@wildintellect.com" target="_blank">tech_dev@wildintellect.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">KML isn't a good choice, as it's always Lat/Lon WGS84.<br>
GML might work, but give GeoJson a shot first - it's simpler than GML to<br>
parse (actually little or no parsing required).<br>
<br>
Did you try ogr2ogr on the commandline to make sure it's not a bug in<br>
the QGIS writer for long lines?<br>
<br>
Thanks,<br>
Alex<br>
<br>
On 10/20/2014 11:11 AM, Andrew Gillett wrote:<br>
> I wrote my parser for WKT as it was the quickest and simplest format to<br>
> parse that I was aware of – I only need the country border data, and<br>
> could see how to parse this just by looking at the file, whereas other<br>
> formats would have needed more research.<br>
><br>
> The problem is with exporting the WKT using a specified projection. At<br>
> the moment I have to export an intermediate format to get the projection<br>
> right, then load that back in and copy/paste for the WKT.<br>
><br>
> I am now looking into using KML or GML instead.<br>
<div class="HOEnZb"><div class="h5">><br>
><br>
> On 20/10/2014 18:26, Alex Mandel wrote:<br>
>> That sounds like it's hitting some sort of line limit. Might be a bug in<br>
>> OGR. You could try writing WKT to a column first, but it would have to<br>
>> be in a layer type that supports long text fields.<br>
>><br>
>> That said WKT is not a great format for complex geometries. Perhaps you<br>
>> can tell us your goal and we can suggest another way to get there.<br>
>><br>
>> Thanks,<br>
>> Alex<br>
>><br>
>> On 10/20/2014 10:21 AM, Andrew Gillett wrote:<br>
>>> Thanks for the info. I've just tried this and there appears to be a bug<br>
>>> in it. I'm using the country border data from here:<br>
>>><br>
>>> <a href="http://www.naturalearthdata.com/downloads/10m-cultural-vectors/" target="_blank">http://www.naturalearthdata.com/downloads/10m-cultural-vectors/</a><br>
>>><br>
>>> If, for example, I select Iceland and export as you suggested, the<br>
>>> column for the polygon data is truncated. Only about 200 vertices are<br>
>>> exported, as compared to around 3000 which are correctly present if I<br>
>>> use the copy/paste method. The polygon data ends with an X coordinate<br>
>>> but no Y coordinate, and the closing brackets and quote mark are also<br>
>>> missing.<br>
>>><br>
>>><br>
>>> On 20/10/2014 17:39, Matthias Kuhn wrote:<br>
>>>> Hi Andrew,<br>
>>>><br>
>>>> WKT is a format for geometries and not a file type. Therefore it is not<br>
>>>> possible to offer a save as WKT just like that. You can however easily<br>
>>>> choose Comma Separated Value as export format and then choose AS_WKT in<br>
>>>> the Geometry combobox under layer options.<br>
>>>><br>
>>>> Best regards,<br>
>>>> Matthias<br>
>>>><br>
>>>><br>
>>>> On 20.10.2014 18:35, Andrew Gillett wrote:<br>
>>>>> It is possible to export in WKT format by copying then pasting into a<br>
>>>>> text editor. However, there is no WKT option when exporting via Layer<br>
>>>>> -> Save As. Is there a particular reason for this, or is there a<br>
>>>>> development list where I could request this?<br>
>>>>> _______________________________________________<br>
>>>>> Qgis-user mailing list<br>
>>>>> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>>>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>>> _______________________________________________<br>
>>> Qgis-user mailing list<br>
>>> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>> _______________________________________________<br>
>> Qgis-user mailing list<br>
>> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Alex Mandel<br>
<a href="http://wildintellect.com" target="_blank">http://wildintellect.com</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div></div></blockquote></div><br></div>