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!

getting x and y from GEOMETRY

766420May 11 2010 — edited May 11 2010
Hello,
I had a table with polygon features, and I created centerpoints for them. I noticed that I have mulitple centrepoint records and I only want one for each geometry. In some cases I have 22 points for 1 unit, when I should only have 1.
I have a field for point geometry.
ex. where id=1, GEOMETRY= SDO_GEOMETRY(2001,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1,1,3,1,0), SDO_ORDINATE_ARRAY(-122.88808, 49.2634761, .999999,531,-.0009687))

NOTE: I created the centrepoints using Geomedia, as there were too many issues using oracle and my original shapefile had no unique id.

What I would like to do is create a table that has the rowid and x,y of points so that I have only distinct geometries. My rough statement is:
create table tmp_1 as select x,y,min(rowid) "RT" from ADDRESS group by x,y;

create table tmp_2 as select from ADDRESS where row_id in (select RT from tmp_1);*

Any ideas on how I can fix this? I have tried to do 'CREATE TABLE TMP_1 AS SELECT GEOMETRY, MIN(ROWID) "RT" FROM ADDRESS GROUP BY GEOMETRY;' but i got ORA-22901: cannot compare nested table or VARRY or LOB attributes of an object type.

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2010
Added on May 11 2010
3 comments
1,682 views