Skip to main content

Hello all,

I have an Oracle Spatial table that contains some records with a Point geometry and some records with a Polygon geometry.

Considering the large number of records, I would like to take advantage of the ability of the Oracle Spatial Reader to perform a SELECT within the Oracle database and return only records with a Point geometry

(This is preferable to Reading all records and then using a GeometryFilter for performance reasons)

How to I write the SELECT statement?

I assume it has something to do with SDO_GEOMETRY, but I just cannot get the syntax correct

I haven’t used oracle, but from https://docs.oracle.com/database/121/SPATL/point.htm#SPATL529 it looks like:

      WHERE table_alias.field_name.SDO_GTYPE=2001 (e.g. WHERE c.shape.SDO_GTYPE=2001).

 

Something like this should work for a 2 dimensional single point.


I get an “invalid identifier” error


Use SQLCreator (instead of the Oracle Spatial Reader) to read data with a SQL command on geometry.

select * from YOUR_TABLE t where t.YOUR_GEOMETRY_COLUMN.sdo_gtype = 2001

Enter your own values for YOUR_TABLE and YOUR_GEOMETRY_COLUMN.


Reply