Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I load LINESTRINGS as geometries for line layers in Qlik Sense native maps all the time by doing this transformation in the load script:
Replace(Replace(Replace(Replace(Replace(st_astext, 'LINESTRING(', '[['),',','],['),')',']]'),' ',','),'[,','[') as segment_location
I may have taken that piece of code from a post from @Patric_Nordstrom post 🙂
I'm trying to do a similar thing that works for MULTILINESTRING. Do you have any experience with it? Is it even possible? I started using another transformation but it has not worked so far. I'm getting a straight line as a result doing this:
'['& replace(replace(replace(replace(replace(st_astext,'MULTILINESTRING',''),')',']'),'(','['),', ','],['),' ',',')& ']' as segment_location
Please let me know if you have any experience with multilinestrings.
Thanks!
Haven't tested but, should be doable, the native Sense map supports MultiLineString in GeoJSON format.
WKT MultiLineString looks like this:
MULTILINESTRING ((10 10, 20 20, 10 40),
(40 40, 30 30, 40 20, 30 10))
(https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry)
The native Sense map supports MultiLineString in GeoJSON format:
[ [[10, 10], [20, 20], [10, 40]], [[40, 40], [30, 30], [40, 20], [30, 10]] ]
(https://en.wikipedia.org/wiki/GeoJSON)
in short: