Camilo the obj returned by the query is a ShapeObj ($oShape). mapscript offers many function for this object here the list: http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/classes/shapeobj ciao Lorenzo