Hi Prema,
 
Did you tried to add field name in the URL?
 
I also think you should add this field name into your layer definition:
 
DATA "shape,cntry_name FROM world USING SRID 8307"
 
Regards
 
Francesco
----- Original Message -----
Sent: Wednesday, January 18, 2006 4:56 PM
Subject: [UMN_MAPSERVER-USERS] Problem in Oracle Spatial with MapServer in ItemnQuery

Hi All,

 Thanks all for the solution of my previous query ( Problem in Oracle Spatial Connection - Empty Image).

 Now I got new query, Please give me some solution.

 I am able to establish connection between MapServer and Oracle Spatial 10g, and we can get the Map Image prefectly ( refer Subject Problem in Oracle Spatial Connection - Empty Image)

 I am unable to get the any Query  Function in MapServer with Oracle Spatial , but i can able to do the query operation with Shapefiles.

 The Mapfile, quey and Error is give below,

Mapfile

        MAP
                DEBUG ON
                NAME           World_Country
                EXTENT        -180 -90 180 83.60415649414
                SIZE           800 400
                SHAPEPATH      '/ms4w/apps/zap/data/'
                IMAGETYPE      GIF
                STATUS       ON

                WEB
                        TEMPLATE     'templates/ZapTemp.html'
                        IMAGEPATH    '/ms4w/tmp/ms_tmp/'
                        IMAGEURL     '/ms_tmp/'
                END

                PROJECTION
                        "proj=latlong"
                        "ellps=WGS84"
                END

                QUERYMAP
                        STATUS ON
                        STYLE HILITE
                        COLOR 255 255 0
                END

                LAYER
                        DEBUG ON

                        PROJECTION
                                "proj=latlong"
                                "ellps=WGS84"
                        END

                        CONNECTIONTYPE oraclespatial
                        CONNECTION "world/[EMAIL PROTECTED]"
                        DATA "shape FROM world USING SRID 8307"

                        NAME         world_poly
                        STATUS       ON
                        TYPE         POLYGON


                        DUMP TRUE

                        TEMPLATE "templates/ZapTemp.html"

                        TOLERANCE 5

                        CLASS
                                NAME  'The_World'
                                        STYLE
                                        COLOR    0 200 0
                                END
                        END
                END
        END


Query

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/zap/htdocs/CountryOrcl.map&mode=itemnquery&layer=world_poly&qlayer=world_poly&qitem=cntry_name&qstring=india


Error Message

msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00920: invalid relational operator . Query statement: SELECT rownum, cntry_name, shape FROM world WHERE india AND SDO_FILTER( shape, MDSYS.SDO_GEOMETRY(2003, 8307, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-180,-90,180,83.6041565) ),'querytype=window') = 'TRUE' . Check your data statement.

Spatial data in Oracle

SQL> describe world

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 SHAPEID                                   NOT NULL NUMBER(38)
 FIPS_CNTRY                                         VARCHAR2(2)
 GMI_CNTRY                                          VARCHAR2(3)
 ISO_2DIGIT                                         VARCHAR2(2)
 ISO_3DIGIT                                         VARCHAR2(3)
 CNTRY_NAME                                         VARCHAR2(254)
 LONG_NAME                                          VARCHAR2(40)
 SOVEREIGN                                          VARCHAR2(40)
 POP_CNTRY                                          NUMBER
 CURR_TYPE                                          VARCHAR2(16)
 CURR_CODE                                          VARCHAR2(4)
 LANDLOCKED                                         VARCHAR2(1)
 SQKM                                               NUMBER
 SQMI                                               NUMBER
 COLORMAP                                           NUMBER
 SHAPE                                              MDSYS.SDO_GEOMETRY


 Please give me a some solution

 Waiting for the reply

Thanks & Regards,
Prema Selvam
GISbiz



View this message in context: Problem in Oracle Spatial with MapServer in ItemnQuery
Sent from the Mapserver - User forum at Nabble.com.

Reply via email to