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

Jakub Štambachr stambikk at gmail.com
Thu Mar 13 05:13:21 PDT 2014


Jukka,

 

Thank you for your tip, for now I solved it with the 'USING NONE' clause.
As for the rest of you answer, the problem is that it needs to work with at
least 5 different databases owned and maintained by 5 different companies
with the data being provided by yet another companies (I'm not even sure
which onesJ) so you see that the control we have over the db is minimal. In
the future we plan to do the adjustments you suggested but it's gonna take a
while and I needed to get this working asap. 

 

Thanks for your time,

 

Jakub

 

From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Rahkonen Jukka
(Tike)
Sent: Thursday, March 13, 2014 11:57 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Layer with point from X and Y columns in

 

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 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/f077e1bc/attachment.html>


More information about the mapserver-users mailing list