[mapserver-users] error occurred during "nextShape" in two oracle spatial layers

Sumit Sharma sumit321 at hotmail.com
Wed Aug 4 11:27:01 EDT 2010


Hi List,
I am facing rather very strange problem. Consider that I have two layers
from oracle spatial in my map file ... as follows..
#SOURCE LAYER
                    ...
 LAYER
    CONNECTION "mdsys/test@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
mapserver)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = orcl)))"
    CONNECTIONTYPE ORACLESPATIAL
    DATA "GEOM FROM POLYGONTEST1 USING UNIQUE BID SRID 4326"
                    ...
                    ...
#TARGET LAYER
LAYER
    CONNECTION "mdsys/test@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
mapserver)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = orcl)))"
    CONNECTIONTYPE ORACLESPATIAL
    DATA "GEOM FROM POLGONTEST USING UNIQUE BID SRID 4326"
                    ...
                    ...

Catch is both layer are lying on same server and have same connection
string. However Data is coming from two different layers. This become
headache for me when I call "whichShapes" function on one layer followed by
"nextShape" in loop. Now I want to call "queryByRect" on second layer in
loop. during second iteration nextShape gives me error stating attempted to
read write protected memory. following is kind of code that I am using....



 int status = TargetLayer.open();
 rectObj rect = TargetLayer.getExtent();
 status = TargetLayer.whichShapes(rect);
 shapeObj targetShape;
 while ((targetShape = TargetLayer.nextShape()) != null)
 {
         if (SourceLayer.queryByRect(SourceLayer.map, rect) ==
(int)MS_RETURN_VALUE.MS_SUCCESS)
                {
                    resultCacheObj result = SourceLayer.getResults();
                    ...
                    ...
                 }
 }

Has anyone faced such problem before... Any help is highly appreciated
-Sumit

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/error-occurred-during-nextShape-in-two-oracle-spatial-layers-tp5373017p5373017.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list