MapSuite Team,
I’m using FeatureShape.GetPointOnALine as part of the code to center the map on a user specified address. For the vast majority of street features it works great. However, I’ve noticed one street in particular where the point that is being returned from GetPointOnALine is from the opposite end of the line. Something seems to be ‘backwards’.
Reference the screen-capture below (apologies for the skewed screen-captures). The curved street that intersects with the street labeled W MONTROSE DR" is one with this issue. The street in question starts at this point (with an address of 200) then goes east, then curves southward, and then curves around to the west and ends with an address of 459.
On the above street if I use the following code the returned point from GetPointOnALine corresponds to the end point of the street that is at the bottom of the screen-capture. When it fact it should return the end point that is at the top of the screen-capture:
oGeoCodeMatchItem.GeoCodedPoint = TheFeatureShape.GetPointOnALine(StartingPoint.FirstPoint, 0);
if StartingPoint.LastPoint is used then the proper end point is returned, which is at the top of the street in the screen-capture:
oGeoCodeMatchItem.GeoCodedPoint = TheFeatureShape.GetPointOnALine(StartingPoint.LastPoint, 0);
Do you think there is an issue with the vertices of the MultiLineShape?
Or is there some indication in the data that programmatically indicates whether to use FirstPoint or Last Point?
For the street labeled W MONTROSE DR the GetPointOnALine works properly when FirstPoint is used.
You’ll find the data on the OriStarMapping File Station in the MapLayers directory as Transportation.sqlite. The feature in question is Id=10044.
I just happened to check Bing Maps and it verifies the same as my application. Before you look at this further I am going to check with the people who are responsible for the data.
Thanks,
Dennis