Hello, All!
I'm very gratefull to this mailing list and all it's members for helping in my 
problems. You are the great. May be someone could help again :)
IntersectionPoints work very strange. I have two intersecting polylines. I need to 
find their intersection point and then in another place to find all polylines that 
intersect at current point. But I faced with such a problem - I found such two lines, 
that the result of SearchAtPoint (or any other search function) at current point is 1 
line, although this point was the intersection of two lines.

Here is the code:
Dim ftr1, ftr2, IntFtr As MapXLib.Feature
Dim SearchFtrs As MapXLib.Features
Dim Clayer As MapXLib.Layer
Dim IntPts As MapXLib.Points
Dim v As New MapXLib.Variables

Set Clayer = UMapX.Layers.Item(1)
Set ftr1 = Clayer.AllFeatures.Item(1)
Set ftr2 = Clayer.AllFeatures.Item(2)

Set IntPts = UMapX.FeatureFactory.IntersectionPoints(ftr1, ftr2, miIntersectCrossings)
Set IntFtr = UMapX.FeatureFactory.IntersectFeatures(ftr1, ftr2)
MsgBox Str(IntPts.Count), vbDefaultButton1, "IntersectionPoints count"
 
Set SearchFtrs = Clayer.SearchAtPoint(IntPts.Item(1))
MsgBox Str(SearchFtrs.Count), vbDefaultButton1, "Features At Point"
 
Set SearchFtrs = Clayer.SearchWithinFeature(IntFtr, miSearchTypePartiallyWithin)
MsgBox Str(SearchFtrs.Count), vbDefaultButton1, "Features At feature"
 
v.Add "var1", IntFtr   ' add feature variable
Set SearchFtrs = Clayer.Search("obj intersects var1", v)
MsgBox Str(SearchFtrs.Count), vbDefaultButton1, "Features At search layer"
 
 
In all the cases SearchFtrs.Count = 1
That's just Impossible.


Best Regards,
Katerinka

---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

Reply via email to