Hi,

There is another way by using a GDAL virtual format 
http://www.gdal.org/ogr/drv_vrt.html.
But it does not really make much sense to have a spatial table in Oracle that 
is to be used for rendering maps without having a spatial index. Without 
spatial index the BBOX of the map cannot be converted into working spatial 
query from Oracle. The best you can obtain would lead to selecting the whole 
table for each pan or zoom. So I suggest you to put all your effort into 
contacting a manager in a high enough position and tell that the spatial index 
is absolutely needed. And when the manager puts the db admins into work, they 
can at the same time add triggers to populate the SDO_GEOMETRY fields 
automatically from X and Y columns after each insert and update. If you do it 
right, your manager believes that it was his/her idea and everything goes 
fluently and yields much better result than any workaround.

-Jukka Rahkonen-




Jakub Štambachr


Hi,

I have table in Oracle Database that contains points specified by columns X and 
Y (The table also contains SDO_Geometry column but it's not always filled with 
data and I'm not at liberty to modify the table).

My question is: Is it possible to specify layers with point using the columns X 
and Y?

So far I have something like this and I need an alternative to replace the DATA

TYPE POINT
CONNECTIONTYPE oraclespatial

CONNECTION "isypoo/password@orcl"
DATA "shape FROM (select table.shape as SHAPE from table)"

I tried the following:

DATA "shape FROM (select MDSYS.SDO_GEOMETRY(2001, NULL, 
MDSYS.SDO_POINT_TYPE(table.x, table.Y, NULL), NULL, NULL) AS shape from table)"

But got the following error:

msDrawMap(): Image handling error. Failed to draw layer named 'mosty'.
msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-13226: 
interface not supported without a spatial index

Is there any other way of doing this without modifying the database?

Thank you for your help,

Jakub
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to