[QGIS-Developer] Editable CSV files

Matthias Kuhn matthias at opengis.ch
Wed Jul 19 07:54:37 PDT 2017


Hi all,

I think the main challenge is that there is no standard. Delimiters,
quoting etc... there's no official reference.

We can deal with varying input very well. Generating some output has a
certain risk of making the data incompatible with other applications.

If the requirements are well-defined (being able to reopen it in lo.calc
or ms excel) that's a good start which can very well be protected with
some unit tests.

I'm not convinced either way (if it's dangerous or not concerning data
corruption) but an opt-in checkbox to make the data writable with a
warning explaining why could be considered.

Matthias

On 07/19/2017 04:35 PM, Andreas Neumann wrote:
> Hi all,
> 
> Thanks all for your feedback. The "Add delimited text" way of loading
> CSV data is a lot more powerful and more flexible than the OGR way. So I
> would really prefer to use the CSV this way and still be able to edit
> and save directly to the CSV.
> 
> Would this be possible as an enhancement?
> 
> I don't need concurrent/simultaneous editing with Spreadsheets. All I
> want is an editable CSV directly from QGIS, so that it could be at a
> later time, be opened in Spreadsheets again (not opened at the same time
> in QGIS as well).
> 
> Andreas
> 
> On 19.07.2017 16:23, Stefan Keller wrote:
>> Nice hints, Bernhard and Nyall
>> Thinking about, there's no really complicated technical reason why
>> concurrent editing would not work.
>> It's simply a matter in which mode the reader SW opens the file.
>> * QGIS delimited text provider: locks.
>> * QGIS OGR data provider: does not lock - but not ask to reload if
>> file has changed.
>> * LibreOffice Writer and Excel: lock
>> * Notepad++: does not lock - and asks to reload if file has changed
>> * Other text editors: depends...
>>
>> So, in fact e could slightly enhance the situation, if QGIS delimited
>> text provider would not lock (and eventually ask to reload when file
>> changed).
>> The remaining problem is that we can't change the behaviour of
>> LibreOffice Writer (Windows) nor Excel short term...
>> Eventually someone could ask the LibreOffice Writer dev's for a solution?
>>
>> :Stefan
>>
>>
>> 2017-07-19 8:48 GMT+02:00 Nyall Dawson <nyall.dawson at gmail.com>:
>>> On 19 July 2017 at 15:45, Andreas Neumann <a.neumann at carto.net> wrote:
>>>> Hi,
>>>>
>>>> Is there a particular technical reason why csv/text files aren't
>>>> editable in
>>>> QGIS? Or is this mainly for historical reasons and it could be
>>>> implemented
>>>> as editable with reasonable effort?
>>>>
>>> It depends how they are loaded. If you load them using the delimited
>>> text provider, then no, they aren't editable.
>>>
>>> BUT.....
>>>
>>> if you load them as a ogr layer, they will be! (Since GDAL supports
>>> this)
>>>
>>> So drag and drop them to QGIS, or add via the "add vector layer"
>>> button and they'll be editable.
>>>
>>> Nyall
>>> _______________________________________________
>>> QGIS-Developer mailing list
>>> QGIS-Developer at lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


More information about the QGIS-Developer mailing list