Skip to content

a strange bug of polygon intersection #630

@chunxinxie

Description

@chunxinxie

I encountered a very strange bug when using github.com/peterstace/simplefeatures/geom :
there are two polygons: the small polygon is inside the the large polygon,
but the result of their intersection (Geometry.Intersection) is the large one.

Can you take a look if there is a bug? Thanks!

small one's geojson:
{
"coordinates": [
[
[
112.409282,
34.638641
],
[
112.409268,
34.638646
],
[
112.40926,
34.638642
],
[
112.409252,
34.638642
],
[
112.408256,
34.63827
],
[
112.408249,
34.638271
],
[
112.408247,
34.638254
],
[
112.408246,
34.638259
],
[
112.408248,
34.638249
],
[
112.408352,
34.638021
],
[
112.408362,
34.638014
],
[
112.408362,
34.638011
],
[
112.408375,
34.638008
],
[
112.408376,
34.63801
],
[
112.409396,
34.638386
],
[
112.409402,
34.638393
],
[
112.409411,
34.638395
],
[
112.409404,
34.638407
],
[
112.409288,
34.638638
],
[
112.409282,
34.638641
]
]
],
"type": "Polygon"
}

the large one's geojson:
{
"coordinates": [
[
[
112.3681640625,
34.6728515625
],
[
112.3681640625,
34.62890625
],
[
112.412109375,
34.62890625
],
[
112.412109375,
34.6728515625
],
[
112.3681640625,
34.6728515625
]
]
],
"type": "Polygon"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions