code: func mapToLocrect(expr string) string {
  	sq := strings.TrimSpace(expr)
  	if sq == "" {
  		return expr
  	}
  	fields := strings.Fields(expr)
  	lastPred := fields[len(fields)-1]
  	if geo.IsLocMapPredicate(lastPred) {
  		locrect := strings.Replace(lastPred, "map:", "locrect:", 1)
  		if len(fields) == 1 {
  			return locrect
  		}
  		return fmt.Sprintf("(%v) %v", strings.Join(fields[:len(fields)-1], " "), locrect)
  	}
  	return expr
  }
docs: // mapToLocrect looks for a trailing "map:" predicate and changes it to a
  // "locrect:" predicate if found. It also adds parentheses around all the rest of
  // the expression that is before the map predicate.