Skip to content

The GeoJson structure breaks if the ring start label occurs several times #1086

@IKupriyanov-HORIS

Description

@IKupriyanov-HORIS

Note that [0, 0] appears twice in a row. Without this duplication, the geometry would be parsed correctly:

from lets_plot import *
import geopandas as gp

LetsPlot.setup_html()

d = gp.read_file("""
{"type":"MultiPolygon","coordinates":
    [
      [
        [
          [0,0], [0,0], [0, 5], [5, 5], [5, 0], [0, 0]
        ]
      ],
      [
        [
          [10, 10],[10, 20],[20, 20],[20, 10],[10, 10]
        ]
      ]
    ]
}""")

ggplot() + geom_polygon(map=d) + coord_fixed()

Actual:
image

Expected result:

d.plot()

image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions