[mapserver-users] Oracle database problem

Paul Ramsey pramsey at opengeo.org
Tue Mar 3 18:52:19 EST 2009


You say the query runs OK from SQL/Plus, but are you logging into
SQL/Plus as the "sde" user?

On Wed, Feb 25, 2009 at 12:33 PM, Balázs Bámer <bamerbalazs at gmail.com> wrote:
> Hi All,
>
> I have a MapServer 5.2.1 compiled with
> ./configure --with-oci
> --with-oraclespatial=/usr/local/instantclient_11_1 --with-proj
> --with-threads --with-gdal --with-ogr --with-jpeg --with-png=/usr/lib
> --with-php=/usr/include/php5
> on Ubuntu 8.10
>
> I tried to maka a layer with
>
> LAYER
>  NAME lejto
>  METADATA
>    "DESCRIPTION" "lejto"
>    "wms_title" "lejto"
>    "ows_include_items" "all"
>  END
>  PROJECTION
>    "init=epsg:23700"
>  END
>  TYPE POLYGON
>  STATUS ON
>  CONNECTIONTYPE oraclespatial
>  CONNECTION "sde/asdfgh at 10.0.8.51:1521"
>  DATA "geom from LEJTO_2008_070814 using SRID 23700"
>  CLASS
>    NAME "lejto"
>    STYLE
>      OUTLINECOLOR 127 127 127
>    END
>  END
>  DUMP TRUE
>  TEMPLATE "template.html"
> END # layer
>
> GetCapabilities query works. If I try to draw the map with (you can try):
> http://att-it.homelinux.net:22080/cgi-bin/sokfolt?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=lejto&STYLES=&SRS=epsg:23700&BBOX=420000,40000,950000,370000&WIDTH=938&HEIGHT=591&FORMAT=image/png
>
>
> the response is msDrawMap(): Image handling error. Failed to draw
> layer named 'lejto'.
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
> ORA-00942: table or view does not exist
>  . Query statement: SELECT rownum, geom FROM LEJTO_2008_070814 WHERE
> SDO_FILTER( geom, MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(420000,40000,950000,370000)
> ),'querytype=window') = 'TRUE' . Check your data statement.
>
> while in sqlplus the query quite similar to the above (just modified
> to write row count instead of the 2 columns)
>
> SELECT count(1) FROM LEJTO_2008_070814 WHERE SDO_FILTER( geom,
> MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(420000,40000,950000,370000)
> ),'querytype=window') = 'TRUE'
>
> runs.
>
> SRID information and table user_sdo_geom_metadata is actualized:
>
> Insert into USER_SDO_GEOM_METADATA
> (TABLE_NAME,COLUMN_NAME,DIMINFO,SRID) values
> ('lejto_2008_070814','GEOM',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',437534.249899998,935741,5E-8),MDSYS.SDO_DIM_ELEMENT('Y',47058.0469,355027,5E-8)),23700);
> drop index IDX_LEJTO_2008_070814_GEOM;
> UPDATE lejto_2008_070814 c SET c.geom.SDO_SRID=23700;
> CREATE INDEX idx_lejto_2008_070814_GEOM ON lejto_2008_070814 (GEOM)
> INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('layer_gtype=POLYGON');
>
> What can be the problem?
>
> Thank you in advance.
> Best regards: Balázs Bámer
>
> What can be the problem?
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list