<div dir="ltr">> 

Convert it to a geopackage first -- geojson is a HORRIBLE format for large datasets like this, as it's completely unoptimised and has no spatial index<div><br></div><div>Just want to add that shapefile itself has size limitations and is not a good format for these types of large datasets (or anything really), so I definitely recommended using gpkg.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Oct 2020 at 03:52, Nicolas Cadieux <<a href="mailto:njacadieux.gitlab@gmail.com">njacadieux.gitlab@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
If the clipping operations takes too much time, you could try a spatial query. Once you have a field with the states for each building, then you can split the file with that field. This may, or may not be faster. Maybe also be a problem with building sitting on the border.<br>
<br>
Nicolas Cadieux<br>
<br>
> Le 21 oct. 2020 à 20:28, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> a écrit :<br>
> <br>
> On Thu, 22 Oct 2020 at 10:23, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> wrote:<br>
>> <br>
>>> On Thu, 22 Oct 2020 at 10:15, <<a href="mailto:Iain@jcis.net.au" target="_blank">Iain@jcis.net.au</a>> wrote:<br>
>>> <br>
>>> Nyall,<br>
>>> <br>
>>> Thanks for your quick reply. Would I load it first and then save the layer as a geopackage to do that? Or do I have to do something more elaborate?<br>
>> <br>
>> I'd do it from the QGIS browser panel -- right click on the geojson<br>
>> file and save as.<br>
> <br>
> Just to clarify -- that's the "export" option, not "save as".<br>
> <br>
> Nyall<br>
> <br>
> That'll save some of the initial time required to<br>
>> load this into QGIS.<br>
>> <br>
>> (alternatively the fastest way to convert would be to use ogr2ogr<br>
>> directly from the command line, if you're comfortable with that!)<br>
>> <br>
>> Nyall<br>
>> <br>
>>> <br>
>>> Cheers<br>
>>> <br>
>>> Dr Iain Stuart<br>
>>> JCIS Consultants<br>
>>> P.O. Box 2397<br>
>>> Burwood North<br>
>>> NSW, 2134<br>
>>> <br>
>>> (02) 9701 0191<br>
>>> (0413) 380116 (m)<br>
>>> <br>
>>> -----Original Message-----<br>
>>> From: Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>><br>
>>> Sent: Thursday, 22 October 2020 10:41 AM<br>
>>> To: <a href="mailto:Iain@jcis.net.au" target="_blank">Iain@jcis.net.au</a><br>
>>> Cc: qgis-user <<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>><br>
>>> Subject: Re: [Qgis-user] clip geojason QGIS<br>
>>> <br>
>>> On Thu, 22 Oct 2020 at 09:33, <<a href="mailto:Iain@jcis.net.au" target="_blank">Iain@jcis.net.au</a>> wrote:<br>
>>>> <br>
>>>> It seems that Microsoft (of all people) is creating this database of building shapes for the known universe. They recently completed Australia and made it available. It is in a zipped geojason file – a format that I have no idea about.<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> I have loaded it to QGIS and it is huge. It took over 30min to load and it takes about 10min to redraw every time and I am not running it on a Pentium 4 with 8bits of ram either.<br>
>>> <br>
>>> Convert it to a geopackage first -- geojson is a HORRIBLE format for large datasets like this, as it's completely unoptimised and has no spatial index. Effectively on every redraw QGIS is having to loop through the entire 6gb geojson file every time! ouch....<br>
>>> <br>
>>> Nyall<br>
>>> <br>
>>> <br>
>>> <br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> I would like to clip the data to the states of Australia which I have a vector files or maybe regions in order to get the dataset smaller so it can be more usable.<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> Can you clip geojason files ? or would I have to covert them into something like shapefiles? Any ideas on a workflow to do this?<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> Cheers<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> Dr Iain Stuart<br>
>>>> <br>
>>>> JCIS Consultants<br>
>>>> <br>
>>>> P.O. Box 2397<br>
>>>> <br>
>>>> Burwood North<br>
>>>> <br>
>>>> NSW, 2134<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> (02) 9701 0191<br>
>>>> (0413) 380116 (m)<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> _______________________________________________<br>
>>>> Qgis-user mailing list<br>
>>>> <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
>>>> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>>>> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
>>> <br>
>>> <br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>