on 04-20-2015 9:44 AM
Hi,
Is there a function available in sap hana spiatial for finding minmum bounding rectangle on geometries.
Currently, I am using below query to find it
SELECT new ST_Polygon('POLYGON ((' || Min("GEOM".st_xmin()) || ' ' || Min("GEOM".st_ymin()) || ','
|| Min("GEOM".st_xmin()) || ' ' || Max("GEOM".st_ymax()) ||
',' || Max("GEOM".st_xmax()) || ' ' || Max("GEOM".st_ymax()) || ',' || Max("GEOM".st_xmax()) || ' ' || Min("GEOM".st_ymin()) || ',' || Min("GEOM".st_xmin()) || ' ' || Min("GEOM".st_ymin()) || '))') FROM "table" GROUP BY ID
But this is failing for point geometries in table because (xmin, ymin ) and (xmax,ymax) are same for point and it is not able to create polygon for it.
I have also tried ST_UNIONAggr(thinking of getting envelope of the aggregated geometry) but this gives error with - invalid function or procedure name.
Please suggest.
Thanks in Advance.
Nishtha
Hello Nishtha, thanks for contacting us. Please refer to the SAP HANA and In-Memory Computing group: http://scn.sap.com/community/hana-in-memory You can post the same question there. I hope you will find this helpful. Kind regards, Federica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.