I have a table of boundaries(polygons) which need to be served up through ArcGIS Server with their centroids(points). I'm using Oracle spatial and thought the most efficient way of doing this was to create a spatial view where the SDO_CENTROID function was used on the geometry.
The table definition:
create or replace view VW_LOCALITIES_CENTROIDS as select l.IDENTIFIER, l.SUBURB, l.LOCALITY_NAME, l.LOCALITY_CODE, l.LOC_STATUS, SDO_GEOM.SDO_CENTROID(l.GEOMETRY, (SELECT DIMINFO FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = 'VW_LOCALITIES_CENTROIDS')) GEOMETRY FROM LOCALITIES l;
I have a metadata entry which looks like: table_name: VW_DCDB_LOCALITIES_CENTROIDS column_name: GEOMETRY diminfo: ((X, -180, 180, 0.05),(Y,-90,90,0.05)(,,,)(,,,)) SRID: 8311
The coordinate system is GDA94.
I add this view to my ArcMap and it won't draw. I then try to browse the table and the error I get is ORA-13226: interface not supported without a spatial index. I can't put a spatial index on the view or the Oracle Spatial function as far as I know.
Does anyone know how I can publish a working service with the view I created? Some equivalent solution would be acceptable too.
NOTE: I would like to avoid creating a materialized view..
EDIT: There are 110 rows in the base table and in the view.
EDIT2: The purpose of this service is for someone to be able to query the attribute "SUBURB" and get back the centroid of its polygon. They are going to attach the centroid to multiple records. The service will NEVER be used to draw geometry.