I am beginner on GIS, and I have loaded a shapefile to MSSQL, PostGIS and Oracle Spatial (11g)

On both MSSQL and PostGIS I could create a query to return me the WKB from the table (geometry field)

The equivalent query on my Oracle should be this one:

select l.GEOM.Get_WKB() from LINK l

This returns all records as (null). The same thing on other databases return the binary data (represented on hexadecimal)

If I try:

select l.GEOM.Get_WKT() from LINK l

it does not return the text representation.

I know the data is there, since using ADO connection I could retrieve the data from the Geom field (object) and each coordinate from the ORDINATE varray. I have used GeoRaptor to load the shp file to the database.

What is the right way to create a query to retrieve the WKB from Oracle Version


1 Answer 1


You are using the right approach. Note that both methods return LOBs - get_wkb() returns a blob, get_wkt() returns a clob.

Maybe the tool you use to submit your select is unable to handle LOBs. Perhaps try running the select in sqlplus. Note that it only returns the first 80 bytes of the LOBs. It will show the BLOBs in hexadecimal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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