Boost logo

Geometry :

Subject: Re: [geometry] Running Geometry libs test suite.
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2018-10-24 19:43:44

On Wed, 24 Oct 2018 at 21:27, Nicolas Troncoso via Geometry
<geometry_at_[hidden]> wrote:
> On Wed, Oct 24, 2018 at 11:14 AM Adam Wulkiewicz via Geometry <geometry_at_[hidden]> wrote:
>> Nicolas Troncoso Via Geometry wrote:
>> I'm trying to run the Geometry libs tests suite to verify an invalid? geometry I have. I added it as an additional testcase (r34) but have failed to trigger the test suite. (I have never before used JamFiles)
>> As a background note: I'm testing in boost because Mysql 5.7 is declaring this geometry as invalid, and it defers the validation to the boost libs. I'm trying to track down what is exactly wrong with the geometry.
>> I attach the geometry in question if anyone is curious.
>> You have to setup Boost (bootstrap + b2 headers) and then run b2 passing the directory containing tests e.g. go to libs/geometry directory and run:
>> ../../b2 test
>> or
>> ../../b2 test/algorithms
>> [...]
>> But I'm curious, why not prepare a simple test file loading WKT with bg::read_wkt() and calling bg::is_valid() and run it by yourself with choosen compiler?
> I don't have anything setup for C++ so I though just minimally touching something that is working should serve my needs.

As I have already suggested on boost-testing, you need to present a
minimal C++ program that shows what you are actually trying,
plus what editing of Jamfile you have done, so we can correct it, and help you.

Boost.Geometry is a library, so you are assumed to be able to write a
simple C++ program, know how to compile it with compiler of your

> As it turns out I might need to get fancier. The main problem I have is that the MySQL 5.7 db complains that some Geometries are invalid and the MSSQL 2016 db goes along just fine. They are both supposed to be OGC complaint. So there is something very broken, or I'm breaking the geometries when reading them from the DB (I'm in a java shop and we are using JTS Topology by vividsolutions)
> I need to write something that tells me where the Geometry is broken so i can attempt to fix it.

It seems that DB-based approach may be easier for you than C++.

I'd rather use PostGIS to validate geometries, especially regarding
OGC compliance

AFAIK, in order to get MySQL with Boost.Geometry as computational
geometry engine,
you need 5.7.4 at least
However, AFAIK, for improved ST_IsValid and ST_Validate functions, you
need MySQL 8.x

Mateusz Loskot,

Geometry list run by mateusz at