Mapserver + oracle spatial

Fernando Simon fsimon at UNIVALI.BR
Sun Jun 10 21:15:58 EDT 2007


Hi all,
    I believe that the problem is with the "*" in your statement. I 
already saw some problems when the "*" is used, specially with the query 
modes.
    In your case I suggest to you to remove the "*" and change it to the 
columns from your table. Another hint is to remove the "1 = 1".
    Best regards,

---------------------------------------------------
Fernando Simon
UMN Mapserver and Oracle Spatial developer
---------------------------------------------------

Maher Karim wrote:
> Dear Damien,
> The best way to use such a query is to create a view in Oracle with based
> on your query and it should be in this form of
> create or replace view (viewname) as SELECT
>     GEO.GEOM, A.*, ID as UNIQUEID
> FROM
>     MAILLES_CIEM GEO ,
>     (
>         SELECT
>             C0.code_geom,
>             C0.label_metric LT,
>             C0.valeur VT
>         FROM
>             SIH_CARTE_SIG C0
>         WHERE
>             1 = 1
>             and session_id = 'b5b89cbf8a613059c7c41b9796c66c44'
>             and NUM_COUCHE = '466533b224b29'
>             and C0.rang = 0
>     ) A
> WHERE
>     1 = 1
>     and A.code_geom = GEO.CODECIEM
>     and trim(GEO.CODECIEM) is not null
> ORDER BY
>     GEO.CODECIEM)
> and use this data in the map file
> data "geom from "Viewname" using unique UNIQUEID"
>
> Regards
> Maher Abdel Karim
> GIS systems analyst/programmer
> DC Water and Environment
>
>
>
> |---------+--------------------------------->
> |         |           Damien Corpataux      |
> |         |           <damien.corpataux at CAMP|
> |         |           TOCAMP.COM>           |
> |         |           Sent by: UMN MapServer|
> |         |           Users List            |
> |         |           <MAPSERVER-USERS at LISTS|
> |         |           .UMN.EDU>             |
> |         |                                 |
> |         |                                 |
> |         |           06/05/2007 05:33 PM   |
> |         |           Please respond to     |
> |         |           Damien Corpataux      |
> |---------+--------------------------------->
>   >--------------------------------------------------------------------------------------------------------------------------------------------------|
>   |                                                                                                                                                  |
>   |        To:      MAPSERVER-USERS at LISTS.UMN.EDU                                                                                                    |
>   |        cc:                                                                                                                                       |
>   |        Subject: [UMN_MAPSERVER-USERS] Mapserver + oracle spatial                                                                                 |
>   >--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>
>
> Hello list,
>
> I have a problem with a mapserver oracle spatial laye: when dynamically
> adding a oraclespatial layer with this kind of query:
> GEOM FROM (
> SELECT
>     GEO.GEOM, A.*, ID as UNIQUEID
> FROM
>     MAILLES_CIEM GEO ,
>     (
>         SELECT
>             C0.code_geom,
>             C0.label_metric LT,
>             C0.valeur VT
>         FROM
>             SIH_CARTE_SIG C0
>         WHERE
>             1 = 1
>             and session_id = 'b5b89cbf8a613059c7c41b9796c66c44'
>             and NUM_COUCHE = '466533b224b29'
>             and C0.rang = 0
>     ) A
> WHERE
>     1 = 1
>     and A.code_geom = GEO.CODECIEM
>     and trim(GEO.CODECIEM) is not null
> ORDER BY
>     GEO.CODECIEM) USING UNIQUE UNIQUEID NONE
>
>
> any mapserver operation leads to mapserver crash. Has anyone faced this
> situation?
>
>
> Here is the output of gdb, when performing a $layer->whichShapes().
>
> _gdb output_
> #0  0xb7b7b2ac in free () from /lib/tls/libc.so.6
> #1  0xb7b7ccff in malloc () from /lib/tls/libc.so.6
> #2  0xb70101d1 in msOracleSpatialLayerWhichShapes ()
>    from /usr/lib/php5/20060613+lfs/php_mapscript.so
> #3  0xb70040e5 in msLayerWhichShapes ()
>    from /usr/lib/php5/20060613+lfs/php_mapscript.so
> #4  0xb6fc87cf in layerObj_whichShapes ()
>    from /usr/lib/php5/20060613+lfs/php_mapscript.so
> #5  0xb6fbb453 in php3_ms_lyr_whichShapes ()
>    from /usr/lib/php5/20060613+lfs/php_mapscript.so
> #6  0xb752972f in execute () from /usr/lib/apache2/modules/libphp5.so
> #7  0xb7519128 in execute () from /usr/lib/apache2/modules/libphp5.so
> #8  0xb7529111 in execute () from /usr/lib/apache2/modules/libphp5.so
> #9  0xb7519128 in execute () from /usr/lib/apache2/modules/libphp5.so
> #10 0xb7529111 in execute () from /usr/lib/apache2/modules/libphp5.so
> #11 0xb7519128 in execute () from /usr/lib/apache2/modules/libphp5.so
> #12 0xb7529111 in execute () from /usr/lib/apache2/modules/libphp5.so
> #13 0xb7519128 in execute () from /usr/lib/apache2/modules/libphp5.so
> #14 0xb7529111 in execute () from /usr/lib/apache2/modules/libphp5.so
> #15 0xb7519128 in execute () from /usr/lib/apache2/modules/libphp5.so
>
> apache.err (mapserver v4.8):
> *** glibc detected *** corrupted double-linked list: 0x08f74d30 ***
> [Fri Jun 01 16:34:24 2007] [notice] child pid 11105 exit signal Aborted (6)
>
>
> apache.err (mapserver v4.10):
> *** glibc detected *** malloc(): memory corruption: 0x08ebe720 ***
> [Fri Jun 01 12:20:01 2007] [notice] child pid 1977 exit signal Aborted (6)
>
>
>
>
> Best regards,
> Damien Corpataux
>
>
> --
>                                                         
>                                                         
>                                                         
>  Camptocamp SA                                          
>  Damien Corpataux                                       
>  PSE A                                                  
>  CH-1015 Lausanne                                       
>                                                         
>  +41 21 619 10 22 (Direct)                              
>  +41 21 619 10 10 (Centrale)                            
>  +41 21 619 10 00 (Fax)                                 
>                                                         
>  P Please consider the environment                      
>  Do you really need to print this email?                
>                                                         
>
>   



More information about the mapserver-users mailing list