MCPcopy Create free account
hub / github.com/PDAL/PDAL / getRing

Method getRing

pdal/Geometry.cpp:269–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269Geometry Geometry::getRing() const
270{
271 throwNoGeos();
272
273 int count = OGR_G_GetGeometryCount(gdal::toHandle(m_geom.get()));
274 if (count)
275 {
276
277 OGRGeometryH ring = OGR_G_Clone(OGR_G_GetGeometryRef(gdal::toHandle(m_geom.get()), 0));
278 OGRGeometryH linestring = OGR_G_ForceToLineString(ring);
279
280 return Geometry(linestring, getSpatialReference());
281 }
282 else
283 throwNoGeos();
284
285 return Geometry();
286
287}
288
289bool Geometry::valid() const
290{

Callers 1

readyMethod · 0.80

Calls 3

toHandleFunction · 0.85
GeometryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected