ThinkGeo.com    |     Documentation    |     Premium Support

GetPointOnALine Rounding Error?

I am using the GetPointOnALine method in the MapSuiteCore v2.0.50727, here is the code snippet:



PointShape



 pointShape = new PointShape();Vertex vertex0 = new Vertex(-76.61126, 39.293682);Vertex vertex1 = new Vertex(-76.61133, 39.294473);LineShape testLineShape = new LineShape();StartingPoint.FirstPoint, 50);

The resulting point shape has these coordinates - (X: -76.61126, Y: 39.294079045652289)


This looks like a rounding or some other kind of error with the longitude to me since the point really should be somewhere between -76.61126 and -76.61133. I'm using this function for one-way arrow placement so this seems to be what is throwing the placement off slightly in certain cases.


 



 


 


 


testLineShape.Vertices.Add(vertex0);


testLineShape.Vertices.Add(vertex1);


pointShape = testLineShape.GetPointOnALine(



OK let’s try that again without the formatting: 
  
 PointShape pointShape = new PointShape(); 
  
 Vertex vertex0 = new Vertex(-76.61126, 39.293682); 
 Vertex vertex1 = new Vertex(-76.61133, 39.294473); 
  
 LineShape testLineShape = new LineShape(); 
 testLineShape.Vertices.Add(vertex0); 
 testLineShape.Vertices.Add(vertex1); 
 pointShape = testLineShape.GetPointOnALine(StartingPoint.FirstPoint, 50); 
  
 The resulting point shape has these coordinates - (X: -76.61126, Y: 39.294079045652289) 
  
 This looks like a rounding or some other kind of error with the longitude to me since the point really should be somewhere between -76.61126 and -76.61133. I’m using this function for one-way arrow placement so this seems to be what is throwing the placement off slightly in certain cases. 
  
  
  


Christopher, 
  
 Thanks for your reporting and codes. 
  
 This is a potential bug when we transfer the logic from MapSuite2.x to MapSuite3.x , we will fix this problem as soon as possible. 
  
 Thanks. 
  
 Yale