Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function CreateNearestPointOnPolygon(pPoint As IPoint, ByRef pFeature As IFeature) As geoCode
- Dim pPoint2 As IPoint
- pPoint2 = New Point
- Dim pRelOp As IRelationalOperator
- pRelOp = pFeature.Shape
- Dim res As Boolean
- res = pRelOp.Contains(pPoint)
- Dim pProximity As IProximityOperator
- pProximity = pFeature.Shape
- pPoint2 = pProximity.ReturnNearestPoint(pPoint, esriSegmentExtension.esriNoExtension)
- Dim Geo2 As geoCode
- Geo2.lon = pPoint2.X
- Geo2.lat = pPoint2.Y
- Return Geo2
- End Function
Add Comment
Please, Sign In to add comment