• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Fields2Cover / Fields2Cover / 20856591435

09 Jan 2026 03:22PM UTC coverage: 84.057% (-1.7%) from 85.73%
20856591435

push

github

web-flow
Fix docs (#215)

* Ignore google test templates in the docs

* Include gtest_main

* Exclude symlinks

* Exclude googletest from documentation

1274 of 1519 branches covered (83.87%)

2362 of 2810 relevant lines covered (84.06%)

8860.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/include/fields2cover/types/MultiLineString.h
1
//=============================================================================
2
//    Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3
//                     Author: Gonzalo Mier
4
//                        BSD-3 License
5
//=============================================================================
6

7
#pragma once
8
#ifndef FIELDS2COVER_TYPES_MULTILINESTRING_H_
9
#define FIELDS2COVER_TYPES_MULTILINESTRING_H_
10

11
#include <gdal/ogr_geometry.h>
12
#include <utility>
13
#include "fields2cover/types/Geometries.h"
14
#include "fields2cover/types/LineString.h"
15

16
namespace f2c::types {
17

18
struct MultiLineString :
19
    public Geometries<MultiLineString, OGRMultiLineString,
20
            wkbMultiLineString, LineString> {
21
 public:
22
  using Geometries<MultiLineString, OGRMultiLineString,
23
            wkbMultiLineString, LineString>::Geometries;
24
  MultiLineString();
25
  explicit MultiLineString(const OGRGeometry* geom);
26
  explicit MultiLineString(const LineString& line);
27
  explicit MultiLineString(const std::initializer_list<LineString>& ls);
28

29
  size_t size() const;
30

31
  double length() const;
32

33
  void operator*=(double b);
34

35
  void getGeometry(size_t i, LineString& line);
36

37
  void getGeometry(size_t i, LineString& line) const;
38

39
  LineString getGeometry(size_t i);
40

41
  const LineString getGeometry(size_t i) const;
42

43
  void setGeometry(size_t i, const LineString& line);
44

45
  void append(const OGRGeometry* geom);
46

47
  void addGeometry(const LineString& line);
48
  void addGeometry(const MultiLineString& lines);
49

50
  static MultiLineString getLineSegments(const LineString& line);
51
  static MultiLineString getLineSegments(const LinearRing& line);
52

53
  template <class T, OGRwkbGeometryType R>
54
  MultiLineString intersection(const Geometry<T, R>& g) const;
55

56
  template <class T, OGRwkbGeometryType R>
57
  static MultiLineString intersection(
58
      const LineString& line, const Geometry<T, R>& g);
59
};
60

61

62
template <class T, OGRwkbGeometryType R>
63
MultiLineString MultiLineString::intersection(const Geometry<T, R>& g) const {
64
  auto inter = this->data_->Intersection(g.get());
261✔
65
  f2c::types::MultiLineString lines(inter);
261✔
66
  OGRGeometryFactory::destroyGeometry(inter);
261✔
67
  return lines;
261✔
68
}
×
69

70

71
template <class T, OGRwkbGeometryType R>
72
MultiLineString MultiLineString::intersection(
73
    const LineString& line, const Geometry<T, R>& g) {
74
  auto inter = line->Intersection(g.get());
×
75
  f2c::types::MultiLineString lines(inter);
×
76
  OGRGeometryFactory::destroyGeometry(inter);
×
77
  return lines;
×
78
}
×
79

80

81
}  // namespace f2c::types
82

83
#endif  // FIELDS2COVER_TYPES_MULTILINESTRING_H_
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc