Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Closest linestring to a point

FlyingGuyNov 5 2012 — edited Mar 11 2013
Oracle EE 11g .2 release

Ok so I have a table of recods that have and SDO_GEOMETRY column and they are linestrings that represent roads. They are srid 8307.

So what I am trying to solve is to determine which records geometry is closest to a point type.

Since linestrings are maid up of several points how does one go about that. Logically each linestring could have points that were miles apart and my single point could be closer to a given point then many of the others in the linestring.

Do I have to unravel the points in the linestring or is there a function that will allow me to create an sdo_geometry that is of type point2D and then get the record that has the closest point on the linestring to my point2D?

Thanks in advance.
This post has been answered by Simon Greener on Nov 6 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2013
Added on Nov 5 2012
8 comments
983 views