2

How to use Oracle Spatial functions in the DATA queries of MapServer(ms4w 3.0.3)? I am getting the following error while trying to highlight selected features which lie inside a particular boundary :

msDrawMap(): Image handling error. Failed to draw layer named 'thematic_layer'. msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error parsing OracleSpatial DATA variable.

Following is the query I am using in the DATA string :

DATA "geom from (select S.XFM_ID as XFM_ID,S.LOCATION as LOCATION,S.OGC_GEOMETRY as geom from STRAND S,NODEBOUNDARY NB where SDO_RELATE(S.OGC_GEOMETRY,NB.OGC_GEOMETRY,'mask=inside')='TRUE' and NB.NODENAME='PUGA2003' and S.LOCATION in ('A','2')) as FOO USING UNIQUE XFM_ID SRID 2622 VERSION 10g"
3

Try removing the 'as FOO' statement at the end of the select statement, it is not needed.

As a reference this is the template for an Oracle Spatial DATA definition with a select instruction:

'geometry_column FROM (SELECT stmt) [USING UNIQUE <column> SRID srid# FUNCTION]'

the parts in square parenthesis are optional.

Reference retrieved straight from the source.

  • Thanx Unicoletti. That worked. – Shiva Jan 17 '14 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.