linestring_type linestring_finish(std::size_t /* num_points */) { try { return linestring_type{m_geos_factory->createLineString(m_coordinate_sequence.release())}; } catch (const geos::util::GEOSException& e) { THROW(osmium::geos_geometry_error(e.what())); } }
linestring_type linestring_finish(size_t /* num_points */) { try { return linestring_type(m_geos_factory.createLineString(m_coordinate_sequence.release())); } catch (geos::util::GEOSException&) { THROW(osmium::geos_geometry_error()); } }
GeomPtr getGeometry(SegStrVct& vct) { GeomVct* lines = new GeomVct; for(SegStrVct::size_type i = 0, n = vct.size(); i < n; ++i) { SegmentString* ss = vct[i]; lines->push_back(gf_->createLineString(*(ss->getCoordinates()))); } return GeomPtr(gf_->createMultiLineString(lines)); }
test_linestring_data() : pm_(1000), factory_(&pm_, 0), reader_(&factory_), empty_line_(factory_.createLineString(new geos::geom::CoordinateArraySequence())) { assert(0 != empty_line_); }