[GIS] Splitting KMZ file into two files using QGIS

kmzqgis

I have a KMZ file that contains about 10,500 features.
– My mapping application only allows 10,000 (a google api limit)
– So how do I split the KMZ file into two files?
– Example, file_A = 5,000 and file_B = 5,500

In QGIS v3, I can open the file, then open the Attribute Table:
– I see the 10,500 lines..
– I can select the first 5,000 lines..
– But how do I save these to a new KMZ file?

Or maybe delete the last 5,500 and save to a new file_A..?

Surely there is a way to quickly/easily break a KMZ into two files?

Best Answer

Open select by attribute dialog for the actual layer from the toolbar. select by attribute

Select the first 10000 records using $id from the record group.

Selection expression

Select Save as from the popup menu of the layer and check save only selected features. Input a name for the new layer.

Save as

Invert the selection of the layer.

Invert selection

Finally Save as the second part of the layer.