Dennis and list On Fri, Mar 3, 2023 at 11:45 AM Dennis Burgess via QGIS-User < qgis-user@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.
_______________________________________________ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user