Problem in Oracle Spatial with MapServer in ItemnQuery

Prema Selvam (sent by Nabble.com) lists at NABBLE.COM
Wed Jan 18 10:56:05 EST 2006


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 


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: http://www.nabble.com/Problem-in-Oracle-Spatial-with-MapServer-in-ItemnQuery-t945593.html#a2449588
Sent from the Mapserver - User forum at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060118/2af71653/attachment.html


More information about the mapserver-users mailing list