Skip to content

[6.0.0] With a GeoJSON of type "MultiPolygon", the chart "Deck.gl Polygon" displays only the first geometry #38660

Closed

Description

@herve-lg

Bug description

Many statistical entities are polygons composed of several parts, called in the GeoJSON jargon: "Multipolygon".

However, the "Deck.gl Polygon" chart is unable to fully display these geometries.

Here is for example the GeoJSON geometry of France:

{"type": "Feature", "properties": {}, "geometry": {"type": "MultiPolygon", "coordinates": [[[[8.559580925000091,42.153998114000046],[8.709157748000052,42.57916901200008],[9.292165561000047,42.67475006700005],[9.346690300000091,43.00372955900008],[9.464040561000047,42.99005768400008],[9.559580925000091,42.146551825000074],[9.223155144000089,41.37250397300005],[8.797211134000065,41.557074286000045],[8.922699415000068,41.694647528000075],[8.655121290000068,41.74990469000005],[8.805430535000085,41.90692780200004],[8.586273634000065,41.96898021000004],[8.744965040000068,42.05658600500004],[8.559580925000091,42.153998114000046]]],[[[6.577716919000068,49.35579986600008],[6.713780965000126,49.158860982000064],[7.410482625000043,49.1689378870001],[8.200305216000032,48.95856313100005],[7.810251506000071,48.6150182090001],[7.581976474333016,48.12135305932073],[7.586028488000125,47.584618544000065],[7.406348511000118,47.43824249300006],[6.973300008000137,47.48909210300009],[6.866639852000077,47.35416493700002],[7.036551961000043,47.329515279000034],[6.442634725000062,46.94416412400004],[5.958529907000127,46.21196075400009],[6.140327596000134,46.15020741800002],[6.482942342000115,46.448587138000065],[6.787058146000049,46.41417063500002],[6.765664103000034,46.151602681000085],[7.022082560000115,45.925259909],[6.783868043959269,45.76499475113478],[7.160678752000081,45.41092437800005],[7.055465536000071,45.21367543600003],[6.602728312000067,45.1034496060001],[7.004925985000057,44.827962545000034],[6.866123088000052,44.37212473600009],[7.689948771000076,44.06733713800007],[7.476410352000073,43.76463450700004],[6.731146285000079,43.407846721000055],[6.590891640000052,43.26889795100004],[6.679800772000078,43.20155281400008],[6.180072448000089,43.035922138000046],[5.034022073000074,43.335476431000075],[5.22632897200009,43.48029205900008],[5.029144727000073,43.558579820000034],[4.855778264000094,43.341779141000075],[4.694590691000087,43.57908763200004],[4.820279138000046,43.34635571600006],[3.952972852000073,43.539943752000056],[3.114024285000085,43.106309312000064],[3.037608269000089,42.68321360900006],[3.181569858000046,42.43508535400008],[2.514812459000069,42.32566050300004],[2.009210245000077,42.34708038300006],[1.721992635000049,42.60985504200006],[0.706757446000097,42.84658477900008],[0.656734660000097,42.6879898080001],[-0.038933471999911,42.68514760400002],[-1.286040811999953,43.109178569000036],[-1.457141478999858,43.04507395500012],[-1.403501342999959,43.243330587000074],[-1.747356322999906,43.29100209600004],[-1.794074744885912,43.38601533206285],[-1.47687740799995,43.580064195000034],[-1.257232225999928,44.55605703300006],[-1.044748501999948,44.66941966400009],[-1.172230597999942,44.77826569200005],[-1.260365363999938,44.62742747600004],[-1.099598761999914,45.55353424700007],[-0.766184048999946,45.32607656500005],[-0.715972459999932,45.13450755400004],[-0.534657355999911,44.894964911000045],[-0.596180792999917,45.024644273000035],[-0.493763800999943,44.99799225500004],[-0.841786261999914,45.514553127000056],[-1.247303839999915,45.70990631700005],[-0.987172003999945,45.71735260600008],[-1.151722785999937,45.86815013200004],[-1.119189720473402,46.3110109635433],[-1.795399542999917,46.49453359600005],[-2.118763800999943,46.819973049000055],[-1.990715865444827,47.035387307778024],[-2.241118943999936,47.14248281500005],[-2.151682094999956,47.27968984600005],[-1.727040167999917,47.21076080900008],[-2.010121222999942,47.31972890800006],[-2.278391079999949,47.24640534100007],[-2.541981574999909,47.300116278000075],[-2.391835089999915,47.42365143400008],[-2.494740363999938,47.49119700700004],[-2.36392167899993,47.50617096600007],[-2.817128058999913,47.499212958000044],[-2.909250454999949,47.55841705900008],[-2.741444464999915,47.55133698100008],[-2.683990037999934,47.62299225500004],[-2.706532355999911,47.64272695500006],[-2.967193162999934,47.66380442900004],[-3.131703253999945,47.478216864000046],[-3.118031378999945,47.732123114000046],[-3.224191860999952,47.65639883000006],[-3.358265753999945,47.697333075000074],[-3.282622850999928,47.78733958500004],[-3.460682745999918,47.70758698100008],[-4.132191535999937,47.923895575000074],[-4.371815558999913,47.80719635600008],[-4.434641079999949,47.97565338700008],[-4.728138800999943,48.04059479400007],[-4.28538977799991,48.11538320500006],[-4.557484503999945,48.17719147300005],[-4.546701626999948,48.34682851800005],[-4.515533006999931,48.29584381700005],[-4.187489386999914,48.307521877000056],[-4.453724738999938,48.33539459800005],[-4.289906378999945,48.43158600500004],[-4.599354620999918,48.35016510600008],[-4.783355272999927,48.37641022300005],[-4.563628709999932,48.62962474200003],[-3.973988410999937,48.73281484600005],[-3.851714647999927,48.62962474200003],[-3.213612433999913,48.86981842700004],[-2.682362433999913,48.509019273000035],[-2.316070115999935,48.698553778000075],[-1.980295376999948,48.51357656500005],[-1.976958787999934,48.691107489000046],[-1.356556769999941,48.64325592700004],[-1.553618943999936,48.74713776200008],[-1.548410610999952,49.225490627000056],[-1.816477016999954,49.38373444200005],[-1.935210740999935,49.72410716400009],[-1.263050910999937,49.69550202000005],[-1.118763772743309,49.34620165683242],[-0.219471808999913,49.28009674700007],[0.411306186000047,49.452053127000056],[0.075368686000047,49.52407461100006],[0.235850457000083,49.72931549700007],[1.672536655000044,50.19253164300005],[1.541514519000089,50.27789948100008],[1.653712984566596,50.339042218823295],[1.580577019000089,50.868801174000055],[2.521799927545686,51.08754088371883],[2.768233683000119,50.733235169000054],[3.129245239000085,50.7790721650001],[3.27104537000011,50.5269428510001],[3.608285766000051,50.47650665300007],[3.696859172000131,50.298222962000054],[4.197603800000081,50.25848378500005],[4.135735555765922,49.97399301544438],[4.645845174000073,49.9844953420001],[4.815550578000085,50.16133209200005],[4.849036906000066,49.7941710410001],[5.456131633000041,49.49894358400009],[6.577716919000068,49.35579986600008]],[[-2.442054612099323,47.46161466559271],[-2.345739072999834,47.45948156192452],[-2.433102356988172,47.465831659603396],[-2.442054612099323,47.46161466559271]]]]}}

This GeoJSON displays perfectly in any GIS or library displaying interactive maps.

Image

This one is a MultiPolygon whose coordinates are divided into 2 parts. The 1st part takes up the geometry of Corsica:

[[[8.559580925000091,42.153998114000046],[8.709157748000052,42.57916901200008],[9.292165561000047,42.67475006700005],[9.346690300000091,43.00372955900008],[9.464040561000047,42.99005768400008],[9.559580925000091,42.146551825000074],[9.223155144000089,41.37250397300005],[8.797211134000065,41.557074286000045],[8.922699415000068,41.694647528000075],[8.655121290000068,41.74990469000005],[8.805430535000085,41.90692780200004],[8.586273634000065,41.96898021000004],[8.744965040000068,42.05658600500004],[8.559580925000091,42.153998114000046]]]

The second part, takes up the geometry of continental France:

[[[6.577716919000068,49.35579986600008], ... [-2.442054612099323,47.46161466559271]]]

However, Deck.gl Polygon is unable to read this GeoJSON correctly and stops after reading the first geometry.

In this example, it stops after reading Corsica and therefore does not display continental France.

Image

To display France correctly, currently, I have to split my 'MultiPolygon' into 2 'Polygons', which duplicates my rows in my tables and creates errors when I calculate metrics on my columns.

Would it be possible for Deck.gl Polygon to display the MultiPolygons correctly?

(It should be noted that the chart 'Country Map' and 'World Map' display GeoJSON MultiPolygon.)

Screenshots/recordings

No response

Superset version

6.0.0

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Activity

  1. dosubot commented on Mar 15, 2026

    @dosubot

    This is a confirmed bug tracked in issue #32127. The root cause is in getPointsFromPolygon.ts, which only extracts coordinates[0] from GeoJSON polygons—meaning for MultiPolygon types, only the first polygon's outer ring is rendered.

    This is a Superset implementation limitation, not a deck.gl library issue. A maintainer has acknowledged it and mentioned plans to fix it as part of a deck.gl chart refactor, but it remains unresolved.

    Workarounds:

    • GeoJSON layer: Displays all polygons correctly, but lacks metric-based fill for choropleth visualization
    • Split MultiPolygons into separate Polygon rows: As you've noted, this creates data duplication issues

    Note: PR #38595 (merged March 13, 2026) improved nested GeoJSON parsing but did not address MultiPolygon support.

    You may want to subscribe to #32127 to track progress on the fix.

    To reply, just mention @dosu.


    How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

    Chat with Dosu Open in Cursor Join Discord Share on X

  2. birkskyum commented on Mar 16, 2026

    @birkskyum
    Contributor

    @SupersetOdT have you tried using the deckgl geojsonlayer for this?

  3. herve-lg commented on Mar 16, 2026

    @herve-lg
    Author

    @birkskyum

    Yes, all the geometries of a MultiPolygon are displayed with the GeoJSON Deck.gl chart. On the other hand, I cannot make a choropleth map in this chart.

    Deck.gl GeoJSON code could provide a basis to improve Deck.gl Polygon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions