5

I have a point feature in oracle database which has as attribute a blob field that have image inside for every point feature taken in field.

Is there anyway that i can decode and display it on a popup display in Qgis?

I can do hyperlink or popup display if the image files are outside database as file and their path as attribute but i want to know if they can be read directly from oracle blob field.

Shefqet LULJA
  • 1,149
  • 12
  • 30

2 Answers2

2

I dont think there is any direct method to display the Blob field as pop-up in QGIS. You need to code a little to acheive this.

Do the following procedure to go half way.

  1. Load the Spatial table into QGIS using Add Oracle Spatial Layer.
  2. Right-Click on the layer and click on properties.

Layer Properties

  1. Go to Actions tab. Here you can choose from the default action like creating a Java jar file which reads the first argument as unique serial number of your spatial table, retrieves blob as image and displays. (Click on Add default actions for more options).

Add Action

  1. Now click Run Feature action button and select Run an application Option. Now when you click on any feature it opens that application and adds the respective unique serial number as argument and displays the image, of course not as a pop-up but as a seperate application.

enter image description here

You can also do this using a web application and pass the unique serial number as a parameter and choose open action in Action tab. In this you need not create any JRE or any environmental variables.

Hope it is helpful. All the Best.

0

If you have a blob/bytea variable you can make a virtual field where you convert the blob to 64 bit using to_base64( "photo_blob" )

snip of blob photo

Then in the display tab you can add your HTML referring to it <img width='500' src='data:image/png;base64,[% "photo_blob_64bit" %]'>:

snip of setting display value in layer properties

Then you can make these appear with the hover over using "show map tips":

show map tips

aclong
  • 101
  • 1