Guest User

Untitled

a guest
May 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Private Function CreateNearestPointOnPolygon(pPoint As IPoint, ByRef pFeature As IFeature) As geoCode
  2. Dim pPoint2 As IPoint
  3. pPoint2 = New Point
  4.  
  5. Dim pRelOp As IRelationalOperator
  6. pRelOp = pFeature.Shape
  7.  
  8. Dim res As Boolean
  9. res = pRelOp.Contains(pPoint)
  10.  
  11. Dim pProximity As IProximityOperator
  12. pProximity = pFeature.Shape
  13. pPoint2 = pProximity.ReturnNearestPoint(pPoint, esriSegmentExtension.esriNoExtension)
  14. Dim Geo2 As geoCode
  15. Geo2.lon = pPoint2.X
  16. Geo2.lat = pPoint2.Y
  17. Return Geo2
  18. End Function
Add Comment
Please, Sign In to add comment