You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/11/09 21:58:40 UTC
[GitHub] [incubator-superset] songololo opened a new issue #11625: Please provide documentation for deckgl charts
songololo opened a new issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625
It is difficult to find any meaningful information about the deckgl charts.
Would it please be possible to add at least rudimentary documentation providing a brief overview of the accepted geospatial formats (e.g. GeoJSON) and any requirements such as coordinate reference system (e.g. epsg 4326?), geometry types (e.g. do Multipolygons work or only Polygons?) etc.
Thanks.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] songololo edited a comment on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
songololo edited a comment on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724658659
@srinify @mistercrunch @junlincc
I'm able to get it working for point data (e.g. GeoJSON in EPSG 4326 CRS) but not for Polygon data:
Here are some examples that should be fairly easy to reproduce. These make use of the SQL editor and I'm using the amancevice docker container (v0.37.2).
Running a query to create a rectangular polygon (using PostGIS):
`SELECT 1 as mock_data, ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326) as geom;`
Gives a jagged polygon (instead of rectangular):
<img width="1585" alt="Screen Shot 2020-11-10 at 11 40 31" src="https://user-images.githubusercontent.com/4347878/98671432-26c71500-234c-11eb-946c-ee6811b121ed.png">
Similarly, when casting the geometry to Well Known Text format:
`SELECT 1 as mock_data, ST_AsText(ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326)) as geom;`
<img width="1589" alt="Screen Shot 2020-11-10 at 11 46 36" src="https://user-images.githubusercontent.com/4347878/98671479-3cd4d580-234c-11eb-82d8-21590a117656.png">
And with GeoJSON it displays nothing:
`SELECT 1 as mock_data, ST_AsGeoJSON(ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326)) as geom;`
<img width="1585" alt="Screen Shot 2020-11-10 at 11 49 50" src="https://user-images.githubusercontent.com/4347878/98671551-5aa23a80-234c-11eb-838c-41b7420c4c04.png">
Any information or advice on how to display a polygon would be much appreciated.
Thanks.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] mistercrunch commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-725683406
Yes, I can confirm that we're expecting a geo json object as text. We could do more magic to understand the Postgres/postGIS geoJSON type and convert it accordingly, but it gets tricky for us to support special types that are database specific.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724302778
Issue-Label Bot is automatically applying the label `#enhancement` to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] songololo commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
songololo commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724658659
@srinify @mistercrunch @junlincc
Here are some examples that should be fairly easy to reproduce. These make use of the SQL editor and I'm using the amancevice docker container (v0.37.2).
Running a query to create a rectangular polygon (using PostGIS):
`SELECT 1 as mock_data, ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326) as geom;`
Gives a jagged polygon (instead of rectangular):
<img width="1585" alt="Screen Shot 2020-11-10 at 11 40 31" src="https://user-images.githubusercontent.com/4347878/98671432-26c71500-234c-11eb-946c-ee6811b121ed.png">
Similarly, when casting the geometry to Well Known Text format:
`SELECT 1 as mock_data, ST_AsText(ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326)) as geom;`
<img width="1589" alt="Screen Shot 2020-11-10 at 11 46 36" src="https://user-images.githubusercontent.com/4347878/98671479-3cd4d580-234c-11eb-82d8-21590a117656.png">
And with GeoJSON it displays nothing:
`SELECT 1 as mock_data, ST_AsGeoJSON(ST_MakeEnvelope(-0.127677, 51.507515, -0.122161, 51.510021, 4326)) as geom;`
<img width="1585" alt="Screen Shot 2020-11-10 at 11 49 50" src="https://user-images.githubusercontent.com/4347878/98671551-5aa23a80-234c-11eb-838c-41b7420c4c04.png">
Any information or advice on how to display a polygon would be much appreciated.
Thanks.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] songololo commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
songololo commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-725305364
I managed to make some headway, posting here for others:
The JSON strings returned from `postGIS` using the `ST_AsGeoJSON` function contain only the geometry component of the geoJSON spec. This means that it is necessary to wrap these geometries in a full-fledged geoJSON object before `deck.gl` can recognise it.
For example:
```postgresql
SELECT *, json_build_object(
'type', 'Polygon',
'geometry', ST_AsGeoJSON(ST_Transform(geom, 4326))::json)::text as geoJSON
FROM <my-schema>.<my-table>;
```
If you are working with MultiPolygons then you need to extract a Polygon first:
```postgresql
SELECT *, json_build_object(
'type', 'Polygon',
'geometry', ST_AsGeoJSON(ST_Transform((ST_DUMP(geom)).geom::geometry(Polygon, 27700), 4326))::json)::text as geoJSON
FROM <my-schema>.<my-table>;
```
Note that in both cases, the geoJSON result has to be cast to a text type otherwise superset will have issues when it runs internal queries, which are otherwise unable to sort the results (duplicate checking?) if using JSON.
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] songololo commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
songololo commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724560011
Thank you. Can anyone give some clues as to what the polygon chart expects in terms of geometry? (e.g. whether geojson polygon in epsg 4326 coordinate reference system works?)
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] mistercrunch commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
mistercrunch commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724472685
There's a bit of info here https://docs.preset.io/docs/scatterplot
----------------------------------------------------------------
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.
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
[GitHub] [incubator-superset] junlincc commented on issue #11625: Please provide documentation for deckgl charts
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #11625:
URL: https://github.com/apache/incubator-superset/issues/11625#issuecomment-724307367
@srinify
----------------------------------------------------------------
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.
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