Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ESRI Spatial Framework for Hadoop

avatar

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

1 ACCEPTED SOLUTION

avatar
Super Guru

@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

View solution in original post

1 REPLY 1

avatar
Super Guru

@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