<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>sqlspatialtools Work Item Rss Feed</title><link>http://www.codeplex.com/sqlspatialtools/WorkItem/List.aspx</link><description>sqlspatialtools Work Item Rss Description</description><item><title>Closed Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception [3737]</title><link>http://sqlspatialtools.codeplex.com/workitem/3737</link><description>When using GeographyCollectionAggregate or GeographyUnionAggregate on set of points that exceed the hemisphere limit an Exception is raised. What would be better is if NULL is returned as this would match the behaviour of STUnion and would make the aggregate classes more usable.&lt;br /&gt;&amp;#160;&lt;br /&gt;For example&amp;#58; -&lt;br /&gt;&amp;#160;&lt;br /&gt;declare &amp;#64;x geography &amp;#61; &amp;#39;MULTIPOINT &amp;#40;&amp;#40;0 1&amp;#41;, &amp;#40;90 1&amp;#41;, &amp;#40;180 1&amp;#41;, &amp;#40;270 1&amp;#41;&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;declare &amp;#64;y geography &amp;#61; &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;&amp;#160;&lt;br /&gt;select &amp;#64;x.STUnion&amp;#40;&amp;#64;y&amp;#41;&lt;br /&gt;&amp;#160;&lt;br /&gt;This returns NULL because by unioning &amp;#64;y to &amp;#64;x the new geography exceeds the hemisphere limit.&lt;br /&gt;&amp;#160;&lt;br /&gt;However if using, say GeographyCollectionAggregate, like so&amp;#58; -&lt;br /&gt;&amp;#160;&lt;br /&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#160;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#160;&lt;br /&gt;select name, dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;br /&gt;&amp;#160;&lt;br /&gt;The inclusion of the POINT&amp;#40;45 1&amp;#41; forces the &amp;#39;locus&amp;#39; value to exceed the hemisphere limit but instead of returning NULL a GLArgumentException is raised.&lt;br /&gt;</description><author>bsdz</author><pubDate>Thu, 16 May 2013 10:24:36 GMT</pubDate><guid isPermaLink="false">Closed Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception [3737] 20130516102436A</guid></item><item><title>Created Issue: Implement a method to export each geography in a resultset as a KML placemark fragment [10777]</title><link>http://sqlspatialtools.codeplex.com/workitem/10777</link><description>Often when working with more than one row of data in a sql resultset, you want to return a fragment of KML, not a entire well formed  kml document. &lt;br /&gt;&lt;br /&gt;I would like to suggest that the spatial tools library implement an additional export method that just return a  element as xml and optionally takes a parameter of xml to include as an  node.&lt;br /&gt;</description><author>Bigjimslade</author><pubDate>Tue, 29 Jan 2013 05:09:12 GMT</pubDate><guid isPermaLink="false">Created Issue: Implement a method to export each geography in a resultset as a KML placemark fragment [10777] 20130129050912A</guid></item><item><title>Commented Issue: ExportToKml should export to SqlXml [8717]</title><link>http://sqlspatialtools.codeplex.com/workitem/8717</link><description>Perhaps like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#91;Microsoft.SqlServer.Server.SqlFunction&amp;#93;&lt;br /&gt;&amp;#9;public static SqlXml ExportToKml&amp;#40;SqlGeography g&amp;#41;&lt;br /&gt;&amp;#9;&amp;#123;&lt;br /&gt;        if &amp;#40;g &amp;#61;&amp;#61; null &amp;#124;&amp;#124; g.IsNull&amp;#41;&lt;br /&gt;            return new SqlXml&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;MemoryStream stream &amp;#61; new MemoryStream&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;XmlWriter writer &amp;#61; XmlWriter.Create&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;KeyholeMarkupLanguageGeography sink &amp;#61; new KeyholeMarkupLanguageGeography&amp;#40;writer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;g.Populate&amp;#40;sink&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;sink.FinalizeKMLDocument&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;writer.Flush&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;stream.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        return new SqlXml&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can also be added to register scripts as follows&amp;#58; -&lt;br /&gt;&lt;br /&gt;create function ExportToKml&amp;#40;&amp;#64;g geography&amp;#41; returns xml&lt;br /&gt;as external name SQLSpatialTools.&amp;#91;KMLFunctions&amp;#93;.ExportToKml&lt;br /&gt;go&lt;br /&gt;Comments: ** Comment from web user: purekrome ** &lt;p&gt;and I&amp;#39;m wondering if it&amp;#39;s worth having another version of this function, which COMPRESSES &amp;#40;ie. zips&amp;#41; the output for large result sets .. so the data that goes over the wire is smaller .. at the cost of a tiny bit more cpu on both ends&amp;#63;&lt;/p&gt;</description><author>purekrome</author><pubDate>Mon, 13 Jun 2011 04:49:43 GMT</pubDate><guid isPermaLink="false">Commented Issue: ExportToKml should export to SqlXml [8717] 20110613044943A</guid></item><item><title>Commented Issue: ExportToKml should export to SqlXml [8717]</title><link>http://sqlspatialtools.codeplex.com/workitem/8717</link><description>Perhaps like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#91;Microsoft.SqlServer.Server.SqlFunction&amp;#93;&lt;br /&gt;&amp;#9;public static SqlXml ExportToKml&amp;#40;SqlGeography g&amp;#41;&lt;br /&gt;&amp;#9;&amp;#123;&lt;br /&gt;        if &amp;#40;g &amp;#61;&amp;#61; null &amp;#124;&amp;#124; g.IsNull&amp;#41;&lt;br /&gt;            return new SqlXml&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;MemoryStream stream &amp;#61; new MemoryStream&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;XmlWriter writer &amp;#61; XmlWriter.Create&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;KeyholeMarkupLanguageGeography sink &amp;#61; new KeyholeMarkupLanguageGeography&amp;#40;writer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;g.Populate&amp;#40;sink&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;sink.FinalizeKMLDocument&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;writer.Flush&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;stream.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        return new SqlXml&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can also be added to register scripts as follows&amp;#58; -&lt;br /&gt;&lt;br /&gt;create function ExportToKml&amp;#40;&amp;#64;g geography&amp;#41; returns xml&lt;br /&gt;as external name SQLSpatialTools.&amp;#91;KMLFunctions&amp;#93;.ExportToKml&lt;br /&gt;go&lt;br /&gt;Comments: ** Comment from web user: purekrome ** &lt;p&gt;Is there a performance difference with returning this as a SqlXml instead of a SqlString&amp;#63;&lt;/p&gt;</description><author>purekrome</author><pubDate>Mon, 13 Jun 2011 04:33:12 GMT</pubDate><guid isPermaLink="false">Commented Issue: ExportToKml should export to SqlXml [8717] 20110613043312A</guid></item><item><title>Created Issue: ExportToKml should export to SqlXml [8717]</title><link>http://sqlspatialtools.codeplex.com/workitem/8717</link><description>Perhaps like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#91;Microsoft.SqlServer.Server.SqlFunction&amp;#93;&lt;br /&gt;&amp;#9;public static SqlXml ExportToKml&amp;#40;SqlGeography g&amp;#41;&lt;br /&gt;&amp;#9;&amp;#123;&lt;br /&gt;        if &amp;#40;g &amp;#61;&amp;#61; null &amp;#124;&amp;#124; g.IsNull&amp;#41;&lt;br /&gt;            return new SqlXml&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;MemoryStream stream &amp;#61; new MemoryStream&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;XmlWriter writer &amp;#61; XmlWriter.Create&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;KeyholeMarkupLanguageGeography sink &amp;#61; new KeyholeMarkupLanguageGeography&amp;#40;writer&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;g.Populate&amp;#40;sink&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;sink.FinalizeKMLDocument&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&amp;#9;&amp;#9;writer.Flush&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;stream.Seek&amp;#40;0, SeekOrigin.Begin&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        return new SqlXml&amp;#40;stream&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Can also be added to register scripts as follows&amp;#58; -&lt;br /&gt;&lt;br /&gt;create function ExportToKml&amp;#40;&amp;#64;g geography&amp;#41; returns xml&lt;br /&gt;as external name SQLSpatialTools.&amp;#91;KMLFunctions&amp;#93;.ExportToKml&lt;br /&gt;go&lt;br /&gt;</description><author>bsdz</author><pubDate>Tue, 31 May 2011 09:45:47 GMT</pubDate><guid isPermaLink="false">Created Issue: ExportToKml should export to SqlXml [8717] 20110531094547A</guid></item><item><title>Created Issue: NullReferenceException in GeographyCollectionAggregate.Merge [5399]</title><link>http://sqlspatialtools.codeplex.com/WorkItem/View.aspx?WorkItemId=5399</link><description>A .NET Framework error occurred during execution of user-defined routine or aggregate &amp;#34;GeographyCollectionAggregate&amp;#34;&amp;#58;   &amp;#9;System.NullReferenceException&amp;#58; Object reference not set to an instance of an object.  System.NullReferenceException&amp;#58;      at &amp;#9;SQLSpatialTools.GeographyCollectionAggregate.Merge&amp;#40;GeographyCollectionAggregate group&amp;#41;  .&lt;br /&gt;</description><author>tintor</author><pubDate>Fri, 12 Feb 2010 10:16:22 GMT</pubDate><guid isPermaLink="false">Created Issue: NullReferenceException in GeographyCollectionAggregate.Merge [5399] 20100212101622A</guid></item><item><title>Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception</title><link>http://sqlspatialtools.codeplex.com/WorkItem/View.aspx?WorkItemId=3737</link><description>When using GeographyCollectionAggregate or GeographyUnionAggregate on set of points that exceed the hemisphere limit an Exception is raised. What would be better is if NULL is returned as this would match the behaviour of STUnion and would make the aggregate classes more usable.&lt;br /&gt;&lt;br /&gt;For example&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;x geography &amp;#61; &amp;#39;MULTIPOINT &amp;#40;&amp;#40;0 1&amp;#41;, &amp;#40;90 1&amp;#41;, &amp;#40;180 1&amp;#41;, &amp;#40;270 1&amp;#41;&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;declare &amp;#64;y geography &amp;#61; &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;&lt;br /&gt;select &amp;#64;x.STUnion&amp;#40;&amp;#64;y&amp;#41;&lt;br /&gt;&lt;br /&gt;This returns NULL because by unioning &amp;#64;y to &amp;#64;x the new geography exceeds the hemisphere limit.&lt;br /&gt;&lt;br /&gt;However if using, say GeographyCollectionAggregate, like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;select name, dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;br /&gt;&lt;br /&gt;The inclusion of the POINT&amp;#40;45 1&amp;#41; forces the &amp;#39;locus&amp;#39; value to exceed the hemisphere limit but instead of returning NULL a GLArgumentException is raised.&lt;br /&gt;Comments: ** Comment from web user: bsdz ** &lt;p&gt;I can confirm the latest fixes in SVN correct this issue. Thanks &amp;#58;&amp;#41;&lt;/p&gt;</description><author>bsdz</author><pubDate>Fri, 26 Jun 2009 08:30:06 GMT</pubDate><guid isPermaLink="false">Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception 20090626083006A</guid></item><item><title>Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception</title><link>http://sqlspatialtools.codeplex.com/WorkItem/View.aspx?WorkItemId=3737</link><description>When using GeographyCollectionAggregate or GeographyUnionAggregate on set of points that exceed the hemisphere limit an Exception is raised. What would be better is if NULL is returned as this would match the behaviour of STUnion and would make the aggregate classes more usable.&lt;br /&gt;&lt;br /&gt;For example&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;x geography &amp;#61; &amp;#39;MULTIPOINT &amp;#40;&amp;#40;0 1&amp;#41;, &amp;#40;90 1&amp;#41;, &amp;#40;180 1&amp;#41;, &amp;#40;270 1&amp;#41;&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;declare &amp;#64;y geography &amp;#61; &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;&lt;br /&gt;select &amp;#64;x.STUnion&amp;#40;&amp;#64;y&amp;#41;&lt;br /&gt;&lt;br /&gt;This returns NULL because by unioning &amp;#64;y to &amp;#64;x the new geography exceeds the hemisphere limit.&lt;br /&gt;&lt;br /&gt;However if using, say GeographyCollectionAggregate, like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;select name, dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;br /&gt;&lt;br /&gt;The inclusion of the POINT&amp;#40;45 1&amp;#41; forces the &amp;#39;locus&amp;#39; value to exceed the hemisphere limit but instead of returning NULL a GLArgumentException is raised.&lt;br /&gt;Comments: ** Comment from web user: bsdz ** &lt;p&gt;I&amp;#39;ve noticed a problem with my patch. It simply resets the collection of points whenever an exception occurs. This has the side effect of still accumulating points after an exception. The following query exhibits this&amp;#58; -&lt;/p&gt;&lt;p&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; then this point is included after being reset above &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;60 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 2&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 2&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 2&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 2&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;select name, &lt;br /&gt;dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;, &lt;br /&gt;dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41;.STNumPoints&amp;#40;&amp;#41;,&lt;br /&gt;COUNT &amp;#40;&amp;#42;&amp;#41;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;/p&gt;&lt;p&gt;I&amp;#39;ve still to get more familiar with writing aggregate classes using the CLR so I couldn&amp;#39;t work out how to place a holding flag on the accumulation stream instructing it to NULLify the aggregate at Terminate.&lt;/p&gt;&lt;p&gt;I can work around this by comparing the values STNumPoints and COUNT then filtering where needed. &lt;/p&gt;</description><author>bsdz</author><pubDate>Sun, 14 Jun 2009 23:25:35 GMT</pubDate><guid isPermaLink="false">Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception 20090614112535P</guid></item><item><title>Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception</title><link>http://sqlspatialtools.codeplex.com/WorkItem/View.aspx?WorkItemId=3737</link><description>When using GeographyCollectionAggregate or GeographyUnionAggregate on set of points that exceed the hemisphere limit an Exception is raised. What would be better is if NULL is returned as this would match the behaviour of STUnion and would make the aggregate classes more usable.&lt;br /&gt;&lt;br /&gt;For example&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;x geography &amp;#61; &amp;#39;MULTIPOINT &amp;#40;&amp;#40;0 1&amp;#41;, &amp;#40;90 1&amp;#41;, &amp;#40;180 1&amp;#41;, &amp;#40;270 1&amp;#41;&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;declare &amp;#64;y geography &amp;#61; &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;&lt;br /&gt;select &amp;#64;x.STUnion&amp;#40;&amp;#64;y&amp;#41;&lt;br /&gt;&lt;br /&gt;This returns NULL because by unioning &amp;#64;y to &amp;#64;x the new geography exceeds the hemisphere limit.&lt;br /&gt;&lt;br /&gt;However if using, say GeographyCollectionAggregate, like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;select name, dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;br /&gt;&lt;br /&gt;The inclusion of the POINT&amp;#40;45 1&amp;#41; forces the &amp;#39;locus&amp;#39; value to exceed the hemisphere limit but instead of returning NULL a GLArgumentException is raised.&lt;br /&gt;Comments: ** Comment from web user: bsdz ** &lt;p&gt;Here is a patch that resolves the issue by wrapping the ConstructedGeography property in a try&amp;#47;catch block. This patch might be a bit naive in terms of performance and should be accompanied by documentation stating clearly that an aggregate of points exceeding the hemisphere limit will return as an empty geography collection.&lt;/p&gt;</description><author>bsdz</author><pubDate>Sun, 14 Jun 2009 22:35:04 GMT</pubDate><guid isPermaLink="false">Commented Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception 20090614103504P</guid></item><item><title>Created Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception</title><link>http://sqlspatialtools.codeplex.com/WorkItem/View.aspx?WorkItemId=3737</link><description>When using GeographyCollectionAggregate or GeographyUnionAggregate on set of points that exceed the hemisphere limit an Exception is raised. What would be better is if NULL is returned as this would match the behaviour of STUnion and would make the aggregate classes more usable.&lt;br /&gt;&lt;br /&gt;For example&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;x geography &amp;#61; &amp;#39;MULTIPOINT &amp;#40;&amp;#40;0 1&amp;#41;, &amp;#40;90 1&amp;#41;, &amp;#40;180 1&amp;#41;, &amp;#40;270 1&amp;#41;&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;declare &amp;#64;y geography &amp;#61; &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39;&amp;#59;&lt;br /&gt;&lt;br /&gt;select &amp;#64;x.STUnion&amp;#40;&amp;#64;y&amp;#41;&lt;br /&gt;&lt;br /&gt;This returns NULL because by unioning &amp;#64;y to &amp;#64;x the new geography exceeds the hemisphere limit.&lt;br /&gt;&lt;br /&gt;However if using, say GeographyCollectionAggregate, like so&amp;#58; -&lt;br /&gt;&lt;br /&gt;declare &amp;#64;t table &amp;#40;&lt;br /&gt;&amp;#9;name varchar&amp;#40;max&amp;#41;,&lt;br /&gt;&amp;#9;position geography&lt;br /&gt;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;0 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;90 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;180 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;270 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&amp;#47;&amp;#42; including this point causes hemisphere limit Exception &amp;#42;&amp;#47;&lt;br /&gt;insert into &amp;#64;t &amp;#40;name, position&amp;#41; values &amp;#40;&amp;#39;object 1&amp;#39;, &amp;#39;POINT &amp;#40;45 1&amp;#41;&amp;#39; &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;select name, dbo.GeographyCollectionAggregate&amp;#40;position&amp;#41; &amp;#39;locus&amp;#39;&lt;br /&gt;from &amp;#64;t&lt;br /&gt;group by name&lt;br /&gt;&lt;br /&gt;The inclusion of the POINT&amp;#40;45 1&amp;#41; forces the &amp;#39;locus&amp;#39; value to exceed the hemisphere limit but instead of returning NULL a GLArgumentException is raised.&lt;br /&gt;</description><author>bsdz</author><pubDate>Sun, 14 Jun 2009 14:38:43 GMT</pubDate><guid isPermaLink="false">Created Issue: using GeographyCollectionAggregate on set of points that exceed hemispehere limit raise Exception 20090614023843P</guid></item></channel></rss>