You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "xavier-GitHub76 (via GitHub)" <gi...@apache.org> on 2025/02/04 08:03:18 UTC
[I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
xavier-GitHub76 opened a new issue, #32127:
URL: https://github.com/apache/superset/issues/32127
### Bug description
Hello,
I build a dataset with polygons (GeoJSON) but multiple polygons are not visible on Deck.gl.Polygon chart.
I reduce the dataset, it has only 2 departements :
- 'Deux-Sèvre' (build with a unique polygon)
- 'Charente-Maritime' (build with a multipolygon)
The unique polygon is visible but
only one of multiples polygons is visible.


All polygons are visible with https://mapshaper.org
but not with Superset
Dataset is built with insert_DEPARTEMENT_(genereted).sql from DEPARTEMENT.json
[insert_DEPARTEMENT_(genereted).zip](https://github.com/user-attachments/files/18653705/insert_DEPARTEMENT_.genereted.zip)
[DEPARTEMENT.json](https://github.com/user-attachments/files/18653692/DEPARTEMENT.json)

Regards
### Screenshots/recordings
_No response_
### Superset version
4.0.2
### Python version
3.9
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-4700079423
Thanks @qleroy — that nails it: the Polygon layer truncates a MultiPolygon to its first ring in transformProps.ts. @DamianPendrak, is this still on your radar for the deck.gl refactor? Seems like we'd either need to expand MultiPolygons into multiple polygons or offer a GeoJSON encoding option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "muthubuntu (via GitHub)" <gi...@apache.org>.
muthubuntu commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-4709898758
I have been using a method to use ST_Dump(multipolygon_geom) as taken from this post: https://stackoverflow.com/a/64783553
Basically:
**SINGLEPART** GEOM
```
SELECT *, json_build_object(
'type', 'Polygon',
'geometry', ST_AsGeoJSON(geom)::json)::text as geoJSON
FROM <my-schema>.<my-table>;
```
**MULTIPART / MULTIPOLYGONS** (will this also work for multilines and multipoints?)
```
SELECT *, json_build_object(
'type', 'Polygon',
'geometry', ST_AsGeoJSON((ST_DUMP(geom)).geom::geometry(Polygon, 27700))::json)::text as geoJSON
FROM <my-schema>.<my-table>;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "xavier-GitHub76 (via GitHub)" <gi...@apache.org>.
xavier-GitHub76 commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-2841516815
For my part, I avoid the problem by playing with the precision of the map (with https://mapshaper.org) so that the smallest areas are erased.
It's not a good solution
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "qleroy (via GitHub)" <gi...@apache.org>.
qleroy commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3415763947
@xavier-GitHub76
The Polygon layer does NOT support Multipolygon or if it is it only takes the first one in the list.
It expects only one Polygon https://deck.gl/docs/api-reference/layers/polygon-layer
A MultiPolygon is truncated to the first Polygon right here https://github.com/apache/superset/blob/de5ca7980563851aabb953d0cbd05d527ce41cbb/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/transformProps.ts#L90
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "DamianPendrak (via GitHub)" <gi...@apache.org>.
DamianPendrak commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-4757254293
It was fixed in #40100
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-2633179079
<!-- Answer -->
I found a similar unsolved discussion that might be relevant to your issue: [Insert a Multipolygon into a Deck.gl Polygon chart](https://github.com/apache/superset/discussions/31405), which was last updated on December 11, 2024 <sup>[[1]](https://github.com/apache/superset/discussions/31405)</sup>.
For your specific issue with multipolygon visibility in Superset, here are a few steps you can take to troubleshoot:
1. **Check GeoJSON Format**: Ensure that the GeoJSON for the multipolygon is correctly formatted. Each polygon in a multipolygon should be an array of linear rings, where the first ring is the outer boundary and any subsequent rings are holes.
2. **Superset Configuration**: Verify the configuration options in Superset's Deck.gl Polygon layer. Make sure that the "Polygon Column" and "Polygon Encoding" settings are correctly set to handle multipolygon data <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/controlPanel.ts)</sup>.
3. **Simplification and Export**: If you are using Mapshaper to simplify the polygons before importing them into Superset, ensure that the simplification process is not removing small features that are necessary for the multipolygon to render correctly.
4. **Logs and Errors**: Check Superset's logs for any error messages that might indicate issues with rendering the multipolygon data.
These steps should help you identify and resolve the visibility issue with your multipolygon data in Superset.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/adce41bb-a31c-43e3-bc69-33679c777e3d?feedback_type=other)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "qleroy (via GitHub)" <gi...@apache.org>.
qleroy commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3415755797
@DamianPendrak
The deck.gl Polygon layer works just fine for me on master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3271584170
Maybe @DamianPendrak can take a look?
Curious if this is indeed still happening on `master` but I would assume so.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "DamianPendrak (via GitHub)" <gi...@apache.org>.
DamianPendrak commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3307083632
@rusackas It looks like it got worse - no polygons appeared for me when I tried to replicate this on master. I will try to fix that along with the refactor of deck.gl charts from legacy API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "DamianPendrak (via GitHub)" <gi...@apache.org>.
DamianPendrak commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3328124312
@rusackas, I've checked again, and it looks like it no longer supports GeoJSON. The JSON polygon encoding expects an array of points for one polygon. Not sure if this is expected behavior, but it looks logical to me. If GeoJSON should be supported, it should probably be an additional option in the polygon encoding control.
<img width="2036" height="1016" alt="Image" src="https://github.com/user-attachments/assets/57549e61-9eb0-4ad7-b9ec-2a5ac545028d" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "paridbushati (via GitHub)" <gi...@apache.org>.
paridbushati commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-2820366074
I have the same problem where only one polygon is visible and still haven't found a solution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "qleroy (via GitHub)" <gi...@apache.org>.
qleroy commented on issue #32127:
URL: https://github.com/apache/superset/issues/32127#issuecomment-3415769601
The GeoJson layer does display all Polygons but is not of much use for a choropleth map => cannot fill a polygon with a metric.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] [Deck.gl.Polygon] MultiplePolygon are not visible [superset]
Posted by "DamianPendrak (via GitHub)" <gi...@apache.org>.
DamianPendrak closed issue #32127: [Deck.gl.Polygon] MultiplePolygon are not visible
URL: https://github.com/apache/superset/issues/32127
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org