The Station class has a helper method that will compute those locations.
This is c# but you should be able to convert to python
m_StationList = new List<double>();m_StationEqList = new List<double>();var staTable = ((ProfileView)m_Alignment).StationTable;Station s = new Station(0.0); // from Trimble.Vce.Alignment.Parameterss.DoActionsAtStations(staTable, interval, startStation, endStation, StationEqAction, StationAction, false);stationList.Add(new StationFeature(startStation, startStationString));for (int i = 0; i < m_StationList.Count; i++)
{
double sta = m_StationList[i];
if (sta > startStation && sta < endStation)
stationList.Add(new StationFeature(sta, stationType));
}
for (int i = 0; i < m_StationEqList.Count; i++)
{
double sta = m_StationEqList[i];
if (sta > startStation && sta < endStation)
stationList.Add(new StationFeature(sta, staEqString));
}
stationList.Add(new StationFeature(endStation, endStationString));You need to define two delegates.
private double StationAction(double station, double stationInclEq, double lastStation){
m_StationList.Add(station);
return lastStation;
}private double StationEqAction(double station, double stationInclEq, double lastStation){
m_StationEqList.Add(station);
return lastStation;
}------------------------------
Gary Lantaff
------------------------------
Original Message:
Sent: 08-03-2021 18:44
From: Ronny Schneider
Subject: Honor Station Equations in Alignment Strings
Is there a simple built-in way to get the equation corrected distance along an Alignment String? i.e. when I want to compute points at even/given chainages on an alignment that has station equations.
Tried to compute points at 1660+995, 1660+996, 1660+997, 1660+998, 1660+999
I was hoping to utilize the StationEdit from Trimble.Vce.UI.Controls to get me the corrected distance along the line.
It works before the station equation as you can see on the ":1"
But it fails after the station equation.
Or do I really have to use Trimble.Vce.Alignment.Linestring.Linestring.StationToDistance(Trimble.Vce.Interfaces.Client.StationValue stationValue) where I have to figure out the zone on my own first in order to create the StationValue object.
In the Remarks for StationToDistance it says:
If the Zone field within the StationValue structure is set to -1. The first matching station value should be returned.
But it actually throws an error with -1, "Station zones must be greater than or equal to zero (0)"
------------------------------
Ronny Schneider
------------------------------