[mapserver-dev] [EXTERNAL] Problem with filter in Oracle

Björn Danielsson bjorn.danielsson at falubo.se
Wed Jan 20 02:55:14 PST 2016


Hi,

Sorry about that, here is a new set.
It did not work either.

Map file:

MAP
  NAME               "C2"
  IMAGETYPE          JPEG
  EXTENT             1449000 6849000 1456000 6859000
  SIZE               500 500
  UNITS              METERS
#  SHAPEPATH          "c:\TMP\"
  IMAGECOLOR         255 255 255
  FONTSET            "c:\data\mapserverfonts\fonts.list"
  DEBUG              5
  CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"
  OUTPUTFORMAT
    NAME "jpeg"
    DRIVER AGG/JPEG
    MIMETYPE "image/jpeg"
    IMAGEMODE RGB
    EXTENSION "jpg"
    FORMATOPTION "GAMMA=0.75"
  END
   
  LAYER
    NAME           "X"
    GROUP          "X"
    CONNECTIONTYPE oraclespatial
    CONNECTION "c2/c2a@//192.168.0.101/fwt"
#    DATA           KARTOBJ_SDO FROM c2.KARTA$TMP2 WHERE  SDO_FILTER( 
KARTOBJ_SDO, MDSYS.SDO_GEOMETRY(2003, -1, 
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),SDO_ORDINATE_ARRAY(393339,6773950,394169,6774780)),'querytype=window') 
= 'TRUE'
    DATA   "KARTOBJ_SDO FROM c2.KARTA$TMP2"
    FILTER ("[ID]"="BJDA1")
    STATUS         ON
    TYPE           POLYGON
    MINSCALEDENOM  2000
    MAXSCALEDENOM  5000000
    DEBUG 5
    CLASS
      STYLE
        OUTLINECOLOR 255 0 0
      END   
    END
  END
END

Debug:
[Wed Jan 20 11:46:47 2016].919000 msDrawMap(): rendering using outputformat 
named jpeg (AGG/JPEG).
[Wed Jan 20 11:46:47 2016].919000 msDrawMap(): WMS/WFS set-up and query, 
0.000s
[Wed Jan 20 11:46:47 2016].919000 msOracleSpatialLayerOpen called with: 
KARTOBJ_SDO FROM c2.KARTA$TMP2 (Layer pointer 086AB118)
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerOpen. Shared 
connection not available. Creating one.
[Wed Jan 20 11:46:47 2016].950000 
msConnPoolRegister(X,c2/c2a@//192.168.0.101/fwt,0DA8F108)
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerFreeItemInfo was 
called.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerInitItemInfo was 
called.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerTranslateFilter. 
String: "[ID]"="BJDA1" 
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerTranslateFilter. There 
are tokens to process 
[Wed Jan 20 11:46:47 2016].950000 total filter tokens are 3
,[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes was 
called.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes. Using 
this Sql to retrieve the data: SELECT ID, rownum, KARTOBJ_SDO FROM 
c2.KARTA$TMP2 WHERE  ID = 'BJDA1'  AND SDO_FILTER( KARTOBJ_SDO, 
MDSYS.SDO_GEOMETRY(2003, :srid, 
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates),'querytype=window') = 
'TRUE'
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes. Bind 
values: srid:-1   minx:393339.500000   miny:6773950.000000  
maxx:394169.500000   maxy:6774780.000000 
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes getting 
ordinate definition.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes converting 
to OCIColl.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes bind by 
name and object.
[Wed Jan 20 11:46:47 2016].950000 msOracleSpatialLayerWhichShapes name and 
object now bound.
[Wed Jan 20 11:46:47 2016].965000 msOracleSpatialLayerFreeItemInfo was 
called.
[Wed Jan 20 11:46:47 2016].965000 msOracleSpatialLayerClose was called. 
Layer: 086AB118, Layer name: X
[Wed Jan 20 11:46:47 2016].965000 msOracleSpatialLayerClose. Cleaning 
layerinfo handlers.
[Wed Jan 20 11:46:47 2016].965000 msOracleSpatialLayerClose. Release the 
Oracle Pool.
[Wed Jan 20 11:46:47 2016].965000 
msConnPoolRelease(X,c2/c2a@//192.168.0.101/fwt,0DA8F108)
[Wed Jan 20 11:46:47 2016].965000 
msConnPoolClose(c2/c2a@//192.168.0.101/fwt,0DA8F108)
[Wed Jan 20 11:46:47 2016].965000 msDrawMap(): Layer 0 (X), 0.046s
[Wed Jan 20 11:46:47 2016].965000 msDrawMap(): Drawing Label Cache, 0.000s
[Wed Jan 20 11:46:47 2016].965000 msDrawMap() total time: 0.046s
[Wed Jan 20 11:46:47 2016].997000 msFreeMap(): freeing map at 086A4BC0.
[Wed Jan 20 11:46:47 2016].997000 msOracleSpatialLayerClose was called. 
Layer: 086AB118, Layer name: X
[Wed Jan 20 11:46:47 2016].997000 freeLayer(): freeing layer at 086AB118.

Björn D

-----Original Message-----
From: thomas bonfort <thomas.bonfort at gmail.com>
To: Björn Danielsson <bjorn.danielsson at falubo.se>
Cc: Michael Smith <michael.smith.erdc at gmail.com>,  MapServer Dev Mailing 
List <mapserver-dev at lists.osgeo.org>
Date: Wed, 20 Jan 2016 10:41:12 +0100
Subject: Re: [mapserver-dev] [EXTERNAL] Problem with filter in Oracle



    FILTER "([ID='BJDA1')"
Same result. Does not work with filter active, works when the filter line is 
commented. 

Your FILTER line is syntactically incorrect. Try with

FILTER ("[ID]"="BJDA1") 

if using Mapserver 7, or

FILTER "ID='BJDA1'"

for mapserver < 7

--
thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20160120/943843c7/attachment.html>


More information about the mapserver-dev mailing list