I have some polygons in my oracle database, the column type is sdo.geometry, and I want to draw the polygon using OpenLayers.

The problem is OpenLayers reads WKT type and I can't convert to this type, because my version of Oracle is "Oracle express Edition", and function like: SDO_UTIL.TO_WKTGEOMETRY(geometry) or geometry.get_WKT() returns "(null)"

enter image description here.

I already have something on my database cuss: enter image description here

I'm using C#, and I haven't found any library for my problem.


I have a pure PLSQL WKT library you are welcome to take here https://github.com/pauldzy/DZ_WKT

It should work with XE as there is no java nor any requirements beyond PLSQL. Feel free to drop me a line or add an issue if you have additional questions.

WKT is not the most web-friendly format, you may wish to just use GeoJSON and I have another pure PLSQL library for that here https://github.com/pauldzy/DZ_JSON

Note my GeoJSON code is for GeoJSON output only. There is no input support as I assume folks will use native 12c JSON handling for that.



  • To install just execute "dz_json_deploy.sql" ? – Pedro Henrique Dec 20 '17 at 14:08
  • yep. all resources have a "DZ" prefix so as to not conflict with your namespaces. If for some reason you are using DZ as resource prefix I may have to fight you for it. :) – pauldzy Dec 20 '17 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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