[Qgis-user] Splitting file into multiple csv files

Matt Boyd mattslists at gmail.com
Mon Jul 14 23:29:30 PDT 2014


I possibly shouldn't have bothered the list but as I did, this is the
script I used.

awk -F, '{print > $3}' Filtered_data.csv

prints the whole line and creates a new file named & based on column 3.

Simple enough to be embarrassing




On Tue, Jul 15, 2014 at 11:38 AM, Mike Treglia <mtreglia at gmail.com> wrote:

> Well that's a pretty giant CSV :-)
> I have no experience scripting in Q... I would have to do it in R myself,
> which would probably be pretty slow on a job like that...
> Good luck! Hope somebody else had some thoughts
>
>
> On Jul 14, 2014, at 8:26 PM, Matt Boyd <mattslists at gmail.com> wrote:
>
> It's in csv so I can probably just script something in with awk or bash.
> I'm a bit rustyon those.
>
>
> On Tue, Jul 15, 2014 at 11:25 AM, Matt Boyd <mattslists at gmail.com> wrote:
>
>> It needs a script, I haven't counted the lines but the csv file I used
>> for the input is ~60mb.
>>
>>
>> On Tue, Jul 15, 2014 at 10:24 AM, Mike Treglia <mtreglia at gmail.com>
>> wrote:
>>
>>> How many groups do you have in that field? I.e., Is it reasonable to do
>>> a process by hand a few times? Or is it an unreasonably large number of
>>> groups in that field, where you'll really need to script it?
>>>
>>>
>>>
>>> On Jul 14, 2014, at 6:52 PM, Matt Boyd <mattslists at gmail.com> wrote:
>>>
>>> Hi fellow QGIS users.
>>> I've got a rather large shapefile of point data, the points have a
>>> common identifier field that I'd like to use to split each of the features
>>> out on.
>>> In short: input data single file to output data (multiple files based on
>>> column).
>>>
>>> Is there a plugin that would do this or is it something I'd need to
>>> script using gdal? I need to output in csv as well.
>>>
>>> Thanks for any tips
>>> Matt
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140715/e97b5202/attachment.html>


More information about the Qgis-user mailing list