Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ESRI Spatial Framework for Hadoop

Solved Go to solution
Highlighted

ESRI Spatial Framework for Hadoop

New Contributor

ESRI Spatial Framework for Hadoop does not support a binary geometry data type for Hive. What are the alternatives?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: ESRI Spatial Framework for Hadoop

@sivakumar sudhakarannair girijakumari

ESRI spatial framework for Hadoop could use to store geometry data as text or as json.

For example, you can store the following MULTIPOLYGON data as text (string in Hive, for example)

'MULTIPOLYGON (((-158.91661716771827 10.33741051185143, -67.59825779273768 10.33741051185143,-67.59825779273768 53.55389082595917, -158.91661716771827 53.55389082595917, -158.91661716771827 10.33741051185143)))'

If you wish to apply one of operations supported by ESRI framework for Hive, e.g. ST_Intersects, you need first to convert text to geometry using ST_GeomFromText function. Most of the ESRI spatial functions would require you to convert text to geometry first.

ESRI spatial framework for Hive supports also json. The approach is similar. You need to convert json to geometry before applying a function like ST_Intersects.

More details about JSON format here: https://github.com/Esri/spatial-framework-for-hadoop/wiki/JSON-Formats

1 REPLY 1

Re: ESRI Spatial Framework for Hadoop

@sivakumar sudhakarannair girijakumari

ESRI spatial framework for Hadoop could use to store geometry data as text or as json.

For example, you can store the following MULTIPOLYGON data as text (string in Hive, for example)

'MULTIPOLYGON (((-158.91661716771827 10.33741051185143, -67.59825779273768 10.33741051185143,-67.59825779273768 53.55389082595917, -158.91661716771827 53.55389082595917, -158.91661716771827 10.33741051185143)))'

If you wish to apply one of operations supported by ESRI framework for Hive, e.g. ST_Intersects, you need first to convert text to geometry using ST_GeomFromText function. Most of the ESRI spatial functions would require you to convert text to geometry first.

ESRI spatial framework for Hive supports also json. The approach is similar. You need to convert json to geometry before applying a function like ST_Intersects.

More details about JSON format here: https://github.com/Esri/spatial-framework-for-hadoop/wiki/JSON-Formats