I have following two geometries. 

```
Geometry 1 (G1): MULTIPOLYGON (((148.134707676 -34.1519003565, 148.143738823 -34.1540810687, 148.14648294 -34.1396863245, 148.143196834 -34.1392361445, 148.140859243 -34.1389158167, 148.140167574 -34.1388210316, 148.137263226 -34.1384230398, 148.137144086 -34.1390514776, 148.134707676 -34.1519003565)), ((148.127157711 -34.1375766788, 148.13687116 -34.13874378, 148.136991313 -34.1381100176, 148.137332697 -34.1381568007, 148.137468636 -34.1374507797, 148.137513814 -34.1372161475, 148.13838748 -34.1326786347, 148.128316556 -34.131510413, 148.128136102 -34.132455082, 148.128091255 -34.1326898756, 148.128070549 -34.132798268, 148.127157711 -34.1375766788)))
Geometry 2 (G2): MULTIPOLYGON (((148.12715771061104 -34.13757667877951, 148.1271063649348 -34.13784541889359, 148.12956888671459 -34.1381413736503, 148.13218218263441 -34.138455399790274, 148.13463511295583 -34.138750099589814, 148.13714408607888 -34.139051477554304, 148.13726322633426 -34.13842303982323, 148.14016757371385 -34.138821031561889, 148.14085924335836 -34.138915816684175, 148.14319683415181 -34.139236144501936, 148.14325611295016 -34.138968515921356, 148.14011850488848 -34.138538549666791, 148.13942363510321 -34.138443334273475, 148.13733269717761 -34.138156800659516, 148.13699131297133 -34.138110017649, 148.13687115978624 -34.138743779984061, 148.12715771061104 -34.13757667877951)))

```

I have done UnionAggregate these two geometries from the SQL Server. Which gives me below geometry.

```
Result from SQL Server union aggregate (G3): POLYGON ((148.143738823 -34.1540810687, 148.14648294 -34.1396863245, 148.143196834 -34.1392361445, 148.140859243 -34.1389158167, 148.14017909449052 -34.138822610347709, 148.14085924335836 -34.138915816684175, 148.14319683415181 -34.139236144501936, 148.14325611295016 -34.138968515921356, 148.14011850488848 -34.138538549666791, 148.13942363510321 -34.138443334273475, 148.13733269717761 -34.138156800659516, 148.13733269701217 -34.138156800636843, 148.137468636 -34.1374507797, 148.137513814 -34.1372161475, 148.13838748 -34.1326786347, 148.128316556 -34.131510413, 148.128136102 -34.132455082, 148.128091255 -34.1326898756, 148.128070549 -34.132798268, 148.127157711 -34.1375766788, 148.13687115978806 -34.138743779974533, 148.13687115978624 -34.138743779984061, 148.12715771061104 -34.13757667877951, 148.1271063649348 -34.13784541889359, 148.12956888671459 -34.1381413736503, 148.13218218263441 -34.138455399790274, 148.13463511295583 -34.138750099589814, 148.13714408601024 -34.139051477546062, 148.137144086 -34.1390514776, 148.134707676 -34.1519003565, 148.143738823 -34.1540810687), (148.14003283265782 -34.138802567576647, 148.13726322633008 -34.138423039845236, 148.13726322633426 -34.13842303982323, 148.14003283265782 -34.138802567576647), (148.13714475985358 -34.138131045883391, 148.13699131299023 -34.138110017651584, 148.136991313 -34.1381100176, 148.13714475985358 -34.138131045883391))

```

Bu the problem is this G3 does not loads up in ArcGis. So I tried to do Union from ArcGis geometry service and checked the result. Surprisingly it worked and the resulted geometry is different to G3.

```
Geometry service: http://mapserver/arcgis/rest/services/Utilities/Geometry/GeometryServer/union

```

**JSON**

```
{ "geometryType":"esriGeometryPolygon",

"spatialReference": {"wkid": 4283},
  "geometries":[
 {
  "rings" : [
   [[148.134707676,-34.1519003565],[148.143738823,-34.1540810687],[148.14648294,-34.1396863245],[148.143196834,-34.1392361445],[148.140859243,-34.1389158167],[148.140167574,-34.1388210316],[148.137263226,-34.1384230398],[148.137144086,-34.1390514776],[148.134707676,-34.1519003565]],    [[148.127157711,-34.1375766788],[148.13687116,-34.13874378],[148.136991313,-34.1381100176],[148.137332697,-34.1381568007],[148.137468636,-34.1374507797],[148.137513814,-34.1372161475],[148.13838748,-34.1326786347],[148.128316556,-34.131510413],[148.128136102,-34.132455082],[148.128091255,-34.1326898756],[148.128070549,-34.132798268],[148.127157711,-34.1375766788]]
  ]
 },
 {
  "rings" : [
   [[148.12715771061104,-34.13757667877951],[148.1271063649348,-34.13784541889359],[148.12956888671459,-34.1381413736503],[148.13218218263441,-34.138455399790274],[148.13463511295583,-34.138750099589814],[148.13714408607888,-34.139051477554304],[148.13726322633426,-34.13842303982323],[148.14016757371385,-34.138821031561889],[148.14085924335836,-34.138915816684175],[148.14319683415181,-34.139236144501936],[148.14325611295016,-34.138968515921356],[148.14011850488848,-34.138538549666791],[148.13942363510321,-34.138443334273475],[148.13733269717761,-34.138156800659516],[148.13699131297133,-34.138110017649],[148.13687115978624,-34.138743779984061],[148.12715771061104,-34.13757667877951]]
  ]
 }
]

}

```

**Questions**

1. Whats wrong with G1 and G2?
2. Why does the unionaggregated geometry from SQL Server is different to the what is 
generated from ArcGIS?

Also I have tried to UnionAggregate from "[DotSpatial](http://dotspatial.codeplex.com/)" library and "[NetTopologySuite](https://github.com/NetTopologySuite/NetTopologySuite)". But still the unionaggregated polygon does not load in ArcMap.

I myself am not a GIS developer, I have been trying to solve this with our GIS team and they dont know why this is happening. So it has come to a point that I have to call ArcGIS geometry service to generate unionaggregate. This results in massive change in the already production application. I dont want to go to that option with out finding the cause of the real problem.