[GIS] How to view coordinates instead of geometry object in geometry column in Oracle SQL Developer

coordinatesgeometryoracle-dbmsoracle-spatial

I've once found a setting in Oracle SQL Developer, allowing to display the geometry column as coordinates, instead of the generic geometry object name (e.g. MDSYS.SDO_GEOMETRY).

I cannot find it anymore, where is this setting located?

Note: I've also posted this question on dba.stackexchange.com

Best Answer

You can double-click one of those objects. That bring up a little pencil icon on the side. Clicking that brings up an "edit" window that shows the object content.

That works fine for points. Hard to read when you deal with complex lines or polygons.

Note that for points, you can get the X and Y values easily like this:

select id, p.location.sdo_point.x as longitude, p.location.sdo_point.y as latitude from us_cities p;

which returns:

    ID  LONGITUDE   LATITUDE
------ ---------- ----------
     1 -73.943849    40.6698
     2  -118.4112  34.112101
     3 -87.684965   41.83705

EDIT

There is actually a setting that helps. Check Preferences then Database/Advanced. You will see a tick box marked Display Struct Value in Grid.

When ticked, then the content of objects is shown inside the result grid. Not the full content though: only what fits the grid column. For point geometries, you should be able to see it all. For more complex shapes, you will need to click the object and the "edit" pencil to see everything.

And then also mousing over the object brings up a pop-up that shows the content of the object (not all of it though).