Thursday 11 February 2021

Using SQL Developer to visualise Geometry data

I was looking to see if shapes were incorporated inside other shapes.

I could have let the database check this, but sometimes it is very insightful to have a visual representation.

It turns out, SQL Developer facilitates this.

If you select a geometry field in your table, and right click and select [Display geometry shape], you'll get a nice little window indicating the shape.

Sometimes this is greyed out. The solution for this is to click on [Edit] in the menu above, and select [Map View]. This will "initialize" stuff, and then it's no longer greyed out.

Map View

The map view is very convenient, if you wish to show multiple shapes and how they interact.

To get started, select under "View", "Map view" and you are presented with a new subwindow.

Pressting the "New" button in the Map View window, you can just enter a query that returns a geometry, give it a name, proper colouring, and you're good to go.

In the example above, there's two queries, one for a point and one for a shape. The Map View displays them both, and you can even deactive one or the other in the table on the right.

Very convenient in my work, I say.

References

[1] ThatJeffSmith - Visualize Spatial Data with SQL Developer
https://www.thatjeffsmith.com/archive/2011/12/visualize-spatial-data-with-sql-developer/

No comments:

Post a Comment