Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I've already posted that question on "Qlik Sense \ Qlik Sense App Development" but I'm not sure that was the good forum for it.
Therefore I try here...hope this will not be a problem (otherwise sorry).
According to the documentation "Qlik Sense can use: Fields containing geodata in GeoJSON, LineString, or MultiLineString formats.".
I'm trying to display a Qlik Map based on a Postgis column.
My Postgis column is Linestring ZM ESPG:2154. I'm creating a view on it to :
- transform it to ESPG:4326
- force it to 2D
- convert it to GeoJSON
The query looks like this : ST_AsGeoJSon(ST_Force2D(ST_Transform(geom, 4326)))
And returns something like that : {"type":"LineString","coordinates":[[4.29371849296831,44.0363076802448],[4.29399312738311,44.036478158726]]}
Then I load the view in my Qlik App, add a map, add a layer to the map and finally select the view column as the location....but nothing is displayed.
Regards,
The app reads from a qvd, whats the sql query that pulls the data?
Thanks,
Patric
See attached.
Thank you
Modify the sql query something like this from:
Select "Id",
...
"Point"
...
to
Select "Id",
...
ST_AsGeoJSON(Point) :: json->'coordinates' AS Point
...
For more details see https://stackoverflow.com/a/57949792 and https://postgis.net/docs/ST_AsGeoJSON.html
Thanks,
Patric
I recommand you to prepare the data on the Postgis server side and the load it.
You could create a view, materialized view or table on PostgreSQL/Postgis database with a column computed from the geom that looks like this : ST_AsGeoJSon(ST_Force2D(ST_Transform(<your geom column here>, 4326))) as GeomForQlik.