How to find point on the line from nearest point

1809
3
09-21-2016 05:42 AM
JurateMeister1
New Contributor

I am trying to find the coordinate of the line at the nearest distance from the point. I am using sde st_geometry library in oracle. I need the code that i can add to my pl SQL procedure.

Thank you, Jurate

0 Kudos
3 Replies
JayantaPoddar
MVP Esteemed Contributor

You can use the NEAR tool. Keep the Location parameter checked. This will add two new fields NEAR_X and NEAR_Y to the attribute table.



Think Location
JurateMeister1
New Contributor

Yes, I know I can use arc toolbox and gp. I am trying to get this done directly in oracle using sde.st_geometry library

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

With some other DBMSs, e.g., SQL Server and PostGIS, it would be fairly simple to use a shortest line method/function, if I understand your situation correctly.  Unfortunately, the ST_Geometry library doesn't offer similar functionality.  Doing some quick searches on "SQL nearest point" and "SQL shortest line," it appears there are a variety of suggestions, none of which I can speak to in terms of performance.

0 Kudos