aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/geo/polygon.cpp
diff options
context:
space:
mode:
authorvvvv <vvvv@ydb.tech>2023-07-31 20:07:26 +0300
committervvvv <vvvv@ydb.tech>2023-07-31 20:07:26 +0300
commitf9e4743508b7930e884714cc99985ac45f84ed98 (patch)
treea1290261a4915a6f607e110e2cc27aee4c205f85 /library/cpp/geo/polygon.cpp
parent5cf9beeab3ea847da0b6c414fcb5faa9cb041317 (diff)
downloadydb-f9e4743508b7930e884714cc99985ac45f84ed98.tar.gz
Use UDFs from YDB
Diffstat (limited to 'library/cpp/geo/polygon.cpp')
-rw-r--r--library/cpp/geo/polygon.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/library/cpp/geo/polygon.cpp b/library/cpp/geo/polygon.cpp
deleted file mode 100644
index 44e5c38b5f6..00000000000
--- a/library/cpp/geo/polygon.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "polygon.h"
-namespace NGeo {
- TMaybe<TGeoPolygon> TGeoPolygon::TryParse(TStringBuf s, TStringBuf llDelimiter, TStringBuf pointsDelimiter) {
- TVector<TGeoPoint> points;
-
- for (const auto& pointString : StringSplitter(s).SplitByString(pointsDelimiter).SkipEmpty()) {
- auto curPoint = TGeoPoint::TryParse(pointString.Token(), llDelimiter);
- if (!curPoint) {
- return {};
- }
- points.push_back(*curPoint);
- }
-
- if (points.size() < 3) {
- return {};
- }
-
- return TGeoPolygon(points);
- }
-
- TGeoPolygon TGeoPolygon::Parse(TStringBuf s, TStringBuf llDelimiter, TStringBuf pointsDelimiter) {
- auto res = TGeoPolygon::TryParse(s, llDelimiter, pointsDelimiter);
- if (!res) {
- ythrow yexception() << "Can't parse polygon from input string: " << s;
- }
- return *res;
- }
-} // namespace NGeo