Hi Arun,
i ran into similar problems. i'm exploring the GeoAPI, the way i found to solve the intersecting / containing is first to declare and initialize a IGeometryFactory
Dim GFact As GeoAPI.Geometries.IGeometryFactory
GFact = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory(0) 'Instead of 0 better use SRID
Then create a point
Dim PointGeom As GeoAPI.Geometries.IPoint
PointGeom = GFact.CreatePoint(New GeoAPI.Geometries.Coordinate(1, 2))
Then create a polygon (there are different ways, i don't know how to do it out of a shapefile. If you solve that, let us all know;)
Dim coords(3) As GeoAPI.Geometries.Coordinate
coords(0) = New GeoAPI.Geometries.Coordinate(0, 0)
coords(1) = New GeoAPI.Geometries.Coordinate(1, 3)
coords(2) = New GeoAPI.Geometries.Coordinate(2, 1)
coords(3) = New GeoAPI.Geometries.Coordinate(0, 0)
Dim PolygonGeom As GeoAPI.Geometries.IPolygon
PolygonGeom = GFact.CreatePolygon(coords)
Then you can find out
If PolygonGeom.Contains(PointGeom) Then
MsgBox("Contained")
Else
MsgBox("Not contained")
End If
Other methods beside "Contains" are "Intersects" or "Touches". Quite powerfull, the GeoAPI...
Hope you can live with my VBcode, i was to lazy to translate it to C++
