File: main.cpp

package info (click to toggle)
sfcgal 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,348 kB
  • sloc: cpp: 44,959; sh: 198; makefile: 33; ansic: 24; python: 23
file content (25 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) 2012-2013, IGN France.
// Copyright (c) 2012-2024, Oslandia.
// Copyright (c) 2024-2025, SFCGAL team.
// SPDX-License-Identifier: LGPL-2.0-or-later

#include "SFCGAL/MultiPolygon.h"

#include "SFCGAL/algorithm/offset.h"
#include "SFCGAL/io/wkt.h"

using namespace SFCGAL;

int
main()
{
  std::unique_ptr<Geometry> g(
      io::readWkt("MULTIPOINT (0 0,5 6,3 2,7 1,4 1,3 5,2 9)"));

  for (size_t i = 1; i <= 50; i++) {
    std::unique_ptr<Geometry> buffer(algorithm::offset(*g, 0.2 * i));
    std::cout << buffer->asText(5) << std::endl;
  }

  return 0;
}