<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I would welcome an "easier" way to open Point or WKT data from formats that do not store geometries natively, as you propose. Thanks for bringing it to the table, Raymond and Richard!</p>
<p>My suggestion would be to enhance the existing OGR "Add vector layer" dialog with an option to choose columns to be used for geometry creation. This way we don't have to "misuse" the delimited text layer loader for other formats and the user could open the data all in one step, without the need for postprocessing. OGR VRT provides all we need to create geometries from columns - see <a href="http://www.gdal.org/drv_vrt.html">http://www.gdal.org/drv_vrt.html</a></p>
<p>The drawback is that it would work only for OGR formats, not for all the other databases. But I would assume that people using databases are skilled enough to be able to use QGIS virtual layers, views, etc. to build geometries from their databases.</p>
<p>Greetings,<br />Andreas</p>
<p>On 2016-07-09 11:00, Richard Duivenvoorde wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Hi Devs,<br /><br /> Raymond Nijssen had an (I think) intriguing idea:<br /><br /> QGIS can open different types of table-data: dbf, excel etc etc<br /><br /> But if the excel contains an x,y,wkt column, you have to save it to<br /> csv/tsv first, to be able to use the delimited-text-provider to open it<br /> as a layer.<br /><br /> His idea: can't we use the delimited-text-provider for all tables that<br /> are open in QGIS immediately?<br /><br /> Had a look into the code<br /><br /><a href="https://github.com/qgis/QGIS/blob/master/src/providers/delimitedtext/qgsdelimitedtextfile.cpp#L583">https://github.com/qgis/QGIS/blob/master/src/providers/delimitedtext/qgsdelimitedtextfile.cpp#L583</a><br /><br /> which 'just' looks like a QTextStream:<br /><br /><a href="https://github.com/qgis/QGIS/blob/master/src/providers/delimitedtext/qgsdelimitedtextfile.h#L352">https://github.com/qgis/QGIS/blob/master/src/providers/delimitedtext/qgsdelimitedtextfile.h#L352</a><br /><br /> And according to this:<br /><a href="https://forum.qt.io/topic/63310/how-to-save-a-treeview-as-csv-file-in-qt">https://forum.qt.io/topic/63310/how-to-save-a-treeview-as-csv-file-in-qt</a><br /><br /> It is easy to create a textstream from QModel (in which we have the data<br /> I think???)...<br /><br /> So Question:<br /> - (to devs): would this indeed be doable/easy?<br /> - (to UI's): should the Delimited Text File dialog be updated then (or<br /> only with a 'open excisting table button'?<br /> - should we rename the provider to 'table' provider.<br /><br /> Comments/Opinions?<br /><br /> Regards,<br /><br /> Richard Duivenvoorde<br /> _______________________________________________<br /> Qgis-developer mailing list<br /><a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br /> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br /> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>