Skip to Content
0
Aug 22, 2016 at 10:20 AM

SAP HANA Geospatial - how to calculate polygon area

232 Views

Hi !

In oracle i have polygon ,he area 8,6 ha.

its coordinates

(37.67864227294922 50.4218626237537,37.67864227294922 50.42404998528019,37.68362045288086 50.42404998528019,37.68362045288086 50.4218626237537, 37.67864227294922 50.4218626237537)

in HANA i create this polygon like this

insert into MY_TABLE(id,spolygon)

select 7777777,NEW ST_Polygon('Polygon ((37.67864227294922 50.4218626237537,37.67864227294922 50.42404998528019,37.68362045288086 50.42404998528019,37.68362045288086 50.4218626237537,37.67864227294922 50.4218626237537))') from dummy;

When i calculating area

select p.spolygon.st_area() from MY_TABLE p where p.id=7777777;

I get 0,000010890908015426248. -- what kind of unit, where it comes from (how to configure it), how do i calculate the area in hectares?

if i do like this p.spolygon.st_area() * 1000000 i get 10.8 not 8,6 ha

What shall I do to get my 8.6 hectare ?