| 727 | } |
| 728 | |
| 729 | bool FeatureBuilder::IsValid() const |
| 730 | { |
| 731 | if (!GetParams().IsValid()) |
| 732 | return false; |
| 733 | |
| 734 | auto const & geom = GetGeometry(); |
| 735 | if (IsLine() && (geom.empty() || GetOuterGeometry().size() < 2)) |
| 736 | return false; |
| 737 | |
| 738 | if (IsArea()) |
| 739 | { |
| 740 | if (geom.empty()) |
| 741 | return false; |
| 742 | |
| 743 | for (auto const & points : geom) |
| 744 | if (points.size() < 3) |
| 745 | return false; |
| 746 | } |
| 747 | |
| 748 | return true; |
| 749 | } |
| 750 | |
| 751 | std::string DebugPrint(FeatureBuilder const & fb) |
| 752 | { |