Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "", but if it is from oracle it will be good to implement).

share|improve this question
Run SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT -… 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
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… – Vadivelan Palanichamy Mar 8 '12 at 16:08

Your Answer


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.