While skimming the union function I could see it works with intersecting bounding boxes, layer features and attributes. But how, exactly does this function work; which are the lines that check for intersection, compose new features, adds the attributes to those features, etc?

| improve this question | | | | |
  • I doubt it is done in qgis, but in the gdal driver it uses. – lynxlynxlynx Oct 7 '15 at 10:53
  • ArcGIS gives quite a nice description on how Union works which would be somewhat similar to what happens in QGIS. Since you used the code tag, you could look into the Union script for QGIS as it is opensource. – Joseph Oct 7 '15 at 10:54
  • This question is quite broad and somewhat abstract. The source is available for review. You'll see that each feature is compared with every feature (using a spatial index where available). If there is a particular aspect of the process that confuses you, please edit this question to focus on that. – Vince Oct 7 '15 at 10:57
  • Thanks, I'll continue reviewing the function, and add more process oriented questions as they arise. – J. L. Oct 7 '15 at 18:51

Browse other questions tagged or ask your own question.