[mapserver-users] [EXTERNAL] Layer with point from X and Y columns in

Smith, Michael ERDC-RDE-CRREL-NH Michael.Smith at erdc.dren.mil
Thu Mar 13 04:01:03 PDT 2014


Jakub,

What you have to do is disable the use of the spatial index (since you are defining this on the fly, there will be no index).

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

See http://mapserver.org/input/vector/oracle.html#using-none for details.

Mike

--
Michael Smith
US Army Corps
Remote Sensing GIS/Center


From: Jakub Štambachr <stambikk at gmail.com<mailto:stambikk at gmail.com>>
Date: Thursday, March 13, 2014 at 5:39 AM
To: "mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>" <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Subject: [EXTERNAL] [mapserver-users] Layer with point from X and Y columns in
Resent-From: Michael Smith <michael.smith at usace.army.mil<mailto:michael.smith at usace.army.mil>>

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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140313/097e798b/attachment.html>


More information about the mapserver-users mailing list