Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to import a huge number of polygons from a third party (as a csv file- array of x,y's). I have to check whether the polygon vertices are in clockwise or counter clockwise, finally i have to convert it into counter clockwise and store it in the oracle spatial table as sdo geometry.

I am not able to find any oracle spatial java API to check the array of vertices and convert it into counter clockwise. I tried the same question in oracle spatial forum, but they said no API for this.

do you have ever worked on this oracle spatial java API, any other thoughts. ( i have found some methods to validate the ring rotation "http://paulbourke.net/geometry/clockwise/index.html", but if it is from oracle it will be good to implement).

share|improve this question
1  
Run SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT - docs.oracle.com/cd/B10501_01/appdev.920/a96630/… returns The context of the error (the coordinate, edge, or ring that causes the geometry to be invalid) –  Mapperz Feb 24 '12 at 16:42
    
I would be good, if it is in java api. –  Vadivelan Palanichamy Feb 24 '12 at 17:01
add comment

1 Answer

up vote 0 down vote accepted

EXECUTE SDO_MIGRATE.TO_CURRENT('YOUR_TABLE'); Should correct the orientation of your polygons (10G r2)

share|improve this answer
    
I have got the logic to check the polygon geometry before storing into database community.topcoder.com/… –  Vadivelan Palanichamy Mar 8 '12 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.