Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Hana SPS07 and spatial data

$
0
0

One example how you can do it (tested with Rev92)

 

drop schema TST cascade;
create schema TST;
create column table TST.SHAPES (    id integer,    shape ST_Geometry
);
INSERT INTO TST.SHAPES VALUES (1, new ST_Point(0.5, 0.5));
INSERT INTO TST.SHAPES VALUES (2, new ST_Point(0, 0));
INSERT INTO TST.SHAPES VALUES (3, new ST_Point(1, 1));
create procedure TST.WithinShape(in myShape String) as
begin    SELECT * from TST.SHAPES    where shape.ST_Within( ST_GeomFromText(:myShape) ) = 1;
end;
CALL TST.WithinShape( 'Polygon((0 0, 0 1, 1 1, 1 0, 0 0))' );

Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>