Currently, when I save a multipolygon, I do this by combining all the polygons I have into one string before I save them into one cell. Worked like a charm so far.
However, I'm starting to get bigger and more polygons, which creates huge strings and slows down my merge sp. I would like to know if there is a way to add a polygon to an existing multipolygon. Example: I have two polygons. With the first polygon, I create a new entry and save that one polygon as a multipolygon. Then, I take the second polygon and add it to the existing data, updating the already existing record.
INSERT INTO MyTable
VALUES ('MULTIPOLYGON(((1 1, 1 -1, -1 -1, -1 1, 1 1)))')
Pseudo code:
UPDATE MyTable
SET PolygonData.Append('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))')
WHERE Id = 1
Note: The column PolygonData is of the Geography data type.
Is it possible to append polygons like that into an existing multipolygon, without reading out the entire data and stitching it together?