[Qgis-user] GPKG Multi-Layer to one flat

Dennis Burgess dmburgess at linktechs.net
Fri Mar 3 13:08:30 PST 2023


Many overlaps, just want if the area is covered, to show. I really just used a Disssolve, this reducded the number of polygons to less than ½ and is fairly quick.. Quciker than Union.




[LTI-Full_175px]
Dennis Burgess, Mikrotik Certified Trainer
MTCNA, MTCRE, MTCWE, MTCTCE, MTCINE, MTCSE, HE IPv6 Sage, Cambium ePMP Certified
Author of "Learn RouterOS- Second Edition”
Link Technologies, Inc -- Mikrotik & WISP Support Services
Office: 314-735-0270  Website: http://www.linktechs.net<http://www.linktechs.net/>
Need to Automate MikroTik Backups:  https://cloud.linktechs.net
Create Wireless Coverage’s with www.towercoverage.com

From: chris hermansen <clhermansen at gmail.com>
Sent: Friday, March 3, 2023 1:58 PM
To: Dennis Burgess <dmburgess at linktechs.net>
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] GPKG Multi-Layer to one flat

Dennis and list

On Fri, Mar 3, 2023 at 11:45 AM Dennis Burgess via QGIS-User <qgis-user at lists.osgeo.org<mailto:qgis-user at lists.osgeo.org>> wrote:
Ok, has to be a simple solution.

I have a GPKG file that is around 50 meg.  This has multiple layers or at least I can see multiple layers.  I.e. I have one polygon on top of another

What I want is to flatten these, to where ONLY the exact area that is show is displayed in the smallest file possible.

Union is the way to do this but its SLOW SLOW..  any other options… ?


Are the overlapping polygon geometries "the same", ie boundaries are coincident?  If that's the case, then the attributes from each polygon refer to exactly the same and you could just pick one of the layers and join the attributes on from the other layers.

If the geometries are distinct, union is one choice.  Another might be to convert all the polygons to linestrings, merge the linestrings into one layer, convert the merged linestrings back to polygons and then use spatial join to transfer the attributes back to the new polygons.  Not sure if that would be faster.  One potential problem with this general sort of problem is the creation of many tiny polygons where the linework is not quite coincident.  This can certainly mess with your concept of "the exact area".

Rasterizing the polygons, overlaying, then vectorizing might be another choice.

I think it's probably hard to say "what's best" or "what's simplest" without actually seeing an example of the overlap.


--
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230303/8ba2d9b9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4424 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230303/8ba2d9b9/attachment.png>


More information about the QGIS-User mailing list