[mapserver-users] R: Re: oraclespatial connection

Smith, Michael ERDC-RDE-CRREL-NH Michael.Smith at erdc.dren.mil
Mon Aug 20 09:10:12 PDT 2012


Hmm,

You can't use that statement directly in sqlplus

You could use

SELECT OBJECTID_1,rownum, SHAPE FROM PSITDATA.COMUNI WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, :srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),sdo_ordinate_array(minx, miny, maxx, maxy) ),'querytype=window') = 'TRUE'

And put in the minx,miny,maxx, maxy values from the debug log to verify its all working properly.



From: Michele De Santis <tape2m at virgilio.it<mailto:tape2m at virgilio.it>>
Reply-To: Michele De Santis <tape2m at virgilio.it<mailto:tape2m at virgilio.it>>
Date: Mon, 20 Aug 2012 18:00:53 +0200
To: Michael Smith <michael.smith at erdc.dren.mil<mailto:michael.smith at erdc.dren.mil>>, "mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>" <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Subject: R: Re: [mapserver-users] oraclespatial connection

Thank you Michael,

I tried without version but with the same result.

Michele


----Messaggio originale----
Da: Michael.Smith at erdc.dren.mil<mailto:Michael.Smith at erdc.dren.mil>
Data: 20-ago-2012 17.53
A: "Michele De Santis"<tape2m at virgilio.it<mailto:tape2m at virgilio.it>>, "mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>"<mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Ogg: Re: [mapserver-users] oraclespatial connection

Michele,

Try with

   DATA "SHAPE FROM PSITDATA.COMUNI USING SRID 32633"

The VERSION 10g part doesn't need to be used anymore.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

From: Michele De Santis <tape2m at virgilio.it<mailto:tape2m at virgilio.it>>
Reply-To: Michele De Santis <tape2m at virgilio.it<mailto:tape2m at virgilio.it>>
Date: Mon, 20 Aug 2012 17:37:33 +0200
To: <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Subject: [mapserver-users] oraclespatial connection
Resent-From: Michael Smith <michael.smith at usace.army.mil<mailto:michael.smith at usace.army.mil>>

 Hi,

I'm using MS4W with connection to Oraclespatial. I followed the istructions on

http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#oracle-10g-11g

to enable Oracle 10g support and "mapserv -v" returns a string that contains "INPUT=ORACLESPATIAL"

In mapfile I have a Layer:

LAYER
    NAME PSITDATA.COMUNI
    TYPE POLYGON
    CONNECTIONTYPE oraclespatial
    CONNECTION "UN/PW at DBSVILPU"
    DATA "SHAPE FROM PSITDATA.COMUNI USING SRID 32633 VERSION 10g"
    CLASS
        STYLE
            OUTLINECOLOR 0 0 0
            COLOR 0 128 128
        END
    END
        METADATA
      "wms_title"    "PSITDATA.COMUNI"
      #"wms_srs"             "EPSG:26591"
      "wms_srs"              "EPSG:32633"
      "wms_name"            "PSITDATA.COMUNI"
      "wms_server_version"  "1.1.1"
      "wms_format"          "image/png"
      "wms_enable_request" "*"   ##necessary
        END
        PROJECTION
          "init=epsg:32633"
        END
END


but I have the error:


ORA-06553: PLS-306: wrong number or types of arguments in call to 'SDO_FILTER'
 . Query statement: SELECT OBJECTID_1,rownum, SHAPE FROM PSITDATA.COMUNI WHERE SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, :srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') = 'TRUE' . Check your data statement.

When I tried the SELECT in SQL*PLUS I had obtained:

SP2-0552: Bind variable "ORDINATES" not declared

Can you help me with the this error and with mapfile syntax?

Thank you
Michele _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120820/2d4f5d93/attachment.htm>


More information about the MapServer-users mailing list