I am trying to find the nearest centerline segment to an address point. I was hoping that I would be able to use the ShortestLineTo method, but it is not working. I have tested with Microsoft's examples and they work. I am unable to get the method to work.
Here is Microsoft's Example:
DECLARE @Shape1 geometry = 'POLYGON ((-20 -30, -3 -26, 14 -28, 20 -40, -20 -30))'
DECLARE @Shape2 geometry = 'POLYGON ((-18 -20, 0 -10, 4 -12, 10 -20, 2 -22, -18 -20))'
Select l.ADDRESSPOINT_TAX.shape from l.ADDRESSPOINT_TAX where OBJECTID = '1'
select l.CADCENTERLINE.SHAPE from l.CADCENTERLINE where OBJECTID = '1'
This is the error that I am getting back.
Remote function reference 'l.ADDRESSPOINT_TAX.Shape.ShortestLineTo' is not allowed, and the column name 'l' could not be found or is ambiguous.
Msg 4121, Level 16, State 1, Line 1
Cannot find either column "ADDRESSPOINT_TAX" or the user-defined function or aggregate "ADDRESSPOINT_TAX.Shape.ShortestLineTo", or the name is ambiguous.