First thanks for the work put in these are handy, I'm running into an issue, first if I union my dataset one row at a time in a curosor it works fine, if I use the aggregate it will tell me that my geometry is not valid (it is I checked all lines with
STIsValid). Is this possibly a rounding issue difference between the CLR and T-SQL? I'm running the 15818 source branch.
The dataset is the ZCTA 2000 files loaded with an SRID of 4269 using the Shape2Sql tool, so many of the rows are fairly large geometry but again it works all fine when doing them one by one.
Secondly I'm curious why their isn't a GeometryUnionAggregate in the library? Using the library you would have to turn each geometry into a geography then back again to use it, which isn't very performance friendly, I copied the geography one and tweaked it
for geometry but since I'm not a spatial expert I'm unclear if their is some other tweaks I should be making to keep all aspects in line.