Skip to main content
1 of 3
Daniel
  • 2.5k
  • 1
  • 24
  • 38

Is it best to use multipolygon or polygon features for large intersect operations?

I have two large layers that I want to do intersect operations. One is municipalities and the other is landuse. Right now, the landuse layer is of MultiPolygon type that is, for the entire state, I have only one entry in the table with the class "Forest", but composed of several small polygons. If I wanted to find all the forest areas in my city, what would be more efficient in PostGIS:

  1. Do an intersect between my municipality and the FOREST multipolygon that takes up the entire state or,
  2. Convert the Forest multipolygon into a new layer with several polygons and then do the Intersect

My gut feeling is that if I break the multipolygon feature into single polygons, the intersect might be faster because it would only occur in the polygons that have a bounding box that overlaps my municipality. If I have multipolygon features, the intersect would have to go through the entire state to identify only the parts that fall inside the municipality.

Daniel
  • 2.5k
  • 1
  • 24
  • 38