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!

Calculating a Centroids X and Y values

282013May 17 2004 — edited May 17 2004
Hi Folks

I have a table the containing polygon geometries of sites with attributes holding geographic attributes of the polygons such as area and perimeter.

I have written a trigger on the table to populate most of these fields as data is parsed to the database but I am stuck:

For various reporting reasons I need to hold two columns one containing an X value for a given site and the other holding the Y value, ie a centroid and I am not sure how to calculate this.

Due to a customer requirement the centroid must:
a) always fall within the site boundary
b) always fall in the same XY location for a given boundary geometry, so If there are two identical sites they would have identical centroids, or if one sites boundary was reloaded without any geometric changes the centroid would be recalculated to the same position.

If anyone has any idea how to acheive this please can you give me some advice.

Thanks Andrew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2004
Added on May 17 2004
1 comment
231 views