Oracle Spatial Filter problem

Fernando Simon fsimon at UNIVALI.BR
Mon Jun 26 10:50:12 EDT 2006


Hi Zhonghai,
    Your welcome, everything is fine here.
    About the error, just define the SRID parameter in your DATA
definition.
    Like:
        DATA "GEOLOC FROM E112_CELLS_GEO USING UNIQUE MI_PRINX SRID 8307
FILTER VERSION 9i"
     or another:
        DATA "GEOLOC FROM (SELECT MI_PRINX, GEOLOC FROM E112_CELLS_GEO
WHERE cell='BAMK5D')  USING UNIQUE MI_PRINX SRID 8307 FILTER VERSION 9i"
     If you are connecting in 9i database I recommend to use the VERSION
9I in your DATA definition to force the internal SQL to use just the
functions for release 9i. You can check the Oracle Spatial parameters in
this link: http://mapserver.gis.umn.edu/docs/howto/oracle_spatial_howto
     Best regards.

Fernando Simon


Zhonghai Wang wrote:
> Hi Simon,
>  
> how is everything? thanks for your hints.
>  
> as you said, I set the Filter again like this:
>  
> DATA "GEOLOC FROM E112_CELLS_GEO USING FILTER"
> FILTER "cell='BAMK5D'"
>  
> with the cell='BAMK5D' condition in the SQLPlus 12 elements will be
> selected, but with mapserverit returns still some error messages:
>  
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
> ORA-29902: error in executing ODCIIndexStart() routine
> ORA-13208: internal error  while evaluating [window SRID does not
> match layer SRID] operator
> ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 259
> ORA-06512: at line 1
>  . Query statement: SELECT rownum, GEOLOC FROM E112_CELLS_GEO WHERE
> cell='BAMK5D' AND SDO_FILTER( GEOLOC, MDSYS.SDO_GEOMETRY(2003, NULL,
> NULL, MDSYS.SDO_ELEM_INF
> O_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(5.95587,45.11214,10.49203,48.51426)
> )
> ,'querytype=window') = 'TRUE' .
> Check your data statement.
>  
> It seems that I should specify certain SRID code, but in this case the
> SRID code is not necessary.
>  
> BTW: the SRID is 8307
>  
> thanks
>  
> zhonghai
>
>  
> On 6/26/06, *Fernando Simon* <fsimon at univali.br
> <mailto:fsimon at univali.br>> wrote:
>
>     Hi,
>        Just remove the "WHERE" from FILTER parameter. Like: FILTER
>     "MI_PRINX =100"
>        Best regards.
>
>     Fernando Simon
>
>     Zhonghai Wang wrote:
>     > Hi there,
>     >
>     > I am trying to render the map with oracle spatial database, and
>     facing
>     > problems with the FILTER expression.
>     >
>     > at first I define the oracle spatial connection like:
>     >
>     > CONNECTIONTYPE ORACLESPATIAL
>     > CONNECTION "E110/E110 at PMCGIS2.WORLD
>     <mailto:E110/E110 at PMCGIS2.WORLD> <mailto: E110/E110 at PMCGIS2.WORLD
>     <mailto:E110/E110 at PMCGIS2.WORLD>>"
>     > DATA "GEOLOC FROM E112_CELLS_GEO USING UNIQUE MI_PRINX SRID 8307"
>     >
>     > and this one works fine, therefore I am sure that the mapfile
>     > definition is ok, and then I change the data connection to :
>     >
>     > CONNECTIONTYPE ORACLESPATIAL
>     > CONNECTION "E110/E110 at PMCGIS2.WORLD
>     <mailto:E110/E110 at PMCGIS2.WORLD> <mailto:E110/E110 at PMCGIS2.WORLD
>     <mailto:E110/E110 at PMCGIS2.WORLD>>"
>     > DATA "GEOLOC FROM E112_CELLS_GEO USING FILTER"
>     > FILTER "WHERE  MI_PRINX =100"
>     >
>     > to use the FILTER function for a specific selection, but this
>     > definition gives aan error instead of the map image:
>     >
>     > ERROR:
>     > msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
>     > ORA-00936: missing expression .
>     > Query statement: SELECT rownum, GEOLOC FROM E112_CELLS_GEO WHERE
>     WHERE
>     > MI_PRI
>     > NX=100 AND SDO_FILTER( GEOLOC, MDSYS.SDO_GEOMETRY(2003, NULL,
>     > NULL,MDSYS.SDO_ELE
>     > M_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(5.95587
>     > ,45.11214,10.49203,48.514
>     > 26) ),'querytype=window') = 'TRUE' .
>     > Check your data statement.
>     >
>     > I can not figure out where the problem is. the MI_PRINX is the
>     unique
>     > id of the table, if I make this query in the SQLPlus, the data
>     will be
>     > returned, which means the where condition in the SQL is no problem.
>     >
>     > any ideas for this?
>     >
>     > kind regards
>     >
>     > zhonghai
>     >
>     >
>     >
>     >
>     >
>
>



More information about the mapserver-users mailing list