Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

shanemichelon
Contributor

GeoReduceGeometry error (Qliksense)

Hi community.

I have been playing with maps recently and specifically, trying to load Australian Postcodes.  I have a kml file, but I get an error:

The Hypercube results are too large

I can accept that this may be the case as the file is quite large.

So, I tried using Georeducegeometry.  However this always gives 'invalid expression'.

To test it, I loaded a smallish world map kml file which displays fine in a map.

When I tried to do georeducegeometry on this working and much smaller file,  I still get the invalid expression error:

GeoReduceGeometry(world.Area) as [Area]

I even tried reducing the table to a single row, but that fails too.

What is the correct format for georeducegeometry?  Working map data does not seem to like this function.

I have attached the sample kmls for reference.

If anyone can help with getting an area based map of Australia Postcodes working, it would be great

Thanks!

1 Solution

Accepted Solutions
rnt
Valued Contributor

Re: GeoReduceGeometry error (Qliksense)

Hi,

the GeoReduceGeometry function is an aggregating function, so you need to use a Group By when you use it in the load script, otherwise you get the Invalid Expression error.

Additionally, there is a second parameter to set the level of reduction, between 0 to 1, with 0 = no reduction and 1 = maximal reduction.

GeoReduceGeometry - script and chart function ‒ Qlik Sense

I'll see about improving the help for the geospatial function topics to include examples.

Map:

LOAD

    world.Name,

    world.Point,

    world.Area

FROM [lib://myData\world.kml]

(kml, Table is [World.shp/Features]);

Map2:

LOAD world.Name, GeoReduceGeometry(world.Area,0.5) as [Area] resident Map Group By world.Name;

4 Replies
Not applicable

Re: GeoReduceGeometry error (Qliksense)

Hi,

I do not know about GeoReduceGeometry but one way to use the Australian postcodes is to use IdevioMaps (se http://bi.idevio.com). There Australian postcode are included in the product, simplified and ready to use. You do not even need to load the areas but use the postcodes as the dimension in an AreaLayer and it will automatically find the areas and display them for you (under Location Settings, set that you mean postal areas and country is Australia).

One note about simplification is that to get a good result you need to do the simplifications topologically, not one area at a time. Otherwise you will generally get gaps and overlaps between areas.

Drop a message to info@idevio.com to get an evaluation license.

/Johan

rnt
Valued Contributor

Re: GeoReduceGeometry error (Qliksense)

Hi,

the GeoReduceGeometry function is an aggregating function, so you need to use a Group By when you use it in the load script, otherwise you get the Invalid Expression error.

Additionally, there is a second parameter to set the level of reduction, between 0 to 1, with 0 = no reduction and 1 = maximal reduction.

GeoReduceGeometry - script and chart function ‒ Qlik Sense

I'll see about improving the help for the geospatial function topics to include examples.

Map:

LOAD

    world.Name,

    world.Point,

    world.Area

FROM [lib://myData\world.kml]

(kml, Table is [World.shp/Features]);

Map2:

LOAD world.Name, GeoReduceGeometry(world.Area,0.5) as [Area] resident Map Group By world.Name;

kaanerisen
Contributor III

Re: GeoReduceGeometry error (Qliksense)

Can you try this:

aus_temp_map:

LOAD

    "Aus Postcode Boundaries 2015.Name",

    "Aus Postcode Boundaries 2015.Point",

    "Aus Postcode Boundaries 2015.Area"

FROM [lib://desktop/Aus Postcode Boundaries 2015.kml]

(kml, Table is [POA_2011_AUST_2013_11_26_14_20.kmz/POA_2011_AUST_2013_11_26_14_20.KML]);

aus_map:

Map2:

LOAD "Aus Postcode Boundaries 2015.Name",

GeoReduceGeometry("Aus Postcode Boundaries 2015.Area",0.9) as [Area]

resident aus_temp_map

Group By "Aus Postcode Boundaries 2015.Name";

drop table aus_temp_map;

shanemichelon
Contributor

Re: GeoReduceGeometry error (Qliksense)

Thankyou!  I was unaware of the fact that it was an aggregation.  The group by worked perfectly and the large dataset now displays correctly.

The Help was not very clear on that fact!