Esri / spatial-framework-for-hadoop

The Spatial Framework for Hadoop allows developers and data scientists to use the Hadoop data processing system for spatial data analysis.
Apache License 2.0
363 stars 160 forks source link

Added a simple ST_AsShape UDF returning the Esri shape representation. #102

Closed gisfromscratch closed 7 years ago

gisfromscratch commented 7 years ago

There was a need for that. The Esri shape representation can be used for exporting the geometries into other data stores like HBase.

randallwhitman commented 7 years ago

Thanks! We will take a look.

randallwhitman commented 7 years ago

It would be nice to also have the complementary ST_GeometryFromShape, but that could be separate.

randallwhitman commented 7 years ago

Code review looks OK. I cloned, and it built OK and unit test passed. In hive I ran create table randall.t002 as select st_asshape(st_point(1,2)) shape but I'm not sure what to do with that table not having ST-GeometryFromShape.

randallwhitman commented 7 years ago

I was able to verify the shape buffer written to my randall.t002 is point(1 2).

gisfromscratch commented 7 years ago

For clarification: we need this shape representation because we are using Hive to write into HBase and we developed a custom datasource using ArcObjects and the HBase Java API. This way we can easily query our big data using Hive and show those query results using the ArcGIS platform.

I will take a look at to ST_GeometryFromShape method this week.

Thank you.

randallwhitman commented 7 years ago

Sounds great, thanks.