Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8832557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:33:36+00:00 2026-06-14T08:33:36+00:00

I would like to use the boost::geometry::simplify method with OGRLineString s. While I am

  • 0

I would like to use the boost::geometry::simplify method with OGRLineStrings.
While I am able to register the OGRPointvia the macro:

BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(OGRPoint, double, cs::cartesian, OGRPoint::getX, OGRPoint::getY, OGRPoint::setX, OGRPoint::setY)

I am currently not able to use the following code:

#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/geometries/register/linestring.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/point_xy.hpp>

BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(OGRPoint, double, cs::cartesian, OGRPoint::getX, OGRPoint::getY, OGRPoint::setX, OGRPoint::setY)
BOOST_GEOMETRY_REGISTER_LINESTRING(OGRLineString)

void example()
{
  OGRLineString test;
  OGRLineString simplified;
  boost::geometry::simplify(test, simplified, 0.5);
}

The Simplyfy method doens’t compile and I get errors stating something about boost:mpl::eval_if_c which doesn’t help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:33:38+00:00Added an answer on June 14, 2026 at 8:33 am

    A Boost.Geometry linestring must fulfil the Boost.Range Concept. A std::vector would, for example, do. But an OGRLineString, out of the box,.

    First, there should be an iterator defined, walking over the points the OGRLineString contains. Using OGRLineString::getPoint(…) this should basically be possible.

    Second, if the iterator is implemented, which is probably the toughest part, OGRLineString should be adapted to Boost.Range, e.g. as described here.

    If that is done, Boost.Geometry should recognize the OGRLineString as a linestring and can read it.

    However, to write into an OGRLineString, an additional step should be done. It should be a “mutable range”. Because that is not (yet) defined in Boost.Range, it is until now a geometry-only thing and can be implemented by specializing three classes in the boost::geometry::traits namespace (clear, push_back and resize).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use boost/filesystem.hpp in my Qt app but the builder keeps
I would like to use the odeint module from the boost::sandbox but I am
I have recently started using boost::exception. Now I would like to use boost::errinfo_nested_exception to
I would like to use a boost::shared_ptr in order for WSACleanup() to be called
Why does socket_base not have a send() method? Basically, I would like to use
I have recently discovered the excellent library boost::accumulators, and I would like to use
I would like to use boost::program_options to create an executable which can be called
I would like to compile parallel.cu and python_wrapper.cpp where python_wrapper.cpp use Boost.python to expose
I am writing boot code where I would like to use only relative addressing
I have an array of Integers in Java, I would like use only a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.