Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Alvarez
Contributor
Contributor

travel areas

Good morning, I would like to share a problem I am having when trying to use "Travel Areas" from Qlik GeoAnalytics (in fact when trying to use any operator in QlikGeoAnalytics).

The steps I do are:

  1. I create a table with an only point, including its name, its latitude and its longitude (The name of the fields are: Localizac, latitud, longitud), and the name of the table is "Tabla"

 

  1. I create a GeoAnalytics connector and check  it connects correctly, then I introduce the next content:

LIB CONNECT TO 'GA (adfs_david.alvarez.canales@acciona.com)';

/* Generated by GeoAnalytics for operation TravelAreas ---------------------- */
[_inlineMap_]:
mapping LOAD * inline [
_char_, _utf_
"'", '\u0027'
'"', '\u0022'
"[", '\u005b'
"/", '\u002f'
"*", '\u002a'
";", '\u003b'
"}", '\u007d'
"{", '\u007b'
"`", '\u0060'
"´", '\u00b4'
" ", '\u0009'
];

IF FieldNumber('Localizac', 'Tabla') = 0 THEN
call InvalidInlineData('The field Localizac in Tabla is not available');
END IF
IF FieldNumber('latitud', 'Tabla') = 0 THEN
call InvalidInlineData('The field latitud in Tabla is not available');
END IF
IF FieldNumber('longitud', 'Tabla') = 0 THEN
call InvalidInlineData('The field longitud in Tabla is not available');
END IF
Let [RedondelesInlineTable] = 'Localizac' & Chr(9) & 'latitud' & Chr(9) & 'longitud';
Let numRows = NoOfRows('Tabla');
Let chunkSize = 1000;
Let chunks = numRows/chunkSize;
For n = 0 to chunks
Let chunkText = '';
Let chunk = n*chunkSize;
For i = 0 To chunkSize-1
Let row = '';
Let rowNr = chunk+i;
Exit for when rowNr >= numRows;
For Each f In 'Localizac', 'latitud', 'longitud'
row = row & Chr(9) & MapSubString('_inlineMap_', Peek('$(f)', $(rowNr), 'Tabla'));
Next
chunkText = chunkText & Chr(10) & Mid('$(row)', 2);
Next
[RedondelesInlineTable] = [RedondelesInlineTable] & chunkText;
Next
chunkText=''


[TravelAreas]:
SQL SELECT [Localizac], [Redondeles_TravelArea], [Redondeles_Origin], [Redondeles_Cost], [Redondeles_CostUnit], [Redondeles_Status] FROM TravelAreas(costValue='200', costField='', costUnit='Kilometers', transportation='bird', dataset='Redondeles')
DATASOURCE Redondeles INLINE tableName='Tabla', tableFields='Localizac,latitud,longitud', geometryType='POINTLATLON', loadDistinct='NO', suffix='', crs='Auto' {$(RedondelesInlineTable)}
SELECT [Localizac], [Redondeles_Geometry] FROM Redondeles;
[Redondeles]:
SQL LOAD * FROM Redondeles;
tag field [Localizac] with '$primarykey';
tag field [Redondeles_TravelArea] with '$geopolygon';
tag field [Localizac] with '$geoname';
tag field [Redondeles_TravelArea] with '$relates_Localizac';
tag field [Localizac] with '$relates_Redondeles_TravelArea';
tag field [Localizac] with '$primarykey';
tag field [Redondeles_Geometry] with '$geopoint';
tag field [Localizac] with '$geoname';
tag field [Redondeles_Geometry] with '$relates_Localizac';
tag field [Localizac] with '$relates_Redondeles_Geometry';

[RedondelesInlineTable] = '';

/* End GeoAnalytics operation TravelAreas ----------------------------------- */

 

 

 

  1. I try to "load", and the next error message appears:
Se ha producido el siguiente error:
 
 
El error se ha producido aquí:
call InvalidInlineData('The field Localizac in Tabla is not available')

 

 

Can somebody help me?

Thank you in advance

0 Replies