The following examples assume that $testArea is an MgGeometry object defining a polygon, and $testAreaWkt is a WKT description of the polygon.
To create a filter to find all properties owned by Schmitt in the area, use either of the following sequences:
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("RNAME LIKE 'Schmitt%'");
$queryOptions->SetSpatialFilter('SHPGEOM', $testArea,
MgFeatureSpatialOperations::Inside);
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("RNAME LIKE 'Schmitt%'
AND SHPGEOM inside GEOMFROMTEXT('$testAreaWkt')";