Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Buffer with mitre join produces error: orientationIndex encountered NaN/Inf numbers #995

@dr-jts

Description

@dr-jts

The following test in GEOSBufferTest produces:

NOTICE: IllegalArgumentException: CGAlgorithmsDD::orientationIndex encountered NaN/Inf numbers
template<>
template<>
void object::test<25>
()
{
    geom1_ = GEOSGeomFromWKT("POLYGON ((4.6664239253667485 4.9470840685113275, 4.666423925366749 4.947084068511328, 3.569508914897422 -10.739531408188364, -9.082056557097435 19.893317266250286, 5.639581102785941 18.86388007810711, 4.6664239253667485 4.9470840685113275))");
    geom2_ = GEOSBufferWithStyle(geom1_, -1, 8,
                                 GEOSBUF_CAP_ROUND,
                                 GEOSBUF_JOIN_MITRE,
                                 5);
    wkt_ = GEOSGeomToWKT(geom2_);
    ensure_equals(std::string(wkt_), std::string("POLYGON ((3.668859875106924 5.016840542255452, 3.668859875106925 5.016840542255452, 2.8688758567150883 -6.423463915469626, -7.5416226086581215 18.783157733145195, 4.572260578781992 17.936072501591408, 3.668859875106924 5.016840542255452))"));
}

Original report: shapely/shapely#1921

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions