Problem in Oracle Spatial with MapServer in ItemnQuery
Fernando Simon
fsimon at UNIVALI.BR
Wed Jan 18 09:04:40 PST 2006
Hi,
To execute query mode/functions you need to specify the USING UNIQUE
in your data definition.
In your case:
DATA "shape FROM world USING UNIQUE shapeid SRID 8307"
I will investigate why the qitem is not working, so in your case you
need to define the qitem inside of qstring, like:
*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=CNTRY_NAME='india*'
<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=%27india%27>
Best regards.
------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://www.univali.br/g10 - UNIVALI/CTTMAR
------------------------------------------------------------------------
Prema Selvam (sent by Nabble.com) wrote:
> 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/land at orcl"
> 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
> <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
> <http://www.nabble.com/Problem-in-Oracle-Spatial-with-MapServer-in-ItemnQuery-t945593.html#a2449588>
> Sent from the Mapserver - User
> <http://www.nabble.com/Mapserver---User-f1215.html> forum at Nabble.com.
More information about the MapServer-users
mailing list