Visualize Spatial Data with SQL Developer

thatjeffsmith SQL Developer 7 Comments

Tell Others About This Story:

Spatial data in its raw format is ugly. The shapes and places it represents can be very enlightening. Here’s some raw spatial data followed by their visualization. If you worked with spatial data, what would you prefer? You can probably figure out what you’re looking at, but wouldn’t it be nice if you could get a visual confirmation?


SDO_GEOMETRY SHAPE Data Visualizations in SQL Developer

To see the shapes, just right-click

Display Geometry Shape translates numbers into pictures!

Map View, What’s that?

Do you remember the kid’s game, Pick Up Sticks? You’d throw a bunch of sticks on the ground and you had to pick them up one at a time following the rules…which I have seemed to have forgotten. Using Oracle SPATIAL I could store each game we play. Here’s how that might look:

I always lost this stupid game anyway.

When you right-click on the data you can also choose to ‘Invoke Map View on result set.’

I know these aren’t really real-world examples, but hopefully it’s good enough to give you an idea of how SPATIAL data representation works in SQL Developer. If you want to load some really cool looking data, try your local government. My county has it’s data available free for the taking.

If you want to use my boring examples, it’s all in the SPATIAL chapter in the Oracle database docs. The lines data came from some free samples published by Simon Greener over at

And here’s the kids game, you can still buy it today!

Tell Others About This Story:

Comments 7

  1. Hmm,
    Oddly enough in the latest version ( the option in the right click context menu to view either individual records or the result set was greyed out. It wasn’t until I manually opened the map view from View->Map View that I could visualize the results. Odd-

    1. thatjeffsmith Post
  2. Hi Jeff,

    In my SQL developer there is no option to view geometry shape but have installed oracle 11 g ..have to enable any options in SQL developer ?

    1. thatjeffsmith Post

      What version of SQL Developer are you running? If in version 4, try View > Map View. That will force the library to load, and should make the geometry, right click in the grid to work.

  3. Hello Jeff, congratulations to the blog, sorry for my english but I’ll try. In version 2.1.0 I visualized Spatial data in the following format MDSYS.SDO_GEOMETRY (2001, 29182, NULL, MDSYS.SDO_ELEM_INFO_ARRAY (1,1,1), MDSYS.SDO_ORDINATE_ARRAY (491063.504878304,6688820.29609558)) highlighting colors in elements that compose the geometrical data. In version I visualize spatial data in the following format [MDSYS.SDO_GEOMETRY] without spatial information. How do I set that has syntax highlighting in geometry? Thank you.

    1. thatjeffsmith Post

Leave a Reply

Your email address will not be published. Required fields are marked *