ThinkGeo.com    |     Documentation    |     Premium Support

FeatureShape.GetPointOnALine - FirstPoint vs LastPoint

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


Hi Dennis,

I am a little confused about this question.

Do you means the GetPointOnALine don’t return correct result for the specified shape id equal 10044?

It looks I cannot access the FTP this week, could you please get the WKT of target shape 10044(You can call Feature.GetWellKnownText when debug), so I can try to reproduce it in a simple sample.

Regards,

Ethan

Ethan,

Before we go any further with this issue I am first going to verify with the data provider as to the accuracy of the line in question.

I’ll let you know what they say.

Regards,
Dennis

Hi Dennis,

Ok, any update please let us know.

Regards,

Ethan

hi Ethan,

Please disregard this post as I have verified with the data provider that the data is accurate.

Regards,
Dennis

Hi Dennis,

Thanks for your update.

Regards,

Ethan