using oraclespatial data in map

Fernando Simon fsimon at UNIVALI.BR
Tue Oct 18 16:04:41 EDT 2005


Hi,
    This error occur when you define the SRID for you data in the
database but don't define for you Oracle Spatial access in you
layer.
    In your case the correct way how to define the SRID is:
        DATA "SHAPE FROM ESRI.COUNTRY_TSQA USING SRID #yoursrid"
    You can see the SRID for your spatial data in Oracle Spatial using
this command:
        SELECT srid FROM USER_SDO_GEOM_METADAT WHERE table_name =
'COUNTRY_TSQA';
    Another way how to retrive the SRID is query a simple SQL to
retrieve the spatial data:
        "SELECT shape FROM ESRI.COUNTRY_TSQA"
    You can se the complete documentation about Mapserver and Oracle
in this link: http://ms.gis.umn.edu/docs/howto/oracle_spatial_howto
    Regards.

------------------------------------------------------------------------
Fernando Simon
Mapserver and Oracle Spatial developer
G10 - Laboratorio de Computacao Aplicada - Brazil
http://www.univali.br/g10 - UNIVALI/CTTMAR
------------------------------------------------------------------------

Citando John Cartwright <John.C.Cartwright at NOAA.GOV>:

> Hello All,
> 
> I'm trying to use oracle spatial table (geographic WGS84 coords) 
> as a 
> layer in a map and seem to be having trouble w/ the projection. 
> The 
> layer is defined as:
>     LAYER
>         NAME admin2
>         CONNECTIONTYPE oraclespatial
>         CONNECTION "dbuser/dbpass at oraclehost"
>         DATA "SHAPE FROM ESRI.COUNTRY_TSQA"
>         STATUS off
>         TYPE polygon
> 
>          CLASS
>                 OUTLINECOLOR 0 0 255
>          END
>         PROJECTION
>            "init=epsg:4326"
>         END
>     END
> 
> 
> However, mapserver seems to be generating an SQL query w/ a NULL
> SRID:
> 
> ORA-13208: internal error  while evaluating [window SRID does not
> match 
> layer SRID] operator
> ORA-06512: at &quot;MDSYS.SDO_INDEX_METHOD_10I&quot;, line 281
> ORA-06512: at line 1
>  . Query statement: SELECT rownum, SHAPE FROM ESRI.COUNTRY_TSQA
> WHERE 
> SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, NULL, 
>
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-179.75,-89.875,179.75,89.875)
> 
> ),&#39;querytype=window&#39;) = &#39;TRUE&#39; . Check your data
> statement.
> 
> 
> Can anyone help me with the proper mapfile syntax?
> 
> Thanks!
> 
> -- john
> 




-------------------------------------------------
  Univali - Webmail - http://webmail.univali.br



More information about the mapserver-users mailing list