/// <summary> /// Use this method to request details about a selected point /// </summary> /// <param name="dataSet"></param> /// <param name="username"></param> /// <param name="basicPoint"></param> /// <param name="pointsSource"></param> /// <returns></returns> public Point RequestPointDetails(string dataSet, string username, PointBase basicPoint, PointsSource pointsSource = PointsSource.Cassandra) { int dataSetID = this.userRepository.GetDatasetID(username, dataSet); if (dataSetID == -1) { throw new ApplicationException($"User do not have a dataset with name {dataSet}"); } //datasource can be switched between current dataPointsRepository and other repos IDataPointsRepository detailsSource = this.dataPointsRepository; switch (pointsSource) { case PointsSource.Geoserver: detailsSource = new PostgreSQLDataPointsRepository(); break; case PointsSource.Cassandra: default: break; } return(detailsSource.GetPointDetails(dataSetID, basicPoint)); }
public void CheckSelect() { PostgreSQLDataPointsRepository repo = new PostgreSQLDataPointsRepository(); repo.GetPointDetails(1, new Model.PointBase() { Latitude = 27.9386897m, Longitude = 45.3758754m }); }