When I do Select ST_Point(25,45)
in PostgresQL I get the following :
"010100000000000000000039400000000000804640"
,
code I am trying to run the same spatial functions in hive and my code is as below:
**add jar /home/test/esri-geometry-api-2.1.0.jar;
add jar /home/test/spatial-sdk-hadoop.jar;
add jar /home/test/spatial-sdk-hive-1.1.jar;
create temporary function ST_GeodesicLengthWGS84 AS 'com.esri.hadoop.hive.ST_GeodesicLengthWGS84';
create temporary function ST_SetSRID AS 'com.esri.hadoop.hive.ST_SetSRID';
create temporary function ST_LineString AS 'com.esri.hadoop.hive.ST_LineString';
create temporary function ST_AsText as 'com.esri.hadoop.hive.ST_AsText';
create temporary function ST_Point AS 'com.esri.hadoop.hive.ST_Point';
create temporary function ST_GeometryType AS 'com.esri.hadoop.hive.ST_GeometryType';
SELECT longitude, latitude,ST_Point(longitude,latitude) ;
Gives as T�����K@���I98@**
SELECT longitude, latitude,ST_GeometryType(ST_Point('point (longitude,latitude)')) ;
Gives as NULL
Can you please advise how this can be achieved?