Viewing 15 posts - 1 through 15 (of 26 total)
Eirikur Eiriksson (8/13/2015)
He he, my name is not the most common but still I've come across table names (in a world far far away....) with the same name, not placing...
August 13, 2015 at 3:23 pm
The upgrades are incremental from the vendor. They don't recreate the database, only add / alter objects. The only risk would be if the vendor introduced an object...
August 13, 2015 at 2:14 pm
Grant Fritchey (8/13/2015)
August 13, 2015 at 10:47 am
Add the Geography Version:
CREATE TYPE [dbo].[udttPDXGeog] AS TABLE(
[geogpt] [geography] NULL
ALTER FUNCTION [dbo].[udfPDXGeogMedian] (@geogPts udttPDXGeog READONLY, @iIterations NUMERIC)
RETURNS GEOGRAPHY AS
BEGIN
DECLARE @tempXFLOAT = 0.0;
DECLARE @tempYFLOAT = 0.0;
DECLARE @denomsumFLOAT;
DECLARE @sridNUMERIC;
September 25, 2014 at 5:50 pm
I got the geometry version working beautifully after getting rid of the division by zeroes. I also had to ABS the longitude and then flip it back after:
CREATE TYPE...
September 25, 2014 at 5:03 pm
The function doesn't work anyway, even for straight up geometric medians of non-geographic multi-points. I calculated the geometric median for a few thousand sample test multi-points from my database,...
September 24, 2014 at 6:02 pm
I would expect that given the large variation of lats/longs. All of my data points will be within 1 degree latitude and longitude so I think i can get...
September 24, 2014 at 2:54 pm
Eirikur Eiriksson (9/24/2014)
Sounds a little like travelling salesman here:-)
This isn't too high of a volume, cannot say much but these are kind of hourly type volumes where I'm coming from....
September 24, 2014 at 12:55 pm
The more accurate it is, the more money I will save :-). So for an area of 30 miles by 30 miles, I would like to get the...
September 24, 2014 at 11:46 am
Well that didn't go so well ....
CREATE FUNCTION udfPDXGeogMedian (@geogPts udttPDXGeog READONLY, @iIterations NUMERIC)
RETURNS GEOGRAPHY AS
BEGIN
DECLARE @tempXFLOAT = 0.0;
DECLARE @tempYFLOAT = 0.0;
DECLARE @denomsumFLOAT;
SELECT@tempx = EXP(SUM(LOG(geogpt.Long))/COUNT(*)),
@tempy = EXP(SUM(LOG(geogpt.Lat))/COUNT(*)) FROM...
September 24, 2014 at 11:42 am
Thanks a bunch mickyT!!! I've added a user-defined table type to make this re-usable from my GIS database
CREATE TYPE udttPDXGeom AS TABLE (geompt GEOMETRY)
CREATE TYPE udttPDXGeog AS TABLE (geogpt...
September 24, 2014 at 11:20 am
Nice, I'm going to check it out tomorrow morning. I was using Geometric Mean and comparing it to Absolute distance from a separate point (to measure efficiency). If...
September 22, 2014 at 4:53 pm
I pulled it off of another forum (what is the etiquette relating to that?). I'm better off converting it to T-SQL for my purpose as it will be used...
September 22, 2014 at 4:47 pm
Same execution plan, but your code has benefit of being easier and more logical to adapt to 3 columns:
I'll leave it as a homework assignment to myself to allow it...
November 21, 2013 at 12:43 pm
Thanks Gail ... I just moved from SQL Server 2000 to 2008 this year so tips like this really help!
September 26, 2013 at 3:17 pm
Viewing 15 posts - 1 through 15 (of 26 total)