Problem with layer.getExtent() and Oracle (MapScript Java)

Fernando Simon fsimon at UNIVALI.BR
Mon May 28 08:32:01 EDT 2007


Hi Arkadi Shishlov,
    I believe that the error is relate with your Data string.
    Just few questions, why are you using "null" and "1=1"? Any special 
issue? What version of Oracle are you using? 8i? 9i? 10g?
    I suggest you to use this: (and add the version in the end)
      sqlMapserverQuery = "L82GEOMETRY from (select L82GEOMETRY, 
DATASET82ID, L82C23T1, L82C12T1, L82C20T1, L82C24T1, L82C22T1, L82C21T1 
from DATASET82) USING UNIQUE DATASET82ID SRID 3059 VERSION 9i"
    Best regards.

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

Arkadi Shishlov wrote:
> Calling extent = layer.getExtent() on the Oracle based layer returns rectObj with all components set to -1
> extent => { 'minx': -1 , 'miny': -1 , 'maxx': -1 , 'maxy': -1 }
>
> The layer is created by
>
> sqlMapserverQuery = "L82GEOMETRY from (select null, L82GEOMETRY, DATASET82ID, L82C23T1, L82C12T1, L82C20T1, L82C24T1, L82C22T1, L82C21T1 from DATASET82 where 1 = 1) USING UNIQUE DATASET82ID SRID 3059"
>
> layer.setStatus(mapscriptConstants.MS_ON);
> //layer.setType(MS_LAYER_TYPE.MS_LAYER_ANNOTATION);
> layer.setType(MS_LAYER_TYPE.MS_LAYER_POINT);
> layer.setConnectiontype(MS_CONNECTION_TYPE.MS_ORACLESPATIAL);
> layer.setConnection(mapDataConnectionString);
> layer.setData(sqlMapserverQuery);
> layer.setStatus(visible ? 1 : 0);
> layer.setTemplate("any.html");
> layer.setProjection(dbProjection);
>
> I can sucessfully retrieve extent of SHP based layers. Also many other operations on the above mentioned Oracle layer works just fine.
> I'm using Mapserver 4.10.1 from MS4W 2.2.3 on Windows XP, Sun Java 1.5.0_09, Tomcat 5.5.20.
> Any hints? Is it a bug in my application or Mapserver?
>
>   



More information about the mapserver-users mailing list