Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need below function to execute in hive #159

Open
kullaibigdata opened this issue Feb 18, 2019 · 9 comments
Open

Need below function to execute in hive #159

kullaibigdata opened this issue Feb 18, 2019 · 9 comments

Comments

@kullaibigdata
Copy link

Hi I am very new to spatial function . As I searched on google I find out the ESRI github code and I Clone that code and I add the dependencies and it's working fine.

Now below spatial functions we are not able to find out . Can you please share below spatial hive UDF code.

st_closestpoint
st_distancesphere
st_linesubstring
st_linemerge
st_covers
st_makeline

If you have any alternatives spatial function kindly please share for the same.

Thanks & Regards,
Kullaireddy N.

@randallwhitman
Copy link
Contributor

Thanks for filing the request for enhancement to the set of functions available (cross-reference #90).
Although the core contributors have no immediate plans to add more functions, the Spatial-framework-for-Hadoop is open-source and contributions are welcome.

@kullaibigdata
Copy link
Author

thanks for quick response Randall..!
we will work on the enhancement and please let us know if anybody is completed any of these functions for the time being.

@kullaibigdata
Copy link
Author

kullaibigdata commented Feb 25, 2019

Hi Randall ..
Have tried to implement the functionalities which i have mentioned you in my previous query.
For the functionality ST_LineMerge, i have got a source code from https://github.com/orbisgis/h2gis/tree/master/h2gis-functions/src/main/java/org/h2gis/functions/spatial/aggregate
While trying to incorporate the logic what i got from h2gis i was stuck with the methods written in Geometry.utils class. Could we please give few suggestions from your side on how to implement the logic from h2gic to our esri in ST_LineMerge functionality.
Please do the needful.

Thanks in advance.

@randallwhitman
Copy link
Contributor

Hi @kullaibigdata -
I'll avoid looking at the H2GIS source code, because [if I'm seeing correctly] it has a license incompatible with the Apache license of this Spatial Framework for Hadoop.
Is LineMerge part of an OGC standard, and if so, can you point me to which standard and which section?

@kullaibigdata
Copy link
Author

Hi Randallwhitman,

st_closestpoint
st_distancesphere
st_linesubstring
st_linemerge

we are taking H2GIS logic and trying to implement OGC standard for the above spatial function but we are not succeeded in this case because bit complex structure for the understanding OGC standard.

Please advise for the above spatial query's how to implement in the OGC standard or else can you please provide the logic for the same.

Thanks & Regards,
Kullaireddy N.

@randallwhitman
Copy link
Contributor

OpenGIS Implementation Standard for Geographic information - Simple feature access

OGC-06-103r4-1.2.1
Part 1: Common architecture

OGC-06-104r4-1.2.1
Part 2: SQL option

Those are the OGC standard documents that I have, in which I do not find specification for any of the four functions listed in previous comment (2019/04/09 22:23 PT). Can you point me to a standard (and which section) that specifies those functions?
@kullaibigdata

@kullaibigdata
Copy link
Author

Thanks Randallwhitman for quick response.
Yes we have checked OGC-06-104r4-1.2.1 (Part 2: SQL option) functions but required spatial functions are not available in this section.
Coming to the standard functions which are available in POSTGRESQL. Below are the links for your reference.
https://postgis.net/docs/ST_LineMerge.html
https://postgis.net/docs/ST_LineSubstring.html
https://postgis.net/docs/ST_DistanceSphere.html
https://postgis.net/docs/ST_ClosestPoint.html
https://postgis.net/docs/ST_Covers.html
https://postgis.net/docs/ST_MakeLine.html

Currently we are using ESRI custom spatial functions jar but the above functions are not available in ESRI .Kindly provide the solution to move forward.

Thank you

Thanks & Regards,
Kullaireddy N.

@randallwhitman
Copy link
Contributor

@alocke @stolstov For a contributor planning to implement the six functions ST-LineMerge, ST-LineSubstring, ST-DistanceSphere, ST-ClosestPoint, ST-Covers, and ST-MakeLine : would you recommend implementing those inside geometry-api-java, versus, would you recommend implementing those at spatial-framework-for-hadoop level (utilizing geometry-api-java of course)? Thanks in advance for your comments.

@stolstov
Copy link
Member

Firstly: Esri/contributing#10
@randallwhitman Maybe provide a mechanism to be able to register external spatial functions so that the user could have their own implementation with their own licensing requirements?

I think:
ST_ClosestPoint - OperatorProximity2D
ST_Covers - OperatorRelate with "*****FF".
ST_DistanceSphere - Distance on a sphere calculation is a short function that has many example on the internet.
ST_LineMerge - Maybe this is ST_Union?
LineSubstring we don't have I think. This is not too complicated method to write externally.
MakeLine seems like some simple construction method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants