Created
February 4, 2025 10:56
-
-
Save SashaKarpov/0b98cc91cfeb97245b6b56bfa2eca749 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal RouteCoordinates[] GetCoordinatesAlongPon(string routeName, double distance) | |
{ | |
var encodedRouteName = Uri.EscapeUriString(routeName); | |
var query = $"v3/cables/coordinates_along_pon/{encodedRouteName}/{distance.ToString(CultureInfo.InvariantCulture)}"; | |
try | |
{ | |
SetOrRefreshHeaders(); | |
var json = CallGetString(query, true); | |
var routeCoordinates = DeserializeJson<RouteCoordinates[]>(json); | |
return routeCoordinates; | |
} | |
catch (Exception e) | |
{ | |
SomeLogger.AddErrLog($"GeoServer V3: failed to GetCoordinatesAlongRoute, query={BuildUri(query)} exp={e}"); | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment