So they start?
Yeah.
Good.
Great.
Thanks a lot.
I'm a Syrian.
I've got a computer and a container of boost geometry.
And today I will present the library.
So the talk goes roughly this way.
I will give a brief introduction of what is boost geometry.
Then quickly go through the design.
Then I'll give some examples of how to use this library and end up with some spatial
computations.
Okay.
First of all, the boost geometry is an open source.
Library is part of boost plus plus libraries.
It's here there only.
It has a stable interface.
It supports a simpler plus 14 conditionally supports also newer standards.
But this is the main support.
The main simplest plus version that we support.
It builds on static ball morphism, metaprogramic and touch disposing to give some generosity
of the types.
I will explain this in the design of the library.
And basically has three parts, like primitives, geometries, algorithms that are spatial
index.
Okay.
And also it's standard conformant.
It follows the OTC, a simple fixture, a simple feature standard by OTC.
There is some documentation on the boost website.
We have a mailing list.
There's also the mailing list of the boost libraries that you can discuss topics of the
library and general topics of boost libraries.
It hosts it on a GitHub and there is a list of main code debutors.
Let's say the code debutors, but there are several others who also participated in some
GitHub of code some years ago.
So this is the basic shell award example of boost geometry.
So you can include the headers, it's yet around these Justin Biles.
And then there's a model of the points.
This is a two-dimensional point and there are three parts.
So this is a number type that you can use.
This is a dimension.
It's two-dimensional points.
And then the third part is the coordinate system.
So it can be Cartesian if you are using a projection or it can be a spherical or a geographical.
We combine this a bit later.
And then if let's say that you want to compute this, this is one of the most simplest
examples that you can do.
You create a point that it's longitude, latitude, let's say Athens.
And then you compute the distance from another point which is the coordinates of brassons.
And this gives you this number, you can compare it with what Google Maps gives you.
It's a bit different.
This has to do with the internal computations that they will show up in the presentation.
Why this is different?
OK, so what primitive boost geometry supports?
It supports the basic primitive stuff.
The standard is like we have points, multipoints, line strings, polygons, and they're
multivergons, so multipologons and you can have also a geometry collection.
So these are pretty basic.
And there is a list of algorithms that are implemented.
That ranges from area and lengths of geometries to separations.
And also some functions that help navigation like length, double lathe,
and these are some lardy.
This is part of the limitation, so you can browse it and see all the available algorithms.
And there's a number of applications, so it mainly designed for GIS,
but it's more general, so it can be used in robotics and CAD.
And also my skill is using it as a geometry engine.
OK, let me discuss a bit about the design of the library.
So there are three layers in the design.
There is an algorithms layer where there is the API.
This under this namespace.
There is also the spout layer where all the tagged spouting is done.
This is to, let's say, for the user perspective,
this is to, this is a way to provide the general listing.
And there's also the implementation layer.
Where are all the, in this namespace, where are all the implementation details are hidden.
OK, so mainly they are going to sing a boost geometry.
They are pretty functions, like the distance that showed you in the first slide.
So there is area buffer and all these algorithms takes one input with this or two inputs,
which are geometries.
And there is also an optional parameter with this strategy.
So this strategy tells you how to treat the geometries.
For example, if you have a distance of two geometries,
then the library will see what is the coordinate system of the geometries.
And they will, it will implement the right algorithm for them.
If the geometries are on the plane, the distance algorithms will just implement the Pythagorean theorem.
If the points have a coordinate system that is, let's say, on the ellipsoid,
there are more advanced algorithms will be, will run.
And this, the, the, the algorithms understand it.
So the user can just pass the geometries.
But if, if you want the user optionally can pass a different strategy,
if, if you want to choose a different algorithm, for example, for the ellipsoid.
Because of ellipsoid, there are many algorithms that you can use.
I will, I think it will become clear in the next slide.
So this is the input of the of our algorithms.
And the algorithms are independent of the geometry representation.
So you don't have different distance algorithms for different points on the, on the,
on the sphere or points on the, on the plane.
You have one distance algorithm for, for all the geometry types.
So it works across Cartesian spherical and geographic coordinate systems.
And okay, this is the internal implementation detail that this is implemented
or resolved by this part in the simplest lesson.
Okay, so strategies as I explained a bit before,
they encapsulate the mathematical models and the formulas.
So let's say that the algorithm is a group in a tutorial part.
And the strategy is the, let's say mathematical part.
Like you can, you can compute a convex file on the plane.
But then if you want to decide if a point is on one side of the other side
of a line, then this is the strategy.
This is the mathematical part that it's treated by, by the strategy.
For example, we have implemented a Vincendi and Doyer Thomas.
These are different formulas for geographic descent.
So this, this, and so on the ellipsis.
So the strategies as I explain can be explicitly used by the user,
like calling it together with the algorithm or they can be defaulted.
So the user can, if, if they won't, they cannot use any strategy.
And internally the library will select the right strategy for their problem.
According to the coordinate systems, not the use.
Okay, and also strategies can give you some,
I cured us in performance trade-off.
For example, you can use, for a complicated problem,
like a distance on the ellipsis, you can use different
strategies in that, implement an algorithm, for example,
that it's not very accurate, but very fast.
But then a user that needs more accuracy,
they can use the strategy in the same distance algorithm
that have more, maybe takes more time, but it's more accurate.
Okay, so a bit about targeting spathing.
There are tags for geometric strategies and coordinate systems.
The data tag, the tag types are available through metafunctions,
and we're dispatching according to geometry type,
coordinate system, which is Cartesian, geographic, et cetera,
dimension, because the algorithms that works in three dimensions,
and according to strategy.
And this provides a type safe and a static polymer
that it's, so all of them are dispatching on compile time.
So you don't have overhead in performance.
Okay, hopefully this gives a bit more intuition.
So let's say that you have a basic algorithm, distance.
This will take two geometries and compute the distance.
So this is the dispatching part.
So if you give two points, then the right implementation will,
in compile time, we'll go here and go to the implementation
of computing distance between two points.
Then there is another choice, if it will go and see if the points
are Cartesian on the plane or geographic,
and then it will choose the right implementation.
And then again, it will, on compile time,
it suits what is the right dimension.
So if you have the cbts of computing,
that this is between two points on the plane,
you will go this way.
And the labry will select the right implementation for your problem.
Okay, so now let's go, once the further and see how we can use it.
Okay, so this is typical with a simplest last template libraries.
You have a set of liaising.
So these are the main primitives.
So you define points that are, as we said before,
this is this is a point that it's in two dimensions.
It's used double and it's Cartesian.
Then you will use this type to define a line string polygon,
and then the polygon you will use it to define a multi-volgan.
So this is the main way that you define your primitives, your geometries.
And then you can construct them, and then you can import data.
So there is this function of reading the well-known text.
This is a standard way of importing data in GIS.
So this will read a line string polygon, a multi-volgan,
and ask from these stands to compute the distance between those geometries.
Okay, here there is no strategy.
I didn't, as a user, I'm not using any strategy.
So the library internally will use the right strategy for the right
coordinate system, and the right dimension.
So the user does the user just call distance with two attributes.
Okay, so this is a graphical view of this.
So this is the line string and we said what's the distance from this multi-volgan,
and this polygon, and this is the result.
Okay, so because it's general, the design can be used
to define your own types.
So you can create your own point, you must follow some concepts,
which let's say the point concept.
This is defined by some traits.
There is some, for usability, there are some markers that can define,
can generate your point, according to your struct.
So these are some, my simple point with two doubles,
can be read as a point that is usable for boost geometry,
and then I can create one point and one line string
by using a vector and just call the distance again,
and this will again work.
So this, and over here for all the algorithms, let's say that there are three main categories.
We have measure algorithms like computing distance, length, and these are the similarity
functions like Fresen, House of Distance.
There are some geometric that compute the convex scale of a set,
envelopes, bondic boxes, the buffer, and simplify.
And there is another big part, which is the relational set of operations,
that computes relational relation between,
let's say, if a polygon crosses and other polygon, things like that.
So everything is in the reference manual of the library.
I will just give one more example of measure functions.
So you can create a life and click this by pushing points
on this type, and then I will just call this functions to compute the length,
the area, and the perimeter, and this is the graphical,
and I can have my results here.
So everything up to here is Cartesian.
Okay, so the same we're going to do with topology.
Again, we define our geometry, and we can compute in the second and within.
So this example of a polygon and line strength that intersect,
but they're not within.
So you can do many examples like this.
And this is the last example before the spatial commutations.
It's about the vertex.
So there is an R3 implemented.
It has three different split ureistics.
Again, it's got to use some user-defined value,
and can do spatial and gain and quills.
So the R3, very, very broadly, it's a spatial structure
that's like a B3 for geometric data.
It looks like this.
I will not dip into the details.
Again, these are my types.
I have to create a box and the value.
And then I create my R3 with a value and to do the indexing.
So I will create some geometries and insert them to the bottom box
and insert them to my R3.
And then I create a query, which is another geometry.
I'm running this query on the R3.
And then I iterate over the results of my query and it's like this.
So these triangles, the orthogonal triangles are the data of my R query.
And then this is my query.
R3 will return, we'll not return those
triangles that are far away.
It will return those that the bottom box are in the exact.
And then I can iterate and check which of them are really
intersect my query.
So that's why the previous loop I will get
intersection of two triangles and then one of them is really intersecting.
So it's like filtering geometries that are far away.
OK.
And this is the last part that's more, I'm
thank to give some applications of first.
This is the idea of a coordinate system that
I've probably discussed it a bit before.
You can have a three different coordinate systems
and these are really meditating.
Usually you can have a flat surface.
You can have a sphere.
Or you can have the elephant of revolution.
This is the most accurate mode.
More takes more time to compute.
And this is how they will represent them in buzzometrics.
Like this is the Cartesian, the spherical
equatorial and the geographic that are parameterized by either the
grids or radians.
So I can use them now to my, to my distance example to see what
what's the difference.
So again, I will compute the distance between
Athens and Brussels.
But now I will get my specific strategy.
And this will change a bit result.
So if my strategy is spherical, I will get this number,
which is like Google Maps because in Google Maps,
they compute on the sphere.
But then if I compute if I use a different strategy,
like a geographic and doyer, I will get this result,
or this result, or this result.
So the difference are slides.
But if you have an application that it's more accurate,
it demands more accuracy, you may, you have to use
a Vincentian, there are some, and if you have long distances,
let's say your applications have a very long distances.
Then the less accurate functions, the less accurate strategies
will not work.
We'll give larger errors.
But this is not, I will not discuss more in this talk.
I will just want to focus on the part that you can use different strategies
to have a different angular axis.
OK, so then this is one thing that we
can do with the boost geometry.
This is transformation between coordinate systems.
So let's say that you have points on the air surface,
given by GPS, and you want to map them on a map,
to visualize them on a map.
Since they are long-adliked, you cannot do it.
So you have to project.
Let's say that we are in British National Agreed,
and we have a map, and then using boost geometry,
we can project this GPS points on our grid.
So there's a function transformations that takes you
from this coordinate system to that coordinate system.
So this is the GPS, and this is the our map.
You just define this, and you call it with your points.
So in this example, I will use London in GPS coordinates.
I long-adliked it, and I just call it like this,
and I compute the point on my map.
So if the implementation here, it uses,
actually, ring glimates a big part of a approach for it.
And my project got, and it's finally out of those.
So then I can draw, for example, I'm using QGIS to draw this.
I can draw GPS points using boot geometry on this map.
So this is the transformation function.
And this is my last example, how to run a last project
that is using boot geometry.
So this is more or less this phrase, and how to do similar functions.
Let's say that you have a GPS track, and you have many tracks in GPS.
And you want to see how close are those tracks?
How similar are they?
And so using boot geometry, you can do it without projecting,
because all the algorithms are implemented for all the coordinate systems.
So you can have a similarity distance function that takes points
that are longer to latitude.
In the previous application, we had to project,
because we wanted to draw in a map.
But now, since we only want similarity of trajectories,
you can do it also with a geography coordinate.
And this is nice, because you don't have to project.
You can also use as a preprocessor here,
simplify algorithm for the R3.
I will skip it for the example.
And this is the code.
You have line strings with your GPS data.
And this is the function that you need.
You compute the phrase that distance between your trajectory.
Let's say this is your trajectory that you want to find similar trajectory.
Your query trajectory, the black one.
And these are the input trajectories of some workers on a park.
And using phrase that distance, you
will compute some values that gives you the similarity of those
trajectories with your query trajectory.
For example, here, let's say that the blue and the orange
are more similar than the green one, let's say, or the red one.
It gives you some similarity between those objects.
OK, and that's it more or less.
There's some future topics.
There is some 3D support, polyheter self-face.
This is in the last two releases.
There is the definition of polyheter self-face
and some validation algorithms.
This is, let's say, limit the support for now.
There is also some interest to support cave geometries.
And there is a standard interest of improving robustness
to have, because in geometric, logic points
can be very nasty, but this is a total different topic.
And we'd like to integrate newer standards in the boost geometry.
And I think that's it.
So thanks.
Thank you.
Any questions?
No, no, it says, OK, are there any plot for the limitations?
So this is in boosted plus plus libraries.
These are tested.
There are some regression tests on the page of boosted.
There are tested in many platforms, many different textures
and different compilers.
And it builds on, you can see the test.
It builds in, you have different results in some cases,
some flotic point issues, but it builds on.
And there are 800 while the wide lower is required for this support.
No.
Are there any other libraries that are needed for boosted geometry?
So there are some dependencies, internal dependencies,
in boosted plus plus libraries.
So boosted geometry is using some boost libraries,
but it's very typical in many applications
to just take the whole boost and build your application.
But you can just take boosted geometry
and the dependencies and build it.
The transformation that you mentioned between the different geocordinant systems,
you also mentioned this brush for, is this code entirely
in boost as well, or do you have a still dependency on brush for?
There is no dependency on brush for, it's
really mandated and executed inside boost geometry.
Can you discuss error messages and build times?
I don't mess up this.
Yeah, compiler error messages.
If I mess up, I don't know what type or something
to use, c++ concepts to get these internal messages,
or yes, boost geometry is using concept.
They're not using the simplest plus point concepts.
There are some concepts, let's say, a home brew.
There is some error messages in compile time,
because most of the parties tend late.
It's possible to also see a huge error with a lot of templates
that you know that are standard.
But we try to give some intuition about what's the, what's
there about, what about build times?
So it's a header on library, so it depends on the application.
So if you see the regression test,
there are some times there in a boost website.
Otherwise, since it's not an application,
I cannot say about the build times.
You can, okay, it's here, there are only
and there are some opportunities.
So what do you mean about build times?
I mean, can you clarify a bit?
Yeah, no, just sometimes with the template heavy libraries,
when you include a single header, then they build time
of a single translation and you need to explode,
and I just want to know if that's the case,
or even your small example is like,
is something usually, is just something used.
Yes, those examples are very simple.
There, you will not notice a huge big time, build time.
But let's say if you build my school,
you will see a big part will be combining a boost geometry.
Yeah, hello.
Back to 2018, I compared boost geometry,
C-Gell, geometry tools, libraries, and I found that,
yeah, boost geometry has a very nice interface
and most convenient to follow this library,
this is my personal opinion, but still,
nevertheless, I had to choose another library
because a lot of, let's say, bugs,
by the behavior and boost geometry, and of the eight years,
how was it involved?
Is it better now and did you fix a lot of bugs recently?
Yes, so the question is about bugs
in boost geometry and how they evolve and fix them.
Okay, so I would say the most, yes,
so bugs are issued in GitHub issues.
There is relatively, let's say,
good tracking and they're,
we try to solve most of them.
I would say the most difficult ones
are regarding robustness.
So in geometry, if you, I mentioned it before
in the talk, in geometry, if you want to,
you may have floating point these use
that become errors that are combinatorial errors,
you take it, you consider total different structure
if you have a floating point.
So this is fixed in three or four releases,
I go, part, part, I'll fix in predicate.
So the set operations now, if you're answer,
if you're asking something as a yes or no,
this is much more robust now
because we integrated the robust,
the filtering predicate, which is always correct.
We throw away some all the tricks with floating points.
So this is fixed.
Something that it's missing that is more
difficult to say needs more work
is the robustness of intersections.
So if you want to construct something,
then you have to be robust also.
So this needs more also,
segal, solving it by have some kernels
that takes more time,
but if you select the right kernel,
you can have a robust intersection.
So in geometry right now, some bugs are related to this.
Many of them are only floating point issues
that we fix them, but maybe there are some,
some of them are more deep.
But there are a lot of bugs that are simpler
and we just fix them.
Hey, thank you very much.
My question is about the strategies
as I'm not very familiar with those,
what is the difference between them?
Excuse me, about there.
The difference strategies.
Ah, the strategies.
Okay, so the strategies,
let's say that they select a coordinate specific
method for your algorithm.
Let's say if you want to compute the distance between two points
on the, on the, just on this table,
it's a Pythagorean theorem, it's just one line.
If you want to compute it on a sphere,
then it's that some sign cosine functions,
it's the gonometric again one line.
If you want to compute on the ellipsoid,
then you have to do some Newton method.
It's a larger function, it's a 20 lines of code.
So you have, and also it's a letter of method.
So depending on the coordinate systems that you are,
you have also different methods underlying.
So if you are, let's say on ellipsoid
and you compute a convex hull,
or let's say the freezer distance,
how close are two trajectors.
If you do it on the ellipsoid,
then at every step, the freezer algorithm
with a combinatorial, at every step,
they try to compute the distance between two points
on the ellipsoid.
So it calls a Newton method.
The same algorithm on the plane,
it will just go the Pythagorean, you know,
where, 10 operations.
And is it related to different uses?
Like for example, you talked earlier about autonomous
it depends on the application.
So if your application is working on a projection,
so you have points on some project with our Cartesian,
then you just use the Cartesian algorithms.
If your application is on the sphere
and you don't want to do some projection,
for example, if you want to compute
the distances on the, on Europe,
then as far as I know,
you cannot project on every single part of Europe
and then do Cartesian there.
So you have to do something with a spherical or ellipsoid.
So you have to do with the application.
Last part of the question,
are you aware of some real-time applications
that use put geometry library?
About what applications?
Real-time applications like, for example,
autonomous driving apps applications.
I don't know.
OK.
I don't know.
Thank you.
That's it.
I think we're out of time for questions.
Sorry to anyone else had a question.
Next talk in five minutes.
A very quick question.
Is.
Thank you.
Here's the next speaker here.