<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Disperse Point in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/disperse-point/m-p/727024#M179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have many point in same coordinate and display in web application on different location by dispersing .&lt;/P&gt;&lt;P&gt;i am searching one function to solve the problem and i achieve in postgresgis but not achieve in sql server. kindly define my function that is mention below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE [abc]&lt;BR /&gt;GO&lt;BR /&gt;/****** Object: UserDefinedFunction [dbo].[fun_ReturnFinalDestination] Script Date: 10/19/2016 22:36:31 ******/&lt;BR /&gt;SET ANSI_NULLS ON&lt;BR /&gt;GO&lt;BR /&gt;SET QUOTED_IDENTIFIER ON&lt;BR /&gt;GO&lt;BR /&gt;ALTER FUNCTION [dbo].[fun_ReturnFinalDestination]&lt;BR /&gt;( @latY1 float, -- example 50.80576&lt;BR /&gt; @longX1 float, -- example -1.111801667&lt;BR /&gt; @dist decimal(18,9), -- supplied in metres example 170&lt;BR /&gt; @bearing decimal(18,9) -- supplied in degrees example 180&lt;BR /&gt;)&lt;BR /&gt;RETURNS @LatYLongX TABLE&lt;BR /&gt;(&lt;BR /&gt; LatY float NULL,&lt;BR /&gt; LongX float NULL&lt;BR /&gt;)&lt;BR /&gt;AS&lt;BR /&gt;BEGIN&lt;BR /&gt; -- Fill the table variable with the rows for your result set&lt;BR /&gt; declare @latY2 float&lt;BR /&gt; declare @longX2 float&lt;BR /&gt; declare @radiusEarth decimal(18,9) = 6378137.0&lt;BR /&gt; set @latY1 = RADIANS(@latY1) -- convert lat to radian&lt;BR /&gt; set @longX1 = RADIANS(@longX1) -- convert long to radian&lt;BR /&gt; set @bearing = RADIANS(@bearing) -- convert degrees to radian&lt;BR /&gt; set @laty2 = Asin(Sin(@laty1) * Cos(@dist / @radiusEarth ) + Cos(@laty1) * Sin(@dist / @radiusEarth ) * Cos(@bearing ))&lt;BR /&gt; set @longx2 = @longx1 + Atn2(Sin(@bearing) * Sin(@dist / @radiusEarth ) * Cos(@laty1), Cos(@dist / @radiusEarth ) - Sin(@laty1) * Sin(@laty2))&lt;/P&gt;&lt;P&gt;set @laty2 = DEGREES(@laty2) -- convert back to degrees&lt;BR /&gt; set @longx2 = DEGREES(@longx2) -- convert back to degrees&lt;/P&gt;&lt;P&gt;INSERT @LatYLongX&lt;BR /&gt; SELECT @laty2, @longx2&lt;BR /&gt; RETURN&lt;BR /&gt;END&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Oct 2016 17:42:08 GMT</pubDate>
    <dc:creator>Farhan_Tariq</dc:creator>
    <dc:date>2016-10-19T17:42:08Z</dc:date>
    <item>
      <title>Disperse Point</title>
      <link>https://community.esri.com/t5/geodatabase-questions/disperse-point/m-p/727024#M179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have many point in same coordinate and display in web application on different location by dispersing .&lt;/P&gt;&lt;P&gt;i am searching one function to solve the problem and i achieve in postgresgis but not achieve in sql server. kindly define my function that is mention below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE [abc]&lt;BR /&gt;GO&lt;BR /&gt;/****** Object: UserDefinedFunction [dbo].[fun_ReturnFinalDestination] Script Date: 10/19/2016 22:36:31 ******/&lt;BR /&gt;SET ANSI_NULLS ON&lt;BR /&gt;GO&lt;BR /&gt;SET QUOTED_IDENTIFIER ON&lt;BR /&gt;GO&lt;BR /&gt;ALTER FUNCTION [dbo].[fun_ReturnFinalDestination]&lt;BR /&gt;( @latY1 float, -- example 50.80576&lt;BR /&gt; @longX1 float, -- example -1.111801667&lt;BR /&gt; @dist decimal(18,9), -- supplied in metres example 170&lt;BR /&gt; @bearing decimal(18,9) -- supplied in degrees example 180&lt;BR /&gt;)&lt;BR /&gt;RETURNS @LatYLongX TABLE&lt;BR /&gt;(&lt;BR /&gt; LatY float NULL,&lt;BR /&gt; LongX float NULL&lt;BR /&gt;)&lt;BR /&gt;AS&lt;BR /&gt;BEGIN&lt;BR /&gt; -- Fill the table variable with the rows for your result set&lt;BR /&gt; declare @latY2 float&lt;BR /&gt; declare @longX2 float&lt;BR /&gt; declare @radiusEarth decimal(18,9) = 6378137.0&lt;BR /&gt; set @latY1 = RADIANS(@latY1) -- convert lat to radian&lt;BR /&gt; set @longX1 = RADIANS(@longX1) -- convert long to radian&lt;BR /&gt; set @bearing = RADIANS(@bearing) -- convert degrees to radian&lt;BR /&gt; set @laty2 = Asin(Sin(@laty1) * Cos(@dist / @radiusEarth ) + Cos(@laty1) * Sin(@dist / @radiusEarth ) * Cos(@bearing ))&lt;BR /&gt; set @longx2 = @longx1 + Atn2(Sin(@bearing) * Sin(@dist / @radiusEarth ) * Cos(@laty1), Cos(@dist / @radiusEarth ) - Sin(@laty1) * Sin(@laty2))&lt;/P&gt;&lt;P&gt;set @laty2 = DEGREES(@laty2) -- convert back to degrees&lt;BR /&gt; set @longx2 = DEGREES(@longx2) -- convert back to degrees&lt;/P&gt;&lt;P&gt;INSERT @LatYLongX&lt;BR /&gt; SELECT @laty2, @longx2&lt;BR /&gt; RETURN&lt;BR /&gt;END&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 17:42:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/disperse-point/m-p/727024#M179</guid>
      <dc:creator>Farhan_Tariq</dc:creator>
      <dc:date>2016-10-19T17:42:08Z</dc:date>
    </item>
  </channel>
</rss>

