Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Determine geometric center of a polygon

MohammedImranJan 25 2018 — edited Jan 29 2018

Hi,

I am working on Oracle 11g.

I want to calculate center of a polygon. I have thousands of points(latitude,longitude) as input.

To calculate I have tried using Sdo_geom.SDO_CENTROID oracle spacial function. The output of the function gives a point within the polygon but I do not know how do I feed thousands of points as input to  SDO_ORDINATE_ARRAY?

The points are available in another  oracle table whose desc looks like

desc poly_points;

TABLE poly_points

Name                                      Null?    Type                       

----------------------------------------- -------- ----------------------------

LINE_NO                                            NUMBER                     

pt_SEQ_NO                                          NUMBER                     

LONGITUDE                                          NUMBER                     

LATITUDE                                           NUMBER                  

I need to calculate center for thousands of polygons.

Please let me know if it is possible to add each latitude/longitude serially one after the other or any any other solution ?

Thanks,

Imran.

This post has been answered by _jum on Jan 25 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2018
Added on Jan 25 2018
7 comments
2,805 views